SAM4e xplained pro demo, large file read

oldcoder wrote on Friday, March 16, 2018:

Hi all,

I managed to get the SAM4e xplained pro demo working with some mods.

Mostly works ok, server works fine, no issue here.

When I try to read a large file, approx 397k from SD card, it hangs in the hsmic_wait_end_of_read_blocks() function. Files up to 250k seem to be ok.
Looks like it’s getting a timeout, overrun is set and the txdone bit is never getting set.
I tried bumping up the timeout bits by 1 but it had no effect.

Any idea what could be causing this or how I can debug it? Not out of memory so that does not appear to be the issue.

Thanks
Ken

heinbali01 wrote on Sunday, March 18, 2018:

Hi Ken, do you say the overrun bit is set?
If there is an overrun, could you check what type of memory is being passed to DMA? Is that internal SRAM, or slower external SDRAM?
I tested the SAM4E +FAT project with files of all sizes, and I never saw the problem that you report.
Have you tried using a different type of SD-card already?