Skip to main content
k239955_stm1_st
Associate
April 21, 2008
Question

Output Compare

  • April 21, 2008
  • 2 replies
  • 692 views
Posted on April 21, 2008 at 06:09

Output Compare

    This topic has been closed for replies.

    2 replies

    philipp2399
    Associate
    May 17, 2011
    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

    k239955_stm1_st
    Associate
    May 17, 2011
    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