5 years, 6 months ago.

one more noob`s question

Hello I try to make with mbed compiler simple blink program (just from standard one). I choose correct platform, make all as in tutorial. Install newest drivers. I use stm32f103rb nucleo board. When I write bin file green/red led at programmer side of the board start blinking. Push reset button... and nothing!!! Program don`t start. I thought that it because there is no quartz at the board, but just before it blink (with fabric program). Then I made project with stm32cube&keil and it start working! So in case of this I have 2 questions: 1) What`s wrong with mbed? 2) Where to check in mbed lib which clock generator it use?

Best wishes! Hope for Your help!

I have just checked my nucleo F103 and it does not work, with rev 96 of the mbed lib, but does work with rev 95. I also noticed that the bin file was appox 3KB larger!!!! For rev 96.

posted by David Fletcher 30 Mar 2015

This gives some info on system clock:


I have not tried to figure out how it decides if the clock it tries is OK, but for you board I think it is in:


There is a statement at the end of SetSysClock() that you can uncomment to get it to output the system clock on the PA8 pin - I have used that, but on a different Nucleo board - I don't have a F103.

posted by Andy Wood 01 Apr 2015

2 Answers

5 years, 6 months ago.


Yes, try to output the clock on the MCO pin first.

On recent Nucleo boards, the MCU is clocked by the MCO coming from the STLink part of the PCB.

If you have an older board, this connection is not done and the MCU is clocked by the internal oscillator (HSI).

In both cases you don't need an additional xtal.

The MCU clock configuration is automatically managed in SetSysClock function in: libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/system_stm32f1xx.c


5 years, 6 months ago.

Hi,I‘m Michella from Shenzhen ,China. Do you need any products?

My email: littlefang_ing@hotmail.com Skype: michella_fang WhatsApp: +86 13026668639 Sell integrated circuits& smart watches& car dvr etc digital products. Welcome to contact me!

Best regards, Michella