Page 1 of 1

SWD Debug don't work correct with STM32F373CC

Posted: Thu Aug 01, 2019 1:08 pm
by Ostovary
Hi,

I have a board with STM32F373CC and SWD Debug with ST-Link V2.
The CubeMX Project is with FreeRTOS and booth CubeMx and FreeRTOS are the newest version.
When I start debug, the I can step few lines (~10) then the debug break and in the debugger window i see repeated messages:

[20.579] handlePacket(): Reading 0x4 bytes of memory from addr 0x8002c34
[20.579] write(): <652> Tx: $0a4b1b68#28
[20.579] read(): <652> Rx: $me000ed04,4#ef
[20.579] handlePacket(): Reading 0x4 bytes of memory from addr 0xe000ed04
[20.580] write(): <652> Tx: $0060c400#bd
[20.678] Device_GetStatus(): ST-LINK device status: RESET_MODE
[20.678] read(): <652> Rx: $qXfer:threads:read::0,bfb#fb
[20.678] write(): <652> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[20.679] read(): <652> Rx: $qXfer:threads:read::0,bfb#fb
[20.679] write(): <652> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[20.690] Device_GetStatus(): ST-LINK device status: RUN_MODE
[21.085] Device_GetStatus(): ST-LINK device status: RESET_MODE
[21.096] Device_GetStatus(): ST-LINK device status: RUN_MODE
[21.194] read(): <652> Rx: $me000ed2c,4#20
[21.194] handlePacket(): Reading 0x4 bytes of memory from addr 0xe000ed2c
[21.194] write(): <652> Tx: $00000000#80
[21.261] read(): <652> Rx: $me000ed28,4#f5
[21.261] handlePacket(): Reading 0x4 bytes of memory from addr 0xe000ed28
[21.261] write(): <652> Tx: $00000000#80
[21.273] read(): <652> Rx: $me000ed38,4#f6
[21.273] handlePacket(): Reading 0x4 bytes of memory from addr 0xe000ed38
[21.274] write(): <652> Tx: $60460020#92
[21.287] read(): <652> Rx: $me000ed34,4#f2
[21.287] handlePacket(): Reading 0x4 bytes of memory from addr 0xe000ed34
[21.287] write(): <652> Tx: $60460020#92
[21.495] Device_GetStatus(): ST-LINK device status: RESET_MODE
[21.506] Device_GetStatus(): ST-LINK device status: RUN_MODE
[21.907] Device_GetStatus(): ST-LINK device status: RESET_MODE
[21.918] Device_GetStatus(): ST-LINK device status: RUN_MODE
[22.330] Device_GetStatus(): ST-LINK device status: RESET_MODE
[22.341] Device_GetStatus(): ST-LINK device status: RUN_MODE
[22.735] Device_GetStatus(): ST-LINK device status: RESET_MODE


An the RESET_MODE, RUN_MODE messages come all the time, every second.
The IDE do as it would wait for input but the program is running in background because I see action on the device.

When I try to debug, the step command will jump to random position of the programm. Its impossible to debug.

I dont know, whats the problem and how to solve the problem.
Please help.

Thanks,
Osto

Re: SWD Debug don't work correct with STM32F373CC

Posted: Mon Aug 19, 2019 9:30 am
by Mattias Norlander
What optimization level did you compile this code with?
Is the code putting the device into any low-power mode?