2016-02-19 06:24 PM
I have regular transfers working for read/writes. I am trying to get transfers working with DMA. I am using CubeMX 4.12.
I set it up to have a dma request for both TX and RX (DMA2 Stream 3 and DMA2 Stream 6 respectively).I modified sd_diskio.c function SD_read to point to BSP_SD_ReadBlocks_DMA instead of BSP_SD_ReadBlocks - But the system hangs in SD_DMA_RxCplt waiting for the transfer to finish.MX_DMA_Init() is called in the configuration of the initialized peripherals - Any ideas ? Thanks #no-hablo-hal #je-ne-l''aime-cube2016-02-20 08:09 AM
There's a whole other [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx]forum page dedicated to the trials and tribulations with HAL/Cube.
You really only need one DMA channel/stream for SDIO DMA, as you can only Read or Write in one direction at a time.2016-02-24 04:20 PM
Check HAL_SD_MspInit() function.
For me it sets 2 settings incorrectly:hdma_sdio_tx.Init.Mode = DMA_PFCTRL; // generator sets DMA_NORMAL...hdma_sdio_rx.Init.Mode = DMA_PFCTRL; // not DMA_NORMAL;