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: 
Adventurer
Adventurer
846 Views
Registered: ‎03-03-2015

Performing large writes (>200MB) to SD

Jump to solution

Hey all!

 

I'm working on a code that, every once in a while, needs to store some large chunks of data (usually over 200MB, minimum) from the DDR memory to an SD card.

 

For interacting with the SD card, I've always used the "ff.h" library and had no issues with smaller data writes. For this particular unsuccessful case, I'm still able to mount the drive/file system and open my new file for writing. I then try to issue a >200MB write from my data's base address (which is 32-bit aligned, I might add). Whenever I try this, I get an "FR_DISK_ERR" error code which, according to the header file, means "A hard error occurred in the low level disk I/O layer"

 

I then tried to divide my writing process in several smaller write calls (between 1-2MB each). If I do things this way, at one point I get the following error:

 

Data abort with Data Fault Status Register  805
Address of Instrcution causing Data abort 0

I checked the corresponding codes for the mentioned register, but there was still not much there to help me.

Anyone else also had issues writing large chunks of data to the SD?

 

Any help is appreciated.

Thanks in advance.

 

Edit: I'm attempting this under Xilinx SDK 2016.4, running a FreeRTOS application.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
1,150 Views
Registered: ‎03-03-2015

Re: Performing large writes (>200MB) to SD

Jump to solution

Just a quick update on my issue (which is now fixed!).

 

No matter how I tried to copy data onto the SD card (whether by performing a single large write or splitting the data into chunks), the best result I was able to get was to copy roughly under 200MBs of data.

After re-checking the initialization code for the SD file system (which I took from the xilffs library examples), I noticed the following parameter in the "f_mount()" function:

 

 

FRESULT f_mount (
	FATFS* fs,		/* Pointer to the file system object (NULL:unmount)*/
	const TCHAR* path,	/* Logical drive number to be mounted/unmounted */
	BYTE opt		/* 0:Do not mount (delayed mount), 1:Mount immediately */
)

 

In the source example, this call was made with opt=0 (i.e., delayed mount). I tried to change this parameter to opt=1 and was able to still mount the SD card successfully and am now able to write well over 200MBs of data.

0 Kudos
1 Reply
Adventurer
Adventurer
1,151 Views
Registered: ‎03-03-2015

Re: Performing large writes (>200MB) to SD

Jump to solution

Just a quick update on my issue (which is now fixed!).

 

No matter how I tried to copy data onto the SD card (whether by performing a single large write or splitting the data into chunks), the best result I was able to get was to copy roughly under 200MBs of data.

After re-checking the initialization code for the SD file system (which I took from the xilffs library examples), I noticed the following parameter in the "f_mount()" function:

 

 

FRESULT f_mount (
	FATFS* fs,		/* Pointer to the file system object (NULL:unmount)*/
	const TCHAR* path,	/* Logical drive number to be mounted/unmounted */
	BYTE opt		/* 0:Do not mount (delayed mount), 1:Mount immediately */
)

 

In the source example, this call was made with opt=0 (i.e., delayed mount). I tried to change this parameter to opt=1 and was able to still mount the SD card successfully and am now able to write well over 200MBs of data.

0 Kudos