Writing consecutive bytes in EEPROM causes "Target is not responding, retrying..."

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

mpalomo
Posts: 1
Joined: Mon Mar 11, 2019 8:57 am

Writing consecutive bytes in EEPROM causes "Target is not responding, retrying..."

Postby mpalomo » Mon Mar 11, 2019 9:04 am

Hi all. This is a failure report. Next I put the steps to perform to reproduce the error:

I'm using Atollic TrueSTUDIO for STM32 9.3.0 on my PC with Debian GNU/Linux 9.8, and I've generated a project for TrueSTUDIO with STM32CubeMX 5.1.0, and with the following configuration:

- Board Selector -> B-L072Z-LRWAN1
- Pinout & Configuration -> System Core -> SYS -> Debug Serial Wire (selected)

Then I add the following to the Src/main.c file in the project, inside the main() function, between the /* USER CODE BEGIN 2 */ and /* USER CODE END 2 */ comments (above the "while (1)" loop):

uint8_t *eeprom = (uint8_t*)0x08080000;
HAL_FLASHEx_DATAEEPROM_Unlock();
for (int n = 0; n < 6144; ++n) {
eeprom[n] = 0;
}
HAL_FLASHEx_DATAEEPROM_Lock();

If I write more than 2 consecutive bytes in EEPROM, the console for "ST-LINK_gdbserver" show:

Target is not responding, retrying...

If I write a lot more of bytes, like in the previous code, that message is repeated several times and very often the debugger session closes abruptly and Eclipse returns to the C/C++ Perspective. In this case, the console show something like this:

...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Error! Failed to read target status
Debugger connection lost.
Shutting down...

Debugging the same code with GDB in the terminal and OpenOCD as GDBServer does NOT have this problem. Debugging on TrueSTUDIO with J-LINK GDBServer does NOT have this problem. The bytes to write do not have to be zero, the problem occurs writing any value. I think the same thing happens if the writing is in the FLASH instead of in the EEPROM.

Please, correct this bug in "ST-LINK_gdbserver" to be able to debug with TrueSTUDIO in a reliable way.

Regards

Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 2 guests