8 years, 1 month ago.

Blink_Color_LED not running

Hello,

Just got my first mbed board (the ST Nucleo F411RE). 1. Downloaded and installed driver 2. Downloaded ST-Link firmware 3. Connected board 4. Installed firmware successfully 5. Imported the Blink_Color_LED program 6. Compiled 7. Dropped the .bin file onto the drive (NODE_F401RE). 8. Pushed the Reset button on the board

I still see the default programming (blinking LED) running. In addition, I find that when I unplug the USB, the .bin file disappears from the Nucleo "drive".

Question relating to:

ST
A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

1 Answer

8 years, 1 month ago.

Hello Shiv.

1) Would you share the exact location of the Blink_Color_LED program that you imported ?

2) Be sure that you are also using the latest mbed library by selecting the mbed label in your project tree -> right mouse-click and then Update (see right side of your IDE / compiler screen).

3) If the project is not native to your target board then you must manually change the port pins for the color LED to suit the program logic. That is, different target boards have different free port pins and even more confusing, different port labels.

4) Did you add an external color LED to this target board or is it onboard from the factory ? We may have the same board in the lab so can confirm upon request.

5) Your observation is correct in that after you drag & drop the compiled binary onto the MBED drive letter - the onboard LED will flash for a few second to digest and flash your code into the local CPU's memory. After this task is completed the flashing will halt and often will self-boot on its own to run your saved program. You should not have to manually reset the board but does not hurt. After this reflashing of the memory, the program does get removed from the MBED drive letter.

To clarify this detail - even though the program (binary) is not visible on the drive letter, the saved program is in flash and will auto-run upon each CPU reset. Proceed to repeat this code development -> compile -> save -> test cycle till you are happy with your program.

Suggest you test your project as follows:

a) import the very basic LED flasher program from here:

https://developer.mbed.org/teams/mbed/code/mbed_blinky/

Select the BLUE import box on the right side of the screen after landing on the above webpage.

b) the above LED blinky is using LED1 reference which is common to all MBED enabled target boards which makes your testing a bit easier to get started

c) be sure to update the mbed library on the project tree else you will have a static and perhaps out-dated mbed library linked to your project and often can break the program

Please test and report your results.

Kumar

--

Shiv - do you have the following add-on board for your Nucleo board ? The RGB led is onboard this add-on shield.

https://developer.mbed.org/components/mbed-Application-Shield/

Also, you created a fresh project and imported the blinky LED program and compiled the source code but it fails to blink the LED ?

Can you post the source code ? Be sure to use the '<<code>>' before your code and then '<</code>>' after your code so that the posted format is easy to read. See the Editing tips on the bottom right of the text box where you post your updates on this forum.

-

Hey Shiv. What is the exact filename of your compiled binary ? I recall some similar issues when we were using the same tools a few months ago and the solution was to watch your filenames. Try to name something simple like:

blink.bin ; as the target file as an example

Otherwise, review the latest update to reflash your target board for MBED use. We have not had to do this but pretty sure the details are around to allow for a fresh start.

Also, the blink.bin remains compatible for use on the target board using only the ST tools. Let me check around once we reach the office on the proper links. That is, the bin file is able to stand alone.

Hi Sanjiv, Thank you for your detailed answer. Really appreciate it.

I'll find the link to the program and post here and I'll also try the other steps you mention (updating the mbed library as you describe).

I've not attached an external LED. The flashing I'm seeing is really to do with the default program the board came with, where in, each time I press the user button the flashing changes speed.

I'll try the more basic Blink program and get back to you here. Also good to know some of the other things you mention about the .bin file disappearing being normal. I'll get time to play with this later this evening and get back to you with my findings.

Thanks

posted by Shiv Kumar 23 Mar 2016

Ok, so I tried the blink program you linked to and updated all libraries during the import. No change. The default program is still the program that is running.

The link to the earlier program is here: https://developer.mbed.org/teams/ST/code/Nucleo_blink_color_led/

I updated the mbed library in this program and but that didn't change anything either.

What can I try next?

posted by Shiv Kumar 24 Mar 2016

Hi Sanjiv,

I think what is going missing is the fact that the default program is not be overwritten by drag dropping the .bin file onto the Nucleo drive. All things considered (missing extension board, wrong LED pin etc.) I'd expect that the default program will be over written by the program I flash the board with. Irrespective of whether the code is correct or not (as long as it compiles).

Here is the code I'm using: http://developer.mbed.org/teams/mbed/code/mbed_blinky

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}
posted by Shiv Kumar 24 Mar 2016