cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H7S3L8H has difficulty connecting st-link and executing the program

trieunguyen
Associate

I just bought a NUCLEO-H7S3L8H kit. I have successfully tested a few demo programs, for example "\STM32Cube_FW_H7RS_V1.1.0\Projects\NUCLEO-H7S3L8\Examples_LL\USART\USART_Com_Rx_IT_Continuous_VCP_Init\MDK-AEx". Then I create a simple project with STM32CubeMX, configure GPIO to read button and then control LED, system clock is 600MHz. I used the Keil ARM compiler, compiled the program with no errors and no warnings, loaded the program successfully but when I pressed the button, LED did not light up as expected.

I changed my code, debugged many times. It took me a long time to figure out why some lines of my code couldn't be executed, until I realized that STLINK Utility couldn't connect to Nucleo:

"Can not connect to target!

If you're trying to connect to an STM32W1xx device, please select Normal or HotPlug mode from Target->Settings menu.

If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu."

All 3 modes: Normal, Hot Plug, Connect Under Reset of STLINK Utility do not help it connect to Nucleo.

Because I tried to fix the problem with not much experience, after about 2 hours I could not remember the sequence of events. Let me present some things that happened and what I did like this:

I have Upgade Firmware for ST-Link V3 on Nucleo (successfully) using ST-LinkUpgrade (STSW-Link007) and MXCubeProgrammer. These 2 tools update 2 different Firmware versions! Keil ARM sometimes connects successfully, sometimes cannot connect to Nucleo.

STLINK Utility is always helpless: "Can not connect to target..."

With MXCubeProgrammer, usually all 4 modes: Normal, Hot Plug, Under Reset, Power down can help MXCubeProgrammer connect successfully with Nucleo but come with a warning: "Connection to AP 0 requested and failed, Connection established with AP 1 "

I fully erase the flash memory using MXCubeProgrammer.

There are times when MXCubeProgrammer cannot connect to Nucleo, the message is: "No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication".

Sometimes, the ST Link's Status light is very weak (check for low power voltage ~0), I unplug the USB jack and then plug it back in.

Some times, MXCubeProgrammer can only connect to Nucleo in Power down mode. And it seems that with this condition, Keil was not able to connect to Nucleo. Then I download the demo program "USART_Com_Rx_IT_Continuous_VCP_Init" using MXCubeProgrammer and successfully, the program ran correctly. Then I downloaded the GPIO program with Keil ARM and it was great that it ran (not that the GPIO code was defective). MXCubeProgrammer is now also connected to all 3 remaining modes.

At times it was quite bad that the Power down mode did not make the MXCubeProgrammer connect to the Nucleo, (perhaps this was also the case when I unplugged the power).

What is the root problem? Or what documents do I need to read? Can someone help me solve the problem, I sincerely thank you!

0 REPLIES 0