Part Number: AM3352
Tool/software: TI-RTOS
I have a customized AM3352 board, it is almost same to beagleboard-black.
A SD card slot is soldered at MMC0, an eMMC chip is attached at MMC1.
The board is running with TIRTOS, built upon pdk 'pdk_am335x_1_0_14'.
After code modification (pinmux) were made to pdk, the eMMC (on MMC1 port) FAT partitions can be successfully mount and written.
But the write operation not stable, it randomly return with error,.
While continuously write to eMMC partition file (according to fatfs f_write), a random FR_DISK_ERR may return and then filesystem get stuck.
Despite the fatfs, I built a test uppon ''MMCSD_evmAM335x_armTestProject" by directly writing eMMC with 'MMCSD_write'. It also return a MMCSD_ERR at some random place.
Sometimes, 1GBytes were successfully written before the write error, sometimes it only has 60MBytes written.
By tracking down the code of pdk, in call stack 'MMCSD_v1_write -> MMCSD_v1_transfer', a SD_STAT(bit CTO) is captured after CMD25 was sent.
The timeout is the point.
By modifying the write blockCount, it has different behavors:
1) Each time write 16 blocks (or less, 16*512 = 8KB), the timeout comes soon. Within 1GB were written, there is must a timeout.
2) Each time write 2048 Blocks (2048*512 =1MB), the timeout comes later. After several loops of test done and several GB were written, the timeout raised.
The timeout didn't happen at the fix block or a fix time, it always comes randomly.
We tried to run Linux on the same board, everything goes fine.
The eMMC partitions were written to full and then clear, the test ran several loops, without any error captured.