UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
3,265 Views
Registered: ‎09-27-2013

Exception using Bare metal SD Card FAT FS

I'm trying to get a bare metal application read and writing to an SD Card file system on a MicroZed board. 

 

My initialization sequence is: 

 

disk_initialize() (diskio.c)

f_mount( &fatfs,  "/", 1);

 

and these return good status results. I know these are working properly because I was able to create and write to a file using f_open, f_write, and f_close.

 

However, trying to do "f_readdir" has caused an exception. I've traced it down to this call stack:

 

f_readdir("/")

dir_read()

move_window()

disk_read()

XSdPs_ReadPolled()

Xil_DCacheInvalidateRange()

 

and then inside that function the call stack becomes corrupt and I land in Xil_ExceptionNullHandler.

 

Any idea what is causing this and how to fix?

 

0 Kudos