cancel
Showing results for 
Search instead for 
Did you mean: 

stm32L452 HAL_SD_WriteBlocks_DMA without irq response

Cchn.1
Associate II

It is the problem about the dma driver of stm32L452's sdmmc1.

ide: cubeide

board: NUCLEO-L452RE

config: sdmmc1 with dma , sd 4bit, without rtos

sdmmc1 dma config :

1. {sdmmc1 both(rx and tx) : dma2_channel_4}

or 2. {(sdmmc1_rx : dma2_channel_4) and (sdmmc1_tx : dma2_channel_5) }  

I have followed the guide in stm32l4xx_hal_sd.c :

    (##) On other devices, perform DMA configuration if you need to use DMA process (HAL_SD_ReadBlocks_DMA()

       and HAL_SD_WriteBlocks_DMA() APIs).

      (+++) Enable the DMAx interface clock using __HAL_RCC_DMAx_CLK_ENABLE();

      (+++) Configure the DMA using the function HAL_DMA_Init() with predeclared and filled.

The problem is that only "HAL_SD_ReadBlocks_DMA()" can get the response from "HAL_SD_RxCpltCallback()".

calling "HAL_SD_WriteBlocks_DMA()" returned "ok" , but without the response of "HAL_SD_TxCpltCallback()". 

And when i change the sdmmc1 dma channel:

sdmmc1_rx: dma2_channel_5  

sdmmc1_tx: dma2_channel_4

"HAL_SD_ReadBlocks_DMA" can not get the callback response from "HAL_SD_RxCpltCallback()".

but

"HAL_SD_WriteBlocks_DMA()" get the response from "HAL_SD_TxCpltCallback()". 

With the same configuration in stm32F407, everything goes well

Looking forward to help!

thanks

0 REPLIES 0