cancel
Showing results for 
Search instead for 
Did you mean: 

Can not load a *.bin

yota news
Associate
Posted on May 24, 2018 at 14:21

I already loaded some *.bin files, perfectly compiled with a perfectly functional tool chain.

But today it doesn't work anymore...

If I check with STLinkUpgrade 3.2.10, it tells me that the firmware is at version V2J30M21, which is also the last one.

When I try to flash the *.bin file with a simple drag & drop or copy-paste, the transfer seems to fail with the following error in the fail.txt file : The interface firmware FAILED to initialize the target MCU

What does it means ? how can I solve this ?

8 REPLIES 8
Tilen MAJERLE
ST Employee
Posted on May 24, 2018 at 14:47

Hello

news.yota

‌,

do you use any low-power features of the target MCU?

Best regards,

Tilen

Posted on May 24, 2018 at 14:49

Perhaps your firmware muddles with the PA13/PA14 debug pins, or goes into a low power or sleep mode?

Try using the ST-LINK Utilites to erase the firmware on the target.

Try pulling BOOT0 High so your code on the chip stops running.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Artur IWANICKI
ST Employee
Posted on May 24, 2018 at 14:55

Hello,

In case you have modified your debug pins / configure not used IO lines as analog in STM32CubeMX / have used low power modes (without wakeup) / overclocked your MCU, you can still erase/reprogram MCU configuring the debugger connection to 'connect under reset'. In this case once you try to erase/write into FLASH memory using debugger, it will first reset the MCU (blocking its code execution) and then perform the operation you want. This option is available in most of the toolchains. In STM32 STLink Utility you can find it Target->Settings->Mode

Best Regards,

Artur

yota news
Associate
Posted on May 24, 2018 at 15:11

Thanks all for your amazing feedback !

I didn't used low power features.

I'll test the BOOT pin tricks, but I mainly suspect an issue on the firmware update indeed... I don't use cubeMX (I'm on linux) but the STLinkUpgrade tool in java... and the revision V2J30M21 it offers doesn't seems to be the good one, for a reason I can't explain...

Next step may be to reboot under windows with the ST tool chain and try to understand what happened.

Artur IWANICKI
ST Employee
Posted on May 24, 2018 at 15:36

In the meantime I have checked and STLink v2.1 (tested on F401RE-Nucleo board) is connecting with 'connect under reset' option to the MCU.

Best Regards,

Artur

Posted on May 24, 2018 at 14:59

Is there a way of specifying 'connect under reset' when using the mbed drag-n-drop MSC ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 24, 2018 at 15:33

Older versions of the ST-LINK Utilities and stand-alone update utility will let you go backward in firmware versions.

Check also CubeMX settings for turning off or disabling debug, or ones to enable SWD/SWV

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AOnat
Associate

On a Nucleo, it could also mean that you simply forgot JP6 in the 'E5V' configuration and the processor is not powering up correctly!