cancel
Showing results for 
Search instead for 
Did you mean: 

How to adjust timer?

MKara.17
Associate II

I am trying ti adjust the timer2 of the stm32f4 to 400khz​ but it does not work. Even though my calculations on Prescaler and counter are right for the frequency that i aim for, Timer is not working as it should be. By the way i am using Hal library.

5 REPLIES 5
Ramazan Gülcan
Associate III

Hi;

We can be more helpful if you can add CubeMX and its codes.

That's unfortunate, the parts are working fine for me. Perhaps you're doing something wrong, hard to tell with level of detail furnished. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

F4 has two buses, APB1 and APB2, they can have different frequency. Do you know to which bus your timer belongs?

-- pa

I should check it but it was apb2.​

MKara.17
Associate II

Actually i could not do it with stm32f103 too. So basically i have problems about timer. If you guys have any kind of high frequency timer code can you share?