35.12.3.4 Secure Access Rights (Only on Devices with Security Attribution)
Non-secure write to the CTRL, EVCTRL, or NONSEC register is prohibited.
Non-secure read to the CTRL or EVCTRL register will return zero with no error resulting.
Non-secure write to a bit of the DIR, DIRCLR, DIRSET, DIRTGL, OUT, OUTCLR, OUTSET, or OUTTGL register is prohibited if the corresponding bit in NONSEC is zero.
Non-secure write to a PINCFGn register or to a PMUXn register field, either directly or through a write to the WRCONFIG register, is prohibited if the corresponding bit in NONSEC is zero.
The DIR, DIRCLR, DIRSET, DIRTGL, IN, OUT, OUTCLR, OUTSET, or OUTTGL bit, PINCFGn registers, or PMUXn register fields relating to secure I/O pins (that is, the corresponding bits in NONSEC are zero), read as zero in non-secure mode, with no error resulting.
INTFLAG.NSCHK is set to 1 when the NSCHK and NONSEC registers values are different. Writing a 1 to INTFLAG.NSCHK will clear it and clear the PORT interrupt if enabled.
Secure code should initially write a 1 for all non-secure pins into both NONSEC and NSCHK registers. Then, whenever secure code writes a different value into NONSEC, INTFLAG.NSCHK will be set to 1 and a PORT interrupt will occur, if enabled. The non-secure code can then compare the values of the NONSEC and NSCHK registers to determine which PORT pins have just changed to secure or to non-secure. It should then copy the current NONSEC register value into NSCHK.
