10 years, 5 months ago.

Nucleo F302R8 Ticker class

I made solder bridge marking SB16 and SB50 to use 8 MHz crystal of the ST-LINK portion. Then, run the program genarating square wave of 5 kHz using Ticker class. But the frequency generated it is not 5kHz but about 5.62kHz. I think the library in official mbed is not correspond to external 8MHz crystal. Tell me solution.

Question relating to:

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

Did you update system clock configuration to reflect the crystal addition?

posted by Martin Kojtal 07 Jun 2014

1 Answer

10 years, 5 months ago.

Hello,

I confirm the problem. This is due because the SystemCoreClock variable is not well initialized when the us_ticker init function is called. The call to SystemClockUpdate() function is well done at iinitialization phase but the call to us_ticker init is performed before. I am going to fix it.

Thanks for having noticed this.

Regards.

Accepted Answer