Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 9 months ago.
Getting system clock results in 96000000Hz for a 48Mhz IC?
Hi,
I'm trying to just do some diagnostics and confirm what speed the internal clock is running at on my ST Nucleo F070RB.
I added a line of code which outputs the clockspeed but it reports back at 96000000Hz or 96Mhz but is incorrect. (It's a 48Mhz CPU).
I was wondering as to why this is and how to find out the actual speed the board is running at. (I've removed the 8Mhz clock so I know it's not using that).
Thanks - Ryan Walmsley
1 Answer
8 years, 9 months ago.
Print SystemCoreClock. To be sure you can call SystemCoreClockUpdate() first, but it should be correct without that.
Hi Erik,
The 96Mhz output was from printing the System Core Clock.
I've added the command you've suggested before printing this and got the same output.
posted by 11 Mar 2016Actually strangely enough when I test another one of the same boards I'm getting 48MHz....
posted by 11 Mar 2016Hi Erik,
Can you help on advising on how to set the core clock speed using the internal clock?
posted by 12 Mar 2016The Nucleo ones automatically switch to internal clock when there isn't an external one. Maybe thats a difference between your two boards? That one has internal and other one external clock? Although of course it still should not give 96MHz clock speed.
posted by 12 Mar 2016