cancel
Showing results for 
Search instead for 
Did you mean: 

DMA; One ADC channel to Timer and another ADC channel to memory

klauskvik
Associate II
Posted on November 04, 2012 at 23:34

Hi

I am new to the STM32 (using the STM32L151) and I have a question:

I need to use ADC1 channel 1 to control the duty cycle of  a PWM with DMA (i have this working)

Then I need ADC1 channel 2 to control the duty cycle of another PWM, also with DMA

Lastly, for housekeeping, I need to aquire a third ADC channel3 to memory with DMA

Is this possible, having the different channels of the ADC1 routed to different memory locations, not using an address increment?

Thanks

Klaus
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Posted on November 05, 2012 at 04:29

No, not directly.

You'll need to look at doing a circular DMA into a 6 location array, on the HT and TC interrupts load and copy half the content, ie 3 values, into your diverse target locations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..