Hi Petr,
Were you able to flash the MCU once? Maybe the problem is related to the SWD connection and not with the configuration of the pin, the recommended SWD connection is the following:
It is also recommended to place a 100 nF capacitor in the RESET_b pin close to the MCU for transient protection and an external 4.7 kΩ to 10 kΩ pullup resistor.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------