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.
2025-06-08 1:57 PM
Great!!! This solved the problem I got with "Target is not responding, retrying...". But the pin is still not being set to high. After debugging I was able to see that the MX_GPIO_Init() never gets reached.
It always falls into the errorHandler from this part of the main:
/* 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 */
Can I just comment this part or what happens here exactly?
2025-06-08 2:42 PM
That waits until CPU2 boots and enters stop mode. Or if that doesn't happen, it times out and enters the error handler.
If you don't have code on the CM4 core, unlikely it's going to enter stop mode.
This is user code, delete it if you don't want it.
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!