7 Assumptions of Use

This section communicates the most important assumptions of use for the 8-Bit MDFU Client and ecosystem.

AoU-1. When configuring interrupts in the client code for PIC18F devices that do not support the Interrupt Vector Table, it is assumed that the low priority interrupt vector will not be used.

Description: We assume that, by default, the user will not compile any ISR into the low priority interrupt vector. Instead, we provide a placeholder function to prevent conflicts between the high priority and low priority vector addresses. If you wish to use the low priority vector in your client project, you must remove this placeholder function. To locate this placeholder function, navigate to mcc_generated_files/bootloader/library/core/bl_interrupt.c; it is located at the bottom of the file.

AoU-2. When configuring the client code for I2C communication, it is assumed that the I2C driver will be interrupt-driven.

Description: The client firmware can operate with a polled I2C driver, but specific actions are required to prevent the device from clock stretching beyond the duration recommended by the MDFU protocol. To avoid excessive clock stretching during memory operations in polled mode, the 8-Bit MDFU Client code disables the I2C peripheral before processing any command. This action causes the device to automatically NACK its own address, thereby preventing clock stretching beyond the acceptable limit. This is not the most optimal behavior, which is why we recommend using interrupts for I2C when possible.