2.2 I/O Pins

These components are used to enable the I/O operations the bootloader implements during execution.

Entry Pin: The Input Pin (Entry Pin) is generally used to control a push button or similar peripheral on the board that forces the bootloader into a boot-ready state. This is normally done through an electrical signal that is sent to the MCU from the port that the Entry Pin is connected to. This functionality is often used during development, but it is usually not the best solution for the field. The system needs to be built to be able to move back and forth from the bootloader to the application without the user needing to force an entry.

Indicator Pin: The Output Pin (Indicator Pin) is used to tell the bootloader user what state the bootloader is currently in by blinking or not blinking an on-board LED. The Pin Grid View tab gives a higher level of control over the configuration of the pin on the device, which means the user can activate these pins through software as well. It is always recommended to develop the application code using an indicator on the bootloader but it is usually not necessary once in the field unless that type of status indication is needed for the solution.

Example: There are three main steps to configuring the I/O pins for the bootloader. Users need to first enable the pins used in bootloader UI, then use the Pin Grid View tab to select a port number on the device that the I/O pins will use. Lastly, the correct configuration of the chosen pin must be validated.

Configuring I/O Pins

  1. Enable pins from UI.

    Figure 2-4. I/O Options
  2. Select a port.

    Any of the pins in the Pin Grid View tab can be chosen, as long as the pin is not responsible for other functionality in the MCU used. To properly configure this port setting look into the schematics of the device. In MPLAB X, open Window>Kit Window and navigate to the External Links tab. In this tab there is a list of reference material, including the device schematics. This document contains the configuration information for the User LED or other on-board peripherals that can be used for input and output. Refer to the AVR128DA48 Use Case Example for an in-depth description of this process.
    Figure 2-5. Pin Grid View
  3. Open Pins UI.

    Figure 2-6. Pins UI
  4. Check the pin.

    Figure 2-7. Pins UI Window