2022-04-10 05:20 AM
Hi there!
I am trying to create a lock-step synchronization between a timer that updates GPIO and a dac.
As you can see from the below, the GPIO leads the DAC transitions by 1 cycle, and that's not what I want:
My setup is as follows.
TIM8 generates a TRGO that drives the DAC1 DMA.
I also have a TIM8_UP DMA Request created through the DMA System Configuration.
The problem is that the TIM8_UP and TIM8_TRGO events are not synchronous, and differ by one cycle.
FYI I am using a Nucleo STM32G431KB.
I was trying to use the DMA Request Synchronization Settings to ensure the two different signals (DMA and GPIO) are exactly synchronous, but I cannot get it to work.
How could I do this through STM32CubeIDE?
I also noticed that there is no TIM8_TRGO DMA Request signal available. The datasheets are pretty difficult to search on this topic also and provide no additional clues that I could find.
Thank you.
2022-04-10 02:44 PM
Consider using a different event such as TIM8_CC1 instead of TIM8_UP where you can set the CCRx value to change the relative timing.
2022-04-10 06:49 PM
Thanks @TDK, I appreciate the suggestion, but I don't want to change the relative timing, I just want a lock-step signal with the DAC DMA, and I don't seem to be able to do that, since I can't seem to define DMA synchronization to ensure synchronous transfer.
2022-04-10 07:04 PM