Skip to content

microchip-pic-avr-solutions/avr64du32-cnano-8bit-mdfu-solution-mplab-mcc

Repository files navigation

Microchip Technologies Inc.

8-Bit Microchip Device Firmware Update (MDFU) Solution for the AVR64DU32 Curiosity Nano Evaluation Kit

Introduction

This repository contains two configurations to showcase the utilization of the 8-Bit MDFU Client library in creating an efficient development ecosystem within MPLAB® X.

Each of these configurations contains two MPLAB® X projects: the bootloader client project and the application project.

  1. Basic Bootloader Client Solution Using UART
  2. Bootloader Client Solution Using UART With Multiple Image and Anti-Rollback Support

Hardware Requirements

Software Requirements

Hardware Setup

  1. Connect the AVR64DU32 Curiosity Nano Evaluation Kit to the PC using a USB-A to USB-C cable.

images/AVR64DU32_Hardware.jpg

  1. To create the AVR® BOOT/APPCODE/APPDATA partitions using the FUSE bits, newer AVR® CNANO devices need to have their FUSE bits unlocked using a Python tool that interfaces with the on-board debugger.

    a. Install Python 3.

    b. Run the package installation command from a command line interface with access to Python:

     pip install pydebuggerconfig
    

    c. Run the read command to check the device's configuration. Check to see that the FUSE_PROTECTION bit in the TARGET_DEBUG_FEATURES register is set.

     $> pydebuggerconfig read
    
     ----- Board Configuration read from the board: -----
     ...
     ...
     ...
     Register TARGET_DEBUG_FEATURES:   0x0F (15)  # Program/debug features
                                         bit 0, SINGLE_DEVICE: 1 # Single-device
                                         bit 1, PROG_ENABLED: 1 # Programming
                                         bit 2, DEBUG_ENABLED: 1 # Debug
                                         bit 3, FUSE_PROTECTION: 1 # Fuse protection    <<<< Fuse protection is enabled
     ...
     ...
     ...
    

    d. Disable the Fuse Configuration Protection by running:

     pydebuggerconfig replace -r TARGET_DEBUG_FEATURES=0x07
    

    e. Verify that the Fuse Protection has been disabled by reading back the new data.

     $> pydebuggerconfig read
    
     ----- Board Configuration read from the board: -----
     ...
     ...
     ...
     Register TARGET_DEBUG_FEATURES:   0x07 (7)  # Program/debug features
                                         bit 0, SINGLE_DEVICE: 1 # Single-device
                                         bit 1, PROG_ENABLED: 1 # Programming
                                         bit 2, DEBUG_ENABLED: 1 # Debug
                                         bit 3, FUSE_PROTECTION: 0 # Fuse protection    <<<< Fuse protection is disabled
     ...
     ...
     ...
    

Note: If needed, the Fuse Configuration Protection can be re-enabled by issuing the command pydebuggerconfig restore to reset the debugger to factory default settings. However, this command will only restore the factory settings of the debugger and will not reset the device's Fuse values. A changed Fuse value will be held until the debugger protection is disabled once again and the device is reprogrammed.

References

For additional information, refer to the following resources:

Back to Top