2024-11-11 04:36 AM - edited 2024-11-11 04:38 AM
I’ve created a SPI peripheral as a slave in transmit-only mode. It operates in circular mode DMA and generates a complete callback every 20 milliseconds. Upon receiving the complete callback, I want to modify the source address of the DMA request.Currently, I achieve this by aborting the SPI and then initiating a new DMA transfer with the updated address configuration.
Why do I need to change the DMA Source Address?I’m implementing a ring buffer pointer.
Note: I’ve utilized the HAL framework for this implementation.
Solved! Go to Solution.
2024-11-11 06:26 AM - edited 2024-11-11 06:30 AM
For that, use double-buffer mode. Not available in all series/MCUs but at least in (most?) H7, see RM0455 Reference manual.
Covered in stm32h7xx_hal_dma_ex.h HAL_DMAEx_MultiBufferStart_IT, HAL_DMAEx_ChangeMemory.
hth
KnarfB
2024-11-11 06:26 AM - edited 2024-11-11 06:30 AM
For that, use double-buffer mode. Not available in all series/MCUs but at least in (most?) H7, see RM0455 Reference manual.
Covered in stm32h7xx_hal_dma_ex.h HAL_DMAEx_MultiBufferStart_IT, HAL_DMAEx_ChangeMemory.
hth
KnarfB