2018-07-16 08:15 AM
2018-07-16 08:28 AM
Does the non-DMA version of ReadBlocks return something that isn't zeros? Is the card formatted and usable elsewhere?
If you prefill the buffer with a non-zero data pattern before the ReadBlocks call do you still see that after the call?
Is the memory being used in the 0x20000000 or 0x10000000 ranges?]
Perhaps also review HAL examples, they tend to work a lot better and consistently than the train wreckage output by CubeMX.
STM32Cube_FW_F4_V1.21.0\Projects\STM324xG_EVAL\Applications\FatFs\FatFs_uSD_RTOS
STM32Cube_FW_F4_V1.21.0\Projects\STM324x9I_EVAL\Applications\FatFs\FatFs_uSD_RTOS\Src\sd_diskio_dma_rtos.c
2018-07-16 08:45 AM
If your DMA-accessed buffers aren't in cache-inhibited memory you probably need to do some cache flushing/invalidating. To avoid mysterious, hard-to-debug problems I'd suggest aligning the buffer used by ..._ReadBlocks_DMA() to a cache-line boundary and memcpy() to the user buffer. 'Works for me'... ;)