stm32l431 SWD only connects at 5 kHz
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!
