How to correctly program STM32H755
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-07 3:32 PM
Hi
I'm having troubles programming the stm32h755zit6 on my selfmade PCB. The schematics should be right, as i am able to programm the STM32. But if i run a simple code inwhich a certain pin should be pulled up high, it just won't work. Therefore I thought about debugging the code to see whether it reaches the part inwhich the GPIO-function is called. But instead it doesnt and ends up in a error_handler. Afterwards i somehow am not able to reprogramm the STM32H755 anymore as the message following message appears:
stmicroelectronics st-link gdb server. version 7.10.0 copyright (c) 2025, 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 initwhile : enabled target no device found error in initializing st-link device. reason: no device found on target.
I have no done this over and over again three time an i always had to desolder the old uC and solder a new STM32 on my PCB, only for it to get the same result. Now I ran out of STM32s and thats why i need your help.
Its probably not possible to solve this problem without any code or schematics, so please tell me what you need. :D
Thanks in advance!!!
Kind Regards
Dominic
Solved! Go to Solution.
- Labels:
-
STM32H7 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 3:05 PM
Thanks a lot this now fully solved my problem(s) and the pin is set to high. So now I can start with programming the real code.
To Summarize what I did for others:
1. VCAP and VSS were connected falsely --> solved "Target no device found"
2. under Pinout & Configurations > System Core > RCC > Parameter Settings > Supply Source > PWR_LDO_SUPPLY --> solved "Target is not responding, retrying..."
3. deleting the following code:
/* USER CODE BEGIN Boot_Mode_Sequence_1 */ /* Wait until CPU2 boots and enters in stop mode or timeout*/ timeout = 0xFFFF; while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0)); if ( timeout < 0 ) { Error_Handler(); } /* USER CODE END Boot_Mode_Sequence_1 */
--> solved being stuck in Error_Handler();
Many thanks to @TDK and @MM..1 you are some true heroes and I appreciate your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-07 3:57 PM
> Its probably not possible to solve this problem without any code or schematics, so please tell me what you need.
Schematic would help. Code would help.
Should be able to recover by pulling BOOT0 high during reset.
> ends up in a error_handler
The call stack should tell you exactly where it "crashed".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-07 5:18 PM
VCAP capacitors are critical to general functionality.
I'd recommend using the Error_Handler() method passing __FILE__, __LINE__, it will save you a lot of time,and works in the field and for those without a debugger attached.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-07 8:45 PM
Power cycling with BOOT0 strapped HIGH can be very effective at recovering H7 you've gotten into a bad/broken state. It stops YOUR code from running, and clears issues with LDO vs SMPS and VOS
Get a serial port working so you can output useful/helpful diagnostic information.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 1:22 AM
Schematic would help. Code would help.
I have attached the schematics.
The code is basically a bare STM32H755ZIT6 project inwhich I have tried to set pin PF11 to high. In RCC I have once tried without HSE and once with HSE Crystal/Ceramic Resistors
I am able to program the whole code but I am unsure how to handle the programming with two cores.
And as mentioned, each time I tried to debug the code and determine where it gets stuck, I somehow end up getting the following error message and I am not able to programm the STM32 anymore.
In STM32CubeIDE:
STMicroelectronics ST-LINK GDB server. Version 7.10.0
Copyright (c) 2025, 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
InitWhile : Enabled
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
in CubeProgrammer:
error: unable to get core id
error: No stm32 targe found! If your product embeds debug authentication, pleae perform a discovery using debug authentication
Firstly:
I actually was able to determine where the code was getting stuck prior to this error. As it seems to have gotten into the errorHandler by this code:
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/* Wait until CPU2 boots and enters in stop mode or timeout*/
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}
Secondly:
I have also tried to Boot the stm32 after this error by doing the following:
1. BOOT0 to high with a jumper-wire
2. Pressing and holding the reset button.
3. Trying to run the code and immediately release the reset button.
But i get the same message as prior.
As mentioned I am unsure if i programm the stm32 correctly, as i just have opend the main.c of cm7 and then press "run". I have seen others selecting both cm4 and cm7 folders/files in the right bar and then pressing "run".
I have also checked the voltages near the SWD-Connector and its pullups. And they are all as expected. Also when pressing the RST button the voltage drops to 0V and if I connect boot0 to High, it also get to 3.3V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 1:25 AM
@Tesla DeLorean wrote:VCAP capacitors are critical to general functionality.
So would you suggest to measure all the VCAP voltages for 3.3V?
@Tesla DeLorean wrote:I'd recommend using the Error_Handler() method passing __FILE__, __LINE__, it will save you a lot of time,and works in the field and for those without a debugger attached.
What do you mean by that, I've never heard of __FILE__, ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 1:28 AM
I've tried setting BOOT0 to high to recover the H7 with the following steps:
1. BOOT0 to high with a jumper-wire
2. Pressing and holding the reset button.
3. Trying to run the code and immediately release the reset button.
But I have received the same message as before. Was this sequence right?
But at the moment I have soldered a brand new STM32H755ZIT6 onto the PCB and I just wan't to prevent it from doing the same, do you have any idea how?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 6:47 AM
VCAP3 should be connected to the other VCAP pins.
VSS/VSSA pins should be connected directly to ground.
Getting started with STM32H74xI/G and STM32H75xI/G MCU hardware development - Application note
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 6:54 AM
Thanks a lot, could this solve the other problem I had with not being able to programm the stm32 anymore after debugging, or might this be something else you noticed?
Because I only have on brand new STM32H755ZIT6 left and I don't want it to get the same results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-08 7:18 AM
Method BOOT0 high require use STMCubeProgrammer GUI app no IDE in no STLINK mode. Choice interface and use it for connect more info AN2606. Simple is use USART RX TX or USB DFU ... Pins is listed in appnote.
