36.5.12 I/O Lines Lock

When an I/O line is controlled by a peripheral (particularly the Pulse Width Modulation Controller PWM), it can become locked by the action of this peripheral via an input of the PIO Controller. When an I/O line is locked, the following fields in PIO_CFGRx/S_PIO_CFGRx are locked and cannot be modified:

  • FUNC: Peripheral selection cannot be changed when the corresponding I/O line is locked.
  • PUEN: Pull-Up configuration cannot be changed when the corresponding I/O line is locked.
  • PDEN: Pull-Down configuration cannot be changed when the corresponding I/O line is locked.
  • OPD: Open Drain configuration cannot be changed when the corresponding I/O line is locked.

Writing to one of these fields while the corresponding I/O line is locked will have no effect.

The user can know at anytime which I/O line is locked by reading the PIO Lock Status Register (PIO_LOCKSR) or Secure PIO Lock Status Register (S_PIO_LOCKSR) for locked Secure I/O lines. Once an I/O line is locked, the only way to unlock it is to apply a hardware reset to the PIO Controller.