Unused Pins

All digital I/O pins are by default floating to avoid hardware conflicts. However, since the pins have digital input buffers it is important to ensure that the level on an I/O pin is well-defined to avoid sporadic internal switching and leakage. The leakage caused by floating I/O is relatively small and is mainly observable in sleep, but can be minimized by enabling the internal pull-up. Using an external pull-up is also an option.

In addition, disabling the digital input buffer on unused pins will further lower the power consumption. This is also true for pins connected to an analog peripheral, e.g. the ADC. Both disabling of the digital input buffer, and enabling of the internal pull-up can be done in the PINCTRLn registers for the individual ports. Refer to the corresponding data sheet for details.