2025-03-18 6:08 AM
I am new to using stm32 MCUs and I was following a youtube tutorial on how to set up a debugger for dual core MCUs. Before changing some settings I was able to start the debugger without any errors. Now when I try to run the debugger I get this error window popup:
'Launching file_CM4 Debug' has encountered a problem.
Error in final launch sequence:
Failed to start GDB server
When I click on details I get:
Error in final launch sequence:
Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.
I also noticed that when I plug the controller in the USB port and open NOD_H755ZIQ in This PC, it has 4 files (it had 3 files before). New file is called FAIL.TXT and it says:
The interface firmware FAILED to reset/halt the target MCU
This is the youtube tutorial that I followed : https://www.youtube.com/watch?v=jI1k6p-fduE
Can anyone help me with this?
Is it possible to fix this problem or do I need to buy a new board?
Thanks in advance.
Solved! Go to Solution.
2025-03-18 3:47 PM
@david027 wrote:
In the meantime i have read a post where "Solution 2" solved a similar problem. The problem is that my board doesn't have a BOOT0 button.
On NUCLEO-H755ZI-Q board the BOOT pin is available on CN11/Pin 7.
From UM2408 / Table 19:
How to use it:
2025-03-18 6:23 AM
Connect with STM32CubeProgrammer and ensure the CM4 core is enabled in option bytes (BOOT_CM4).
2025-03-18 6:45 AM - edited 2025-03-18 6:47 AM
Hello @david027 and welcome to the community,
You've started with a relatively complex STM32 with dual core! This is not easy for someone new on STM32 MCUs.
Meanwhile, what board are you using? ST board? if yes, which one? if NUCLEO-H755 it needs to be set to DIRECT SMPS.
or custom board? If yes, what is the power configuration?
The debug is a bit tricky mainly because CM4 enters the low power mode:
I suggest you to comment out these lines on CM4:
HAL_PWREx_ClearPendingEvent();
HAL_PWREx_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFE, PWR_D2_DOMAIN);
And for CM7 comment out these lines:
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}
Please refer also to this article.
2025-03-18 9:56 AM - edited 2025-03-18 9:58 AM
Thanks for reaching out. I am using NUCLEO-H755ZI-Q. I don't think that commenting out the parts of the code will help because i have no way of uploading that code to the board. I have read the article which you provided and i think it could work because i remember changing the SupplySource in RCC Mode and Configuration from PWR_DIRECT_SMPS_SUPPLY to PWR_LDO_SUPPLY. I have also read the comments under the article where someone mentions that i need to make some modifications before running the board at 480MHz, when i started the project i set the timer in clock configuration to the maximum frequency of 480 MHz without any modifications.
I would like to try the "Solution 1" from the article but I am scared of causing permanent damage to the board.
Can you please explain the "Solution 1" in more detail, and sorry if I am being annoying
2025-03-18 12:32 PM
@david027 wrote:
I would like to try the "Solution 1" from the article but I am scared of causing permanent damage to the board.
Can you please explain the "Solution 1" in more detail, and sorry if I am being annoying
There is no risk on both solutions. What is not clear? I think the article described it in details.
2025-03-18 2:36 PM - edited 2025-03-18 2:40 PM
I am having trouble with step 3. When I release the reset button i usually get:
Error: ST-LINK error (DEV_TARGET_CMD_ERR)
and if i hold it a bit longer i get:
Error: ST-LINK error (DEV_TARGET_HELD_UNDER_RESET)
One time I managed the get full erase going but it stayed at 0% for a couple of minutes.
Is there a way to know when to release the reset button?
In the meantime i have read a post where "Solution 2" solved a similar problem. The problem is that my board doesn't have a BOOT0 button. I also read that if i don't have a BOOT0 button i need to connect some pins, but i didn't try that because i didn't want to risk frying the board
2025-03-18 3:47 PM
@david027 wrote:
In the meantime i have read a post where "Solution 2" solved a similar problem. The problem is that my board doesn't have a BOOT0 button.
On NUCLEO-H755ZI-Q board the BOOT pin is available on CN11/Pin 7.
From UM2408 / Table 19:
How to use it:
2025-03-18 4:31 PM
This solved the problem in about 2 minutes.
THANK YOU SO MUCH!!!! You just saved the entire project. I will name my robot mƎALLEm.