2017-06-06 01:06 AM
Hi,
I'm using a STM32F103ZG with the Standard Peripheral Library, Version 3.5.0.
I'm writing data (128 KiB) from an external SRAM (connected via FSMC) to an SD card (via SDIO). For this, I'm using the DMA-approach. (as given in the example code included in the StdPeriph Library zip file).
I encounter lots of TXUNDERRUNs with the configuration:
CLKDIV = 1 (meaning SDIO_CK = 72 MHz / (1 + 2) = 24 MHz) + WideBus Mode (4b) enabled.
When I disable WideBus mode, I experience no TXUNDERUNs.
(By the way, I am aware that the example code probably does the SDIO/DMA configuration in the wrong order, or at least not according to the reference manual. I tried fixing the order, but still got the underruns).
When copying from the internal SRAM (96 KiB), however, I can also use the 4b-WideBus mode without getting underrun errors.-
My guess would be that the connection from external SRAM via FSMC in simply 'too slow' to get the data for the 4b WideBus mode. Am I correct in assuming so?
#fsmc #sdio #dma