I have a Nucleo-H723ZG board. The GPIO lock bits are set at reset so I cannot set up the ports. See Attached screenshot. I can run code just fine and the original demo code did toggle the LEDs.
I had always thought GPIOA clock was required to be enabled for SWD to be active and was therefore enabled by default. Testing it now, it clearly (a) isn't enabled by default and (b) doesn't need to be enabled for SWD to work.
"If you feel a post has answered your question, please click ""Accept as Solution""."
The exact effect of GPIO clock is not very clear from the documentation. I've seen hinted somewhere (in relationship to power consumption reduction), that you need it only to access the registers (which implies also that you need it to be able to read pins set as Input and change state of those set as Output), but once those are set e.g. to AF, you can switch the GPIO clock off - the muxes are set and the peripherals to which signals are connected use their own clock to sample or drive the signals.