2021-05-12 07:39 AM
I have a board with an stm32l431rc.
I have some sample code generated by CubeMX, and it boots up just fine.
I'm trying to work with zephyr v2.5.0. Zephyr has hal and pinctrl dtsi files for this MCU, so adding a new board was pretty straightforward.
I start with the MCU running the CubeMX code, then flash zephyr's trivial programs like blinky or hello_world. I see my changes, and everything is good. I can keep reflashing the MCU without issue.
However, if I power cycle the MCU while running zephyr code, SWD will only connect at 5 kHz. Once I use STM32CubeProgrammer to mass erase I can reconnect at 4 MHz.
I'm using ST-LINK/V2 with the latest firmware.
I saw this post and set RCC_HSICALIBRATION_DEFAULT to 0x10, but it didn't change the behavior.
Any advice on anything else to check?
Thanks!
Solved! Go to Solution.
2021-05-12 07:46 AM
Does you board clock slowly or use low power modes?
Do you connect NRST on the debug header? This is required for "Connect Under Reset" to actually work.
2021-05-12 07:46 AM
Does you board clock slowly or use low power modes?
Do you connect NRST on the debug header? This is required for "Connect Under Reset" to actually work.
2021-05-12 02:47 PM
@Community member ,
I appreciate your quick reply.
Doubled-checked my board today and confirmed NRST is connected.
However, I discovered line has a voltage problem.
Worked around the issue, and I can reconnect at 4 MHz.
Thanks