2024-07-03 12:17 PM
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!
2024-08-05 03:28 AM
Hi @trieunguyen ,
ST-Link Utility is NRND. It doesn't support STM32H7Sx devices. You need to use STM32CubeProgrammer.
With that tool, make sure that required jumpers are properly set. You can also refer to this article: How to solve debugger connection issues.
-Amel
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.
2024-08-05 08:39 PM
Thank you! I will look into this later. For now, I bought a nucleo-h755 and don't use nucleo-h7s3 anymore. On nucleo-h755, I configured the clock to high and sometimes I set the power configuration incorrectly which caused it to brick, but then I mass erased its flash and it came back to normal. This seems to be a bit like the problem on nucleo-h7s3, the difference is that erasing all the flash of nucleo-h7s3 doesn't solve the problem. Anyway, I don't use nucleo-h7s3 now.