cancel
Showing results for 
Search instead for 
Did you mean: 

DMA to PWM triggered by timer

vinodstanur
Associate II
Posted on July 25, 2016 at 01:25

Hi,

    Using cubeMX I have implemented a timer triggered (42KHz T2 TIM_TRGO_UPDATE )circular DMA transfer from ADC channel 1 to  memory buffer. I am trying to do some audio processing in real time. Also I am driving a class D amplifier circuitry made using two N channel mosfets and IR2110 gate driver. So instead of using the DAC I am using the PWM CH1 - CH1N combination with a decent dead time etc.

Now my concern is, I need to use DMA to transfer the processed HALF buffer (received from ADC DMA half complete interrupt) to PWM with a timer triggered mechanism so that I will get enough time for the complex audio processing math to perform.

But I am unable to get any clue from the cubeMX for doing a timer triggered MEMORY to PERIPHERAL transfer.

Any clue ? :)

1 REPLY 1
vinodstanur
Associate II
Posted on July 25, 2016 at 19:43

I can set the DMA to to transfer from memory to PWM and initiate the transfer using

HAL_TIM_PWM_Start_DMA but how will I set the DMA transfer rate ? Else the DMA will finish the transfer as fast as possible but I need to restrict the transfer at 44KHz. What can I do for this ?