Question
DMA triggered DMA
Posted on March 05, 2014 at 11:32
Hey everybody,
Is it somehow possible to start/enable/trigger a DMA transfer with the help of another DMA transfer? I'm thinking of the following scenario: - DMA transfer 1 is timer triggered (every 1us) and transfers memory data to a GPIO data register, therefore creating a 1MHz bit pattern on the output pins (20 consecutive transfers) - DMA transfer 2 is also timer triggered (every 1ms) and should retrigger DMA transfer 1, in order to repeat that bit pattern with a frequency of 1kHz. What I know from the reference manual is that you should not configure a DMA stream while it is enabled. But I'm thinking of using DMA transfer 2 to write the SxNDTR (number of data) register of DMA transfer 1. Would this lead to any complications? (btw: I know I could replace DMA transfer 2 by an interrupt.) Thanks in advance for any replies, Richard #stm32f4 #dma #timer