cancel
Showing results for 
Search instead for 
Did you mean: 

Support Request: SPI DMA Interrupt Not Triggered After Moving to FreeRTOS (STM32WB5MM)

majd_sleem
Associate II

I'm working with the STM32WB5MMG module and have been using SPI communication with DMA successfully. Previously, in a bare-metal setup, the following was working perfectly:

  • HAL_SPI_TransmitReceive_DMA() starts the transfer

  • HAL_SPI_TxRxCpltCallback() is triggered upon DMA completion

  • SPI and DMA configurations were verified, and the interrupt fired reliably

However, after integrating FreeRTOS into the project, I noticed that the DMA transfer still starts successfully (HAL_OK is returned), but the DMA interrupt no longer fires, and HAL_SPI_TxRxCpltCallback() is never called.

Additional Notes:

  • DMA and SPI are initialized the same way as before (generated via STM32CubeMX)

  • SPI state and error checks show normal operation (HAL_SPI_GetError() returns 0)

  • NVIC interrupts for DMA channels are enabled

  • FreeRTOS is running with default settings, and I'm not using CMSIS-RTOS wrappers for SPI or DMA

  • No changes were made to SPI or DMA configuration between bare-metal and RTOS versions

 

  1. Are there any specific considerations or constraints when using SPI with DMA under FreeRTOS on STM32WB?

  2. Could this be related to interrupt priority settings conflicting with FreeRTOS?

  3. Are there known limitations with DMA or SPI when using STM32WB with FreeRTOS?

I’d appreciate any guidance or examples on how to correctly configure SPI DMA under FreeRTOS on the STM32WB platform.

Thanks in advance!

 

0 REPLIES 0