cancel
Showing results for 
Search instead for 
Did you mean: 

Output Compare

k239955_stm1_st
Associate
Posted on April 21, 2008 at 06:09

Output Compare

2 REPLIES 2
k239955_stm1_st
Associate
Posted on May 17, 2011 at 12:30

Hi,

I use TIM1 - Example5 from the STM32 Standard Library package. This example uses DMA with TIM1 Update request to transfer Data from memory to TIM1 Capture Compare Register3. The result is a change in the duty cycle depending on the values from the DMA.

I want to change this example to ''Output Compare mode'' and the corresponing output should toggle after each successful Output compare (and the counter should start with 0 again for the next Output compare).

Any idea ?

Thanks,

Klaus

philipp2399
Associate II
Posted on May 17, 2011 at 12:30

Hi Klaus,

I'm not sure where the Problem is. You use DMA to set the Period register and each time the counter starts at zero you want to toggle an output Pin? You could set the compare value at 1.

Maybe you also could use the Output Compare Mode without resetting the Timer? In that case the values in the DMA buffer must be the integral of the desired time intervals.

Philipp