6 years, 10 months ago.

Got the STM32F030R8, but led blink program does't work. Why?

The Program use:

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(0.2); // 200 ms
        myled = 0; // LED is OFF
        wait(1.0); // 1 sec

Compiling successfull, but moving the bin-file to the nucleo device (NUCLEO (F:)) has no effect. It seems, the program is loaded (blinking led at usb-side of the board). What went wrong?

Just to give some more information. Using the program "STM32 ST-LINK Utility" I got the following data in the upper right box "Device Information":

Device: STM32F301x

Device ID: 0x439

Revision ID: Rev A

Flash size: 64KBytes

There is a label on the nucleo: "NUCLEO-F302R8".

But otherwise this is called STM32F030R8, so I am a bit confused.

In the "STM32 ST-LINK Utility" I tried to run the code. Just go Target+>MCU Core ... and than start via Run button. But pushing the Halt button showes still all register 0x(null).

Did you update your firmware? http://mbed.org/teams//ST/wiki/Nucleo-Firmware.

posted by Erik - 03 Mar 2014

Yes, I updated the firmware as suggested. The mbed compiler showes in the upper right corner the sign for the F030R8. Are there any example code, that can be imported, that work like the inital distributed "blink" code on the device. Just to be shure, not to use the wrong libraries or headers.

posted by Bodo Koch 03 Mar 2014

Do you reset your board after loading the new code to actually run it? There is example code for the Nucleo that you can import: http://mbed.org/search/?selected_facets=obj_type_exact%3ACode+Repository&order_by=-import_count&q=nucleo, although it shouldn't matter.

One thing to make sure: Click on your mbed lib, then at the right side if there is an update button, update it. Then you are sure to have latest mbed lib, older ones might not yet have proper Nucleo support.

posted by Erik - 03 Mar 2014

OK, it's still the same. Are there any other ways to check things and to find out what is wrong? Thanks!!

posted by Bodo Koch 03 Mar 2014

So also not with the example code? Maybe someone who has the same board as you have can check if his works with blinking LED, and upload the .bin file.

I am out of ideas, so otherwise it might be better to mail mbed (somewhere on the site there is a support mail address, and link this question in your mail.

posted by Erik - 03 Mar 2014

Looking at ST's marketing page for the Nucleo range there are some unreleased STM32F3xx boards planned that are currently not supported by mbed. I suppose it is possible that your board is simply mislabeled, but could you check what it says on the main microcontroller. My F030 says "STM32F030". The example blinky works on mine.

What OS and web browsers are you using?

Are you saving the binary straight from your web browser or to your HD first and then copying?

posted by Stephen Paulger 03 Mar 2014

See answer below

posted by Sea Food 03 Mar 2014

1 Answer

6 years, 10 months ago.

Hi Bodo.

Looks like you were lucky enough to get in advance one of the few STM32F302-based Nucleo boards !

As said by Stephen, this board is part of the next batch of supported products, and therefore not yet handled by mbed.org.

If you wand to use mbed.org immediately, I strongly recommend to use an official board ! If you want to stick with STM32F302, then I recommend to connect of ST local sales office, and ask to early access to C libraries. But theses one will be much lower level versus mbed core. Up to you !


Accepted Answer

Great, I just need a full day to discover this be my own. Thanks, you showed me, I am right and I am a proud owner of the newest board :D

posted by Bodo Koch 03 Mar 2014

Please let me know by private message if you still want to use your F302 Nucleo (would be without mbed then)

posted by Sea Food 04 Mar 2014