The Pin n Configuration register (PORT.PINnCTRL) is used to configure inverted I/O, pullup, and input sensing of a pin.
All input and output on the respective pin n can be inverted by writing a '1' to the Inverted I/O Enable bit (INVEN) in PORT.PINnCTRL.
Toggling the INVEN bit causes an edge on the pin, which can be detected by all peripherals using this pin, and is seen by interrupts or events if enabled.
Pullup of pin n is enabled by writing a '1' to the Pullup Enable bit (PULLUPEN) in PORT.PINnCTRL.
Changes of the signal on a pin can trigger an interrupt. The exact conditions are defined by writing to the Input/Sense bit field (ISC) in PORT.PINnCTRL.
Interrupt Type | Fully Asynchronous Pins | Other Pins |
---|---|---|
BOTHEDGES | Will wake the system | Will wake the system |
RISING | Will wake the system | Will not wake the system |
FALLING | Will wake the system | Will not wake the system |
LEVEL | Will wake the system | Will wake the system |