Possibility to block SWD access on reset and enable it via software.
Hello,
I am currently using STM32L010 MCU in my application where we have UART and SWD lines exposed to be accessed only by service personnel (under a cover but still accessible without dismantling the device). Since we want to have a possibility to perform software update in the field, we want those SWD pins physically accessible.
We currently map those pins to GPIO in the start-up so that they cannot be used to debug the program while application is running, but still can be used to reprogram the chip by applying reset via MCU_RESET pin.
We want to block this access and enable this access only if certain command is received via UART (i.e. only when SWD is actively enabled via a command) and not even upon reset to avoid unauthorized reprogramming of our product.
Alternatively, if there's a way to block reset via MCU_RESET (unless it is activated by a command), that would also do the trick.
Is it possible to block SWD access even upon chip reset and activate it via software whenever wanted? Or is it possible to map MCU_RESET to another function until it is remapped to MCU_RESET via software?
Thanks in advance.
Ash
