8-Bit Microchip Device Firmware Update (MDFU) Solution for the AVR64DU32 Curiosity Nano Evaluation Kit
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.
- Basic Bootloader Client Solution Using UART
- Bootloader Client Solution Using UART With Multiple Image and Anti-Rollback Support
- AVR64DU32 Curiosity Nano Evaluation Kit (EV59F82A)
- USB-A to USB-C® cable
- MPLAB® X IDE v6.25 or newer
- XC8 Compiler v3.00 or newer
- AVR® GCC Compiler v7.3.0 or newer
- MPLAB® Code Configurator (MCC) Core v5.8.2 or newer
- MCC Melody Core v2.9.1 or newer
- MPLAB Code Configurator (MCC) Melody 8-Bit MDFU Client
- Python™ v3.8 or newer
- pyfwimagebuilder v1.0.1 or newer
- pymdfu v2.5.1
- Connect the AVR64DU32 Curiosity Nano Evaluation Kit to the PC using a USB-A to USB-C cable.
-
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.
For additional information, refer to the following resources: