Skip to main content
dhillier
Associate
November 18, 2019
Solved

How to I fix STM32CubeProgrammer No STM32 Target Found after Programming Nucleo Pack MB1355C board?

  • November 18, 2019
  • 11 replies
  • 30247 views

I have an STM32WB55 Nucleo Pack and i thought i'd try out the BLE heartbeat monitor example on the MB1355C board, so i opened up the STM32CubeProgrammer, put the power selector to USB STL and could connect ok.

I Selected the hex file for the heartbeat monitor example and used the Automatic option to try to write it to the board. It said it finished writing to board N:1, connect board N:2 and hung. So i disconnected the board and plugged it back in and i noticed not much was happening, and i couldn't see the bluetooth device using my phone, so i tried to connect it back to the STM32CubeProgrammer and i noticed it would no longer connect.

If i open the cube programmer, and select "Firmware Upgrade" no device appears. However, if i click the button that says "Open in Update Mode" the board resets, device information appears and i can upgrade the firmware.

The board still mounts like a drive and i can still drag files into the drive which magically disappear after the board is reset.

Can anyone point out where i went wrong, and how do i fix it.

Thanks.

Best answer by dhillier

Ok, i got it.

If i set the ST-LINK configuration to:

  • Mode: Normal
  • Reset Mode: Software Reset

Then, I can successfully connect if I:

  • Press and hold the reset button on the board
  • Click the Connect button in the cube programmer
  • Release the reset button

However, i thought if i drag a hex file onto the drive the board creates, then it would load that hex file. This doesn't appear to be the case. I have to use the Cube Programmer.

11 replies

dhillier
dhillierAuthorBest answer
Associate
November 18, 2019

Ok, i got it.

If i set the ST-LINK configuration to:

  • Mode: Normal
  • Reset Mode: Software Reset

Then, I can successfully connect if I:

  • Press and hold the reset button on the board
  • Click the Connect button in the cube programmer
  • Release the reset button

However, i thought if i drag a hex file onto the drive the board creates, then it would load that hex file. This doesn't appear to be the case. I have to use the Cube Programmer.

Hbi.1
Associate
December 18, 2019

Hi dhillier,

Have you solved your problem yet?

I have the same issue with my stm32wb55 nucleo board. try to connect it to cubeProrammer v2.0.0 and got "no stm32 target found". and also can't close the cubeProgrammer app.

I tried your method above but useless.

if you have solution, please help.

dhillier
dhillierAuthor
Associate
January 15, 2020

My solution above worked for me.

The other issue i had was the USB cable. I had one which worked fine for charging power banks but not for communication with the board. I would try another cable, and retry what i posted as the solution above.

RTrip
Visitor II
February 10, 2020
STM32Fan1
Visitor II
February 20, 2020

Hi

I experienced same issue with HeartRate project for STM32WB cube

This project use low power mode

After first flash, I guess the ST-LINK enter a race to get a grab on the MCU with the internal firmware (and loose...even if CONNECT UNDER RESET is used)

Solution from dhillier by pressing RESET, more or less change the startup timing and could work but I cannot reproduce

So I made a more "drastic" solution

Set NUCLEO in DFU mode

> Jumper between CN7 5 and 7 (Boot 0)

>Power supply from STM32WB USB (not ST link) > 5V sources form J2 change one row

Plug USB cable to STM32WB USB

connect with cube programmer with USB DFU

Erase most sectors (some are protected where FUS is located...)

Revert NUCLEO setting to initial (remvoe boot0 jumper and 5V source from ST LINK)

Then to avoid further issue

I deactivate LPM in project setting in app_conf.h

#define CFG_HW_RESET_BY_FW     1

#define CFG_DEBUGGER_SUPPORTED  1

after rebuild, I can flash, debug, re-flash with no further problem...

I hope this will help you

happy debugging !

Nata
Associate
July 27, 2020

Hello!

Thank you for your suggestions. After I programmed the the heart rate demo I was also unable to reflash the board "No STM32 target found!", but used the external 5V supply on CN7 and moved jumper JP1 "USB STL" (default) to JP1 "5V EXT". Then used the STM32CubeProgrammer and used the ST-Link to reflash (no DFU mode). Removed external supply and placed back the jumper to "USB STL".

Best regards

Natalia

WGong.2
Visitor II
June 4, 2021

Thanks STM32Fan and Nata!

Using the "User USB" instead of external 5V supply also works.

a.gajdacs
Associate II
October 21, 2020

Simple: set mode to "Under Reset".

RAlve.1
Visitor II
February 26, 2021

Simple: Connect in Power Down mode and erase or program again.

jmorris
Visitor II
March 8, 2021

As this comes up first in google, I'd like to show how I fixed mine as none of the above worked. This is actually explained in the st-nucleo board docs in a sub note (somewhat hard to find).

  1. pull BOOT0 high
  2. reset board
  3. then use the ST flash tool to erase all flash.
  4. remove the BOOT0 pullup

All fixed (at least for me).

AColl.5
Visitor II
December 19, 2021

I know this is an old thread but it's also the top search result for me so I thought I'd add my experiences in the hope that they help others.

I got round the problem by setting the boot jumpers to boot in UART mode but then connecting through ST-Link as normal, downloading the image and then resetting the jumpers but this solution didn't last. The next time I tried to re-flash the unit, the problem returned.

The problem was caused by my code having this in the main loop...

	 HAL_PWR_EnterSLEEPMode(0, PWR_SLEEPENTRY_WFI);

I recoded that and it hasn't gone wrong since.

Cheers.

AAlzh.1
Associate II
January 13, 2023

Thanks man ! That worked :)

I knew that I didn't fry the board, but it got locked and don't respond to the programmer.

AAlzh.1
Associate II
January 13, 2023

Now it worked, but is it every time I have to do this ? Is there anyway to let get back to original boot setup ?

Piranha
Principal III
January 14, 2023

Is it so hard to read the post by @a.gajdacs​ ?

AAlzh.1
Associate II
January 14, 2023

Yes, I did that, but before I did anything to the board, it used to connect directly in cubeprogrammer without pressing the reset button, then I got the problem of not responding, and I read the solution in this thread which is by pressing the reset before selecting connect.

But my question is there a way to get the board to connect without pressing reset ?

Also, it used to program directly in Arduino IDE, now it doesn't even with pressing reset or the boot0.

I want to know what bootloader was in the board which let it to program in the Arduino IDE ?

January 17, 2023

Hi.

I am using a cube programmer to flash the STM32H723ZG controller. I am using the boot_0 pin to put the controller in boot mode. Before putting it in boot mode I have the application code printing out serial input at UART3 RX to TX. i.e if I send a byte from the serial terminal to the STM PD9 pin which is UART RX, STM will echo that byte on UART TX pin PD8. PD9 and PD8 can be used to flash in UART boot mode.

On connecting with the cube programmer I am getting the below error message

Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

Post link deleted to adhere community guidelines.