cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1: Error in initializing ST-LINK device. Reason: No device found on target.

DMårt
Lead

 

I'm trying to program the STM32MP1 processor over the ST-LINK V2 probe.

But I'm facing some issues. My device cannot be found.

 

 

 

 

STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.

 

 

 

 

 

First of all, I have made my own STM32MP1 board (https://github.com/DanielMartensson/STM32-Computer) and my goal is to install Linux onto it. But I having some issues with that too. So therefore I will try to program it with ST-LINK V2 in debug mode.

Soldering of the pins:

  • Vcc is OK - The Red LED is blinking 5 Hz
  • GND is OK
  • NRST will shut down the blinking red LED of 5 Hz when NRST goes to GND = Good soldering of the BGA package
  • UART RX and TX pins is working
  • USB OTG pins is working
  • All BOOT pins are LOW. Only BOOT1 can be LOW/HIGH by change.

Software:

I have configure the Software Debug pins.

Skärmklipp.PNG

 

And the debug settings.

Skärmklipp.PNG

Other:

Even if I remove the cables that connect my ST-LINK V2 to the home made STM32MP1 board. I still get the same issue. So it seems that I don't have any connection, rather than NRST, VCC, GND, UART, USB etc. 

So it cannot be bad soldering, and it cannot be bad PCB routing. So what can it be then? It must be a software issue? Right?

Update:

I assume that BOOT2 must be 1 i guess? Well, I don't have that soldered, so I cannot use BOOT2 = 1. Right now, it's BOOT2 = 0, BOOT1 = 0, BOOT = 0. Only BOOT1 can be 1 or 0 depending on a switch.

So is there no walkaround for this?

I have heard that I could flash my CPU via the UART and also the USB OTG. But not sure how I can do that over STM32CubeIDE or STM32CubeProgrammer. 

I have also heard that it's possible to force the CPU to boot by changing the BOOT0/1/2 in software.

CubeProgrammer connect to UART interface - STMicroelectronics Community

If I try to connect UART to STM32CubeProgrammer when all BOOT pins are LOW.

  02:15:46 : Serial Port COM6 is successfully opened.
  02:15:46 : Port configuration: parity = none, baudrate = 115200, data-bit = 8,                     stop-bit = 1.0, flow-control = off
  02:15:50 : Timeout error occured while waiting for acknowledgement.
  02:15:50 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... 

  

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

HI @DMårt 

 

few clarifications

- STLINK is only for debug purpose (so should connect to at least SWD pins SWDIO and SWCLK and GND/VDD, you did not mention those ones)

PatrickF_0-1722606220091.png

- To use ST-Link to debug Cortex-M4 FW, you must be either

  - in production mode (i.e. Linux up and running from flash and M4 FW loaded thru USB SSH by CubeIDE). this is described in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware

  - in development boot (aka engineering boot), using BOOT[2:0] = 0b100

 

See https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#Arm-C2-AE_Cortex-C2-AE-M_debug_on_STM32_MPU_device

 

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
PatrickF
ST Employee

HI @DMårt 

 

few clarifications

- STLINK is only for debug purpose (so should connect to at least SWD pins SWDIO and SWCLK and GND/VDD, you did not mention those ones)

PatrickF_0-1722606220091.png

- To use ST-Link to debug Cortex-M4 FW, you must be either

  - in production mode (i.e. Linux up and running from flash and M4 FW loaded thru USB SSH by CubeIDE). this is described in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware

  - in development boot (aka engineering boot), using BOOT[2:0] = 0b100

 

See https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#Arm-C2-AE_Cortex-C2-AE-M_debug_on_STM32_MPU_device

 

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.