This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L137: f_write freezing

Part Number: OMAP-L137

I have some trouble with writing of large files on SD card.

Platform: OMAP-L137/C674x
devkit package: pdk_omapl137_1_0_11
used libraries from pdk: ti.drv.mmcsd.ae674, ti.fs.fatfs.ae674

I have a project that uses an SDHC card with FAT32 system on the custom
board. I am using the noted libraries for development.
I encountered a problem when writing large files to the SD card, the
writing process freezes and the function f_write(FIL*, void* buffer, int
n, int&r);
does not return any value for a long time.

When using a JTAG emulator, it turns out that the call stack contains a

MMCSD_v0_transfer$0(void *, struct MMCSD_v0_Transaction_s *, struct
mmcsdCmd *)() at MMCSD_v0.c:2,366 0xC3C75B08

execution is in a loop here:

   while ((0 == object->xferComp) && (0 == object->xferTimeout))
     MMCSD_v0_xferStatusFxn2((uintptr_t) handle, status);
     status = MMCSDGetIntrStatus(hwAttrs->baseAddr);

and cannot complete the transfer.

This error does not occur consistently, but only with a large number of
sequential uses of the "f_write" function.
  I use the default settings in the MMCSD driver. Reading files of any
size does not cause problems.
When using f_write once, writing works fine. Reducing the clock
frequency on the SD card even by 2 times does not help.
Perhaps some additional settings are required to initialize the MMCSD