STM32 CubeMX FATFS SDIO DMA hangs
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-19 6:24 PM
Posted on February 20, 2016 at 03:24
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-cube
Labels:
- Labels:
-
STM32Cube MCU Packages
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-20 8:09 AM
Posted on February 20, 2016 at 17:09
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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-24 4:20 PM
Posted on February 25, 2016 at 01:20
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;