Skip to main content
MFolk.1
Senior
May 17, 2022
Solved

Do I need to use DMA in order to use HAL_SPI_RxHalfCpltCallback()?

  • May 17, 2022
  • 2 replies
  • 955 views

I recently switched from DMA to IT for receiving commands via SPI. Now I'm noticing that commands are being received and processed correctly, but HAL_SPI_RxHalfCpltCallback() is no longer being called. A lot has changed in my program since then, but in regards to the SPI drivers I can't recall anything else changing. I would like to stay off of DMA if I can, but I absolutely need HAL_SPI_RxHalfCpltCallback() to work. Thanks!

This topic has been closed for replies.
Best answer by Georgy Moshkin

Half complete interrupts are coming from DMA. HAL_SPI_RxHalfCpltCallback() is called on DMA interrupt. I can fix your DMA issues if you provide some details

2 replies

MFolk.1
MFolk.1Author
Senior
May 17, 2022

I switched back to using DMA and now HAL_SPI_RxHalfCpltCallback() is getting called again. Is there a reason why DMA must be used here? Can this be done without DMA?

Georgy Moshkin
Georgy MoshkinBest answer
Senior
May 18, 2022

Half complete interrupts are coming from DMA. HAL_SPI_RxHalfCpltCallback() is called on DMA interrupt. I can fix your DMA issues if you provide some details

Check my STM32 Bootloader - flash your STM32 with AES-encrypted binaries right from web browser!