symptom
Recently started learning STM32Cube, found that new construction can not debug normal, after HAL_Init (); you can not continue debugging after a pause, and let the program can not be stopped and other operations in the output window and continue to brush out.
ERROR: Can not read register xx while CPU is running
the reason
When new construction cube debugging features turned off by default, need to open
Solution
Found Debug> SYS inside switched JTAG (5Pins) and regenerate the code - in Pinout & Configuration -> System Core