3.1.1 Misconfiguration of the Microcontroller
Misconfiguration is one of the most challenging elements to troubleshoot. Even when starting from scratch, it’s easy to miss a setting or leave one on inadvertently. The I/O pins have this order to select the function of each pin, with the top item having the highest priority.
- Configuration Bit or Fuse Control - Controlled by Configuration bits or fuses
- Hardware Control - Controlled by a Peripheral. Frequently these are analog peripherals
- Peripheral Pin Select (PPS) - for PIC devices, PORTMUX - for AVR8 devices, and General Purpose I/O (GPIO) Control
Configuration bits and fuses are used to enable particular I/O functionality. There are a lot of possible signals that can fall into this category, depending on the device. Some examples include:
- JTAG Scan-Chain
- CRC-on-Boot Status (only present on some devices with CRC)
- CLKOUT
- ZCD or Oscillator I/O
In the case of Configuration bits and fuses, disabling the special functionality will revert the I/O to normal.
The next ranking element is hardware peripherals that directly control the I/O line, but not through Peripheral Pin Select (PPS) or PORTMUX peripherals. The peripherals with this ability vary, although frequently analog peripherals have this functionality. In this case, all (or select) I/O settings are ignored if these peripherals have active outputs. The data sheet section for the peripheral goes into more detail.
Finally, the I/O control falls to the Peripheral Pin Select (PPS) - PIC only, PORTMUX - AVR only, or General-Purpose Input and Output (GPIO) controls. PPS and PORTMUX allow for the routing of digital signals from peripherals to a selectable pin, rather than fixed outputs per pin. When PPS or PORTMUX is active, peripherals can bypass some (or all) of the standard GPIO controls. The data sheet section for the peripheral goes into more detail.