- Curiosity Nano Base for Click boards™
- MCP2221A Breakout Module
- Three female-to-male jumper wires
- Communication Protocol: I2C
- Application Start Address: 0x3000
- Device ID: 0x7920 (automatically added)
- I/O Pin Indicator: Enabled
- I/O Pin Entry: Enabled
- Memory Verification: CRC32
I2C
- Custom Name: SERCOM
- Client Address: 0x20
- Client Mask: 0x7F
- I2C Client PLIB Selector: I2C1
I2C1 PLIB
- Interrupt Driven: Enabled
I2C Pins
- I2C SCL: RB1
- I2C SDA: RB2
8-Bit MDFU Client I/O
- BOOT INDICATE: RF2
- BOOT ENTRY: RF3
- BOOT INDICATE: Start High
- BOOT ENTRY: Weak Pullup
8-Bit MDFU Client Project Properties
- ROM Ranges: This option is configured based on the start address of the application. For example, if the application starts at 0x3000 then this value will reflect as
0-2FFF
.
Refer to the Application Setup section in the main Readme file.
This example shows how to execute the CRC32 verification example and update the device Flash memory with the CRC32 application image to demonstrate a successful device firmware update (DFU) over the I2C communication protocol.
8-Bit MDFU Client Operation
- Open the MDFU client project.
- Set the MDFU client project as Main Project.
- Right click, then select Clean and Build.
- Program the MDFU client project.
Bootloader Operation After Initial Programming
After the initial programming, the LED must be ON.
Application Operation
- Open the application project configured for your selected verification scheme.
- Set the application project as the Main Project.
- Build the application project. Right click, then select Clean and Build.
- Build the Application Image File using pyfwimagebuilder:
- Navigate to the Projects tab and right click Important Files>
build_free_image.bat
for Windows or Important Files>build_free_image.sh
for Mac and Linux. - Select Run.
Example Command:
Below is an example of the command used in the previous step.
pyfwimagebuilder build -i "application_hex_file.hex" -c "mdfu_config_file.toml" -o output.img
Tip: The configuration TOML file is generated by the MDFU client project.
- Use the pymdfu host tool to transfer the application image file to the bootloader:
- Navigate to the Projects tab and right click, Important Files>
pymdfu_update.bat
for Windows or Important Files>pymdfu_update.sh
for Mac and Linux. Double click to open the file. - Then right click the script in the Files tab and select Run.
Example Command:
Below is an example of the command used in the previous step.
pymdfu update --tool mcp2221a --image ./output.img --interface i2c --address 32 --clk-speed 100k
Application Has Been Updated Successfully