DMA to PWM triggered by timer
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-07-24 4:25 PM
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 ? :)
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-07-25 10:43 AM
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 ?