cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072 Nucleo-64 - TIM16 problem

JuM
Senior
Posted on December 11, 2017 at 11:33

Trying to use TIM16 of a STM32F072 to generate a (software triggered) one shot high pulse at a GPIO pin.

As there are some screenshots, I have attached a PDF to show the problem.

I do not use any timer hardware beside of ARR and CNT, but get a 40 usec (first) pulse instead of a 200 usec pulse...

Running TIM16 as periodical timer with same initialization, second and all following pulses are 200 usec!?

Any idea?

Best regards Juergen.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 11, 2017 at 11:59

Without dwelling much upon your code: are you aware of the fact that PSC register is loaded into actual prescaler only upon update?

JW

View solution in original post

3 REPLIES 3
Posted on December 11, 2017 at 11:59

Without dwelling much upon your code: are you aware of the fact that PSC register is loaded into actual prescaler only upon update?

JW

Posted on December 11, 2017 at 14:58

You are - as nearly always - right, I was not aware...Have to read ST manuals much more 'wordwise'...

Thank you for your support!
Posted on December 11, 2017 at 15:04

How comes 'nearly'??? 😉

Glad you got it working.

JW