7 years, 9 months ago.

Workflow with Online compiler

Hi,

long time ago I started with a mbed LPC1768 to make some rapid prototyping. My workflow was 1. Write program in online IDE 2. compile/download program 3 copy to mbed 4. reset/run program 5. take mbed to external power supply and run program to get/transfer sensor values

Now I didn't used it for a while and wanted to start a new try with a Nucleo F401RE and a BT Smart module.

I tried same workflow and everything worked find until reaching point 5.

If i switch off power supply by removing usb cable and take a usb power supply my mbed will not start. The only way is to "reprogram" by copying bin file again. Sometimes it doesn't work and I need to copy a bin file with an other name first.

What changed? Where is my mistake?

Regards Frank

2 Answers

7 years, 9 months ago.

You need to add a jumper on JP1 on the top of the board, close to the USB connector.

The STLink tries to negotiate the supply current from the USB host before to turn on the power for the board. If you use a power supply, there is no host and the negotiation fails, so no power for the nucleo board...

With JP1 on, there is no negotiation so you can run from an USB power block.

BR, Maxime

Thanks.. using JP1 works with external power supply. But I still have the problem that the devices deletes firmware if the STLink initialises.

Scenario: 1. Program the device 2. Connect to external power supply with JP1 3. Reconnect to pc with or wihout JP1 4. Need to reprogram

posted by Frank Weissenborn 07 Feb 2017

And if i "reprogram" by copy bin file I need to write dummy file with different name. I I use same firmware file it copies (blinking LD1 @ STLink) but doesn't start.

posted by Frank Weissenborn 07 Feb 2017

Then I suppose your computer OS is trying to write something on the STLink virtual drive when you connect it. This may erase the device memory. Look in your system if this can be disabled. What OS are you using? Could it be an antivirus or something like that?

posted by Maxime TEISSIER 08 Feb 2017
7 years, 9 months ago.

The Problem you have is that the ST-Link will only power youre application processor if it has a valid usb communication. This is what the manual says about it: "Note: In case the board is powered by an USB charger, there is no USB enumeration, so the led LD3 remains set to OFF permanently and the target STM32 is not powered. In this specific case the jumper JP1 needs to be set to ON, to allow target STM32 to be powered anyway."

So you wanna set JP1 then powering from a charger