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.
9 years, 3 months ago.
LED blink program does't work properly on STM32F030R8. Why?
main.cpp
#include "mbed.h" Serial serial(USBTX, USBRX); DigitalOut led1(PA_5); int main() { while(1) { serial.printf("Freq : %d Hz\r\n",SystemCoreClock); led1 = 1; wait(2); led1 = 0; wait(2); } }
Board : Nucleo-F030R8
Selected the target board as above. Complied this on mbed.org nice and clean. Got the bin file downloaded and copied on to the Nucleo drive.
All drivers installed on PC and a virtual com port is showing. Opened Hyperterminal and could see nothing on it. LED toggles, but the timing is very long. It take long time to switch on and same with off.
I have another board Nucleo-F091RC, I switch the target board and compile it and transfer the bin file to the target board and it works perfect. Prints the frequency as
Freq : 48000000 Hz
So, I am not sure that the problem is with Nucleo-F030R8. In fact, I tried to create a simple circuit to STM32F030R8 and I programmed it with STLINK with the same code that I used on Nucleo-F030R8, same result there too.
I would appreciate anyone input on this help me overcome this issue.
1 Answer
9 years, 3 months ago.
This problem with the mbed libraries and mbed-src for Nucleo 030R8 is known and officially reported.
Recent correct version is:
- Mbed ver.101
- Mbed-src ver.582
In newer versions up to the current, it does not work even the simplest blink demo.
https://developer.mbed.org/forum/helloworld/topic/17060/
https://developer.mbed.org/questions/60794/Nucleo-F030R8-simple-LED-blinky-not-work/
https://github.com/mbedmicro/mbed/issues/1329