cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 IDE change prescaler and counter values using code only.

Killstreet30
Associate III

Hi,

I wanted to know how can we change the values of prescaler and counter period for a timer in STM32 using the code and not the UI. Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
gbm
Lead III

Read the description of timer in your MCU's Reference Manual. No magic, these operations are merely C assignments like TIMx->PSC = x;

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

View solution in original post

2 REPLIES 2
gbm
Lead III

Read the description of timer in your MCU's Reference Manual. No magic, these operations are merely C assignments like TIMx->PSC = x;

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Killstreet30
Associate III

Thank you!