[lowrisc-dev] Can't execute SD card example on Nexys4 DDR

Alexis Ramos Amo aramosam at nebrija.es
Wed Mar 30 08:43:57 BST 2016


Hello all,

I'm trying to run "SD card read test" (sdcard.c) on my Nexys4 DDR but I get  the following error:

Fail to mount SD driver!
Error! exit (0x00.1)

The program is failing at the following line (in sdcard.c)

if(f_mount(&FatFs, "", 1))

I'm loading the bitstream from Quad-SPI Flash (the board is going to be re-configured several times, so I need the fastest programming procedure available). I get the same error loading it by PROG/UART, but I don't have any problem if I load the bitstream from microSD. The microSD HC is formatted on FAT32 (8GB).

I've changed the option _FS_READONLY  to 0 in order to allow writing on the SD. Also I've tried to change the path of f_mount (like if(f_mount(&FatFs, "1:", 1)) without success.

. How can I read/write from SDCARD, if I  load the bitstream from another different drive than the SD?
. Also, Could I write into SPI Flash memory (instead of sdcard) if the bitstream is loaded from flash?

Thank you for your help.



Alexis Ramos Amo 
Researcher / PhD Student

Electronic Design and Space Technology group Nebrija University

Madrid 
Spain
www.nebrija.com




More information about the lowrisc-dev mailing list