2021-05-11 10:26 AM
I encountered a very weird behaviour when trying to erase the Flash memory of the STM32H745ZITx on the Nucleo-H745ZI-Q board using the STM32CubeIDE on Linux. While running the code:
HAL_FLASHEx_Unlock_Bank2();
for (int i = 0x0; i <= 0x7; i++)
{
FLASH_Erase_Sector(i, FLASH_BANK_2, FLASH_VOLTAGE_RANGE_4);
}
HAL_FLASHEx_Lock_Bank2();
I get the following debug output:
STMicroelectronics ST-LINK GDB server. Version 5.6.0
Copyright (c) 2020, 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
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0-RC1
-------------------------------------------------------------------
ST-Link Server is running on port : 7184
ST-LINK SN : 002200293137511239383538
ST-LINK FW : V3J7M2
Board : NUCLEO-H745ZI-Q
Voltage : 3,28V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : --
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7/M4
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7/M4
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_UhLEQ9.srec
File : ST-LINK_GDB_server_UhLEQ9.srec
Size : 39060 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.028
Verifying ...
Download verified successfully
(Read)Failed determine breakpoint type
CM4 Failed to read all registers
FAILED to REGISTER Values from the target
After this I do not get any more debug functionality of any sort (e.g. dynamic printfs, breakpoints etc.).
I generated the project and setup code with the IDE, so everything should be set up correctly, I only wrote code for the CM7 and also the code above is run on the CM7.
The weird part of this is that if I add a dynamic printf in the for loop, the code runs fine (there is still some debug messages, but the debug behaviour after the code is normal). The debug message, that remains (instead of the last three lines above):
(Read)Failed determine breakpoint type
Target is not responding, retrying...
Solved! Go to Solution.
2021-05-20 08:17 AM
Hi @TSaga.1 ,
Could you please check the following:
-Amel
PS: PS: Once your question is answered, please click on "Select as Best" for the comment containing the answer to your initial question.
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.
2021-05-20 08:17 AM
Hi @TSaga.1 ,
Could you please check the following:
-Amel
PS: PS: Once your question is answered, please click on "Select as Best" for the comment containing the answer to your initial question.
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.
2021-06-02 06:43 AM
Hi @TSaga.1 ,
Were you able to resolve the issue you initially described here? If yes, it will be interesting to share with us the solution you found.
-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.