2024-04-19 03:25 AM
Every time I hit "RUN" to send the code to my board I get the following annoying error. The board still receives the code but I want understand why this is happening and how to solve this problem.
I am programming a NUCLEO f303Re board using STM32CubeIDE v1.15 on a MacOs with Ventura.
This error shows up no matter the code that I send to the board.
Here is the Error :
Open On-Chip Debugger 0.12.0-00029-gf77e7cb03 (2023-12-15-13:29) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J44M29 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.277318
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x2ba01477
Info : [STM32F303RETx.cpu] Cortex-M4 r0p1 processor detected
Info : [STM32F303RETx.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for STM32F303RETx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : [STM32F303RETx.cpu] external reset detected
Info : accepting 'gdb' connection on tcp/3333
[STM32F303RETx.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005e0 msp: 0x20010000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : device id = 0x10036446
Info : flash size = 512 KiB
Info : accepting 'gdb' connection on tcp/3333
[STM32F303RETx.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005e0 msp: 0x20010000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
[STM32F303RETx.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005e0 msp: 0x20010000
Info : dropped 'gdb' connection
shutdown command invoked
Info : dropped 'gdb' connection
2024-04-19 03:40 AM
Does your code put the microcontroller into sleep and/or deactivate the SWD lines?
2024-04-19 03:45 AM
I don't think so.
This happens even if send the code to the board without configuring anything in the .ioc file and without modifying the autogenerated code.
2024-04-19 03:59 AM - edited 2024-04-19 04:01 AM
Putting the microcontroller into sleep (possibly also deactivating the SWD lines) would be done in user code rather than autogenerated stuff.
EDIT:
What if you try just a simple "blinky" example?
2024-04-19 04:10 AM
Sincerily I am kind of a newbie and I wouldn't even know how to put the microcontroller into sleep or how to deactivate the SWD lines.
I get the error message even with simple blinky stuff.