cancel
Showing results for 
Search instead for 
Did you mean: 

TIM2 CH3 and CH4 ic az the same time?

Petró Máté
Associate II
Posted on February 11, 2017 at 20:39

Hy.

I have a stm32f407vgt. I would like to use all TIM2 input compare for DMA trigger. I don't understand that the TIM2_CH4 is at two dma streams, and one of them with CH2, so how can i use all 4 channels at the same time?

Thanks,

Mate

Note: this post was migrated and contained many threaded conversations, some content may be missing.
15 REPLIES 15
T J
Lead
Posted on February 11, 2017 at 23:24

do you need all 4 PWM channels...?

this is easily configured inside cubeMX.

Petró Máté
Associate II
Posted on February 11, 2017 at 23:42

Yes I need all 4 channels. But I don't get it. TIM2_CH4 is at 2 streams at the same time, will there be a problem?

T J
Lead
Posted on February 12, 2017 at 00:15

how long do you have between pulses ?

Posted on February 11, 2017 at 23:48

I am not an expert with the ST lineup, but I have been working on it for more than 12 months now.

Yes, you can use one or the other DMA if you want to.

did you want the 4 channels PWM to trigger 4 DMA streams ?

your request is not clear.

Input compare is usually externally triggered by a pin, is this what you want ?

therefore any external trigger can be set as an interrupt and the software can invoke any DMA stream...

Posted on February 11, 2017 at 23:55

I want 4 chanells input capture. I use 'Both edge mode'. When the input chanes its value, I want to save the timer value with dma. But I don't know that if 

TIM2_CH4 is at 2 streams at the same time, when TIM2_CH4 input change occurs which stream will request dma, because TIM2_CH4 are in stream7 and stream6 with TIM2_CH2.

And also I don't have time for interrupt, because the change could be very fast.

Posted on February 12, 2017 at 01:11

TIM5 doesn't appear to suffer from this particular problem...

JW

Posted on February 12, 2017 at 00:18

I don't know. It depends on the user. But the maximum frequence would be 10Mhz.

Posted on February 12, 2017 at 00:47

do you know about this high resolution timer ?

http://www.st.com/en/microcontrollers/stm32f334.html?querycriteria=productId=LN1820

Posted on February 12, 2017 at 03:37

I think they all look routable

TIM2_CH1 DMA1 Stream 5 Channel 3

TIM2_CH2 DMA1 Stream 6 Channel 3

TIM2_CH3 DMA1 Stream 1 Channel 3

TIM2_CH4 DMA1 Stream 7 Channel 3

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