Stm32f407vgtx TIM output compare mode
Hi
I am trying to achieve output compare mode in TIM1 in stm32f407vgtx board .
I am trying to generate a delay of one ms and running a timer clock at 1mhz after divide it with prescaler.
I have enabled upcounter,TIM_CCER_CC1E bit in CCER, TIM_EGR_CC1G bit and loaded CCR1 as 999(one ms) and ARR as 0xFFFF but my counter is exceeding the value and it is going upto 65535 which is the ARR value .
I have not configured OC1M[2:0]bit (capture/compare mode register 1 (TIMx_CCMR1)) as I am not toggling PA8 or any thing on that pin which is linked with TIM1_CH1.
I want when ever counter value matches CCR1 it generates interrupt and I am toggling led inside that IRQ handler.
Can you help me where I am wrong please.
B.R
Ashish
