8 years, 3 months ago.

How do I use external crystal (HSE) on nucleo F030

Stock nucleo 030 boards don't come with an external oscillator and I believe mbed configs have been done accordingly so as to generate a code which uses internal clock (HSI) once I hit the compile button. If I intend to put and external crystal, how do I configure mbed environment to use it? What changes need to be made in my code so that my compiled code supports the external oscillator?

1 Answer

8 years, 3 months ago.

The mbed code for nucleo should automatically switch between an external clock, an external crystal or the internal low accuracy RC oscillator. So no changes are needed. You could override that behaviour by replacing the mbed lib with the mbed source code and then modify that code. The boards are also not all identical. Check the revision. Some have a solderbridge installed that connects the 8 Mhz xtal from the st-link part of the nucleo to the target cpu as external clock. That should give you the same accuracy as an external xtal. Note that I have modified all my nucleo boards to use that option. Check the nucleo board manual to find the appropriate solderbridges.

Accepted Answer

Thanks a lot Wim. I'll try that out.

posted by Manish Kumar 27 Jul 2016

BTW are you facing any issues with newer mbed libs (121 particularly)? I couldn't even get blinky to run with this version. I posted a question but the results were inconclusive. Take a look if you want: https://developer.mbed.org/questions/70477/Latest-mbed-lib-causing-issues-with-Nucl/

posted by Manish Kumar 27 Jul 2016