cancel
Showing results for 
Search instead for 
Did you mean: 

How to change DMA srcAddress

xkamail
Associate

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.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

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

View solution in original post

1 REPLY 1
KnarfB
Principal III

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