2021-05-13 07:21 PM
I have an STM32L432KB that I'm trying to use with STM32CubeIDE and an ST-LINK v3. It is on a small board, and the onboard hardware peripherals connected to the MCU are:
The debugger is connected to:
I haven't tried to see if the peripherals work yet because I'm just trying to get it debugging reliably. About 1 time out of 10 tries, it will break on main correctly, allow me to step through for a while, then usually will lose connection. When it loses connection, it usually loses it around
MX_USB_DEVICE_Init();
or sometimes
SystemClock_Config();
The other 9 out of 10 times, it does not break at all. When this happens, the IDE automatically opens a tab right after debugging begins and switches to the file called
startup_stm32l432kbux.s
but it does not break on any line in this file, except that this line is always highlighted for some reason:
Reset_Handler:
ldr sp, =_estack /* Set stack pointer */
If I pause execution, it will open yet another tab with the name of a memory address, for example:
0x1fff133c
and has the message:
Break at address "0x1fff133c" with no debug information available, or outside of program code.
So the program seems to have gone off into never-never land, assuming the debugger is reporting things accurately.
Note that if I just flash the board and run some code I've written to print serial messages via the USB CDC driver, it works fine. I just cannot figure out why I'm having these debugging issues.
Other details:
Solved! Go to Solution.
2021-05-13 08:09 PM
Make sure PH3/BOOT0 is pulled low externally, or you adjust Option Bytes
2021-05-13 08:09 PM
Make sure PH3/BOOT0 is pulled low externally, or you adjust Option Bytes
2021-05-13 08:16 PM
Worked perfectly. Thank you so much!