10 years, 1 month ago.

wait timer

which hardware timer is used to generate the wait ? After changing the CPU speed the wait function is not corrected. SystemCoreClock is right and a call of us_ticker_init(); don't fix it.

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F401RET6 microcontroller.

2 Answers

10 years, 1 month ago.

us_ticker_init is made to only be able to run once. Either change it in the original startup file, or make sure no wait/timer/etc are called before your function to change the CPU speed.

10 years, 1 month ago.

After diving some time thru the mbed source : Timer5 is used to generate the us_ticker which is also used for wait(). All other timers are free to use.