cancel
Showing results for 
Search instead for 
Did you mean: 

help with timers

infor
Associate III
Posted on April 15, 2015 at 09:49

I just created this simple project for an STM32F429 discovery board:

1) TIM1 is configured to produce a square waves on OC2 (PA9)

2) TIM2 is configured to use the ETR pin as clock source (PA5)

3) USB periodically sends a message with the value of TIM2.CNT

By connecting PA9 and PA5 I would expect to see TIM2.CNT increasing, but this is not the case.

I checked PA9 with a logic state analyser, and the expected output is there. So the problem is in the configuration of the input.

I used STM32CubeMX to create the configuration, and everything seems ok.

The registers of TIM2 are:

- in SMCR, SMS = 0b111 and TS = 0b111. According to the manual this sets ETR as clock source

- in CR1, CEN = 1

Every other register is 0.

Can someone help me in finding my error?

Thanks

I am experimenting a discovery board with F429.

#stm32f4 #timers #i-can''t-help-you-with-that
2 REPLIES 2
Posted on April 15, 2015 at 18:11

Can someone help me in finding my error?

May be someone can, I'm not using Cube/HAL
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
infor
Associate III
Posted on April 21, 2015 at 09:33

May be someone can, I'm not using Cube/HAL

In facts, I described the contents of the registers, in the hope that someone can see where the problem is...without involving Cube