Product Comparison: USB I2C | USB SPI | USB GPIO

USB PIC Bootloader. User Manual


7.3.6. BOOT_RESET command

BOOT_RESET command switches bootloader into user mode. It must be sent only after user application is written and verified for correctness. After receiving BOOT_RESET command Bootloader clears EEPROM mark (see the section called “ EEPROM Mark configuration (EEPROM Mark)”) and resets the microcontroller. After reset control is passed to user mode application. If user-mode application was not written or was written with errors the result may be unpredictable. In this case you have to use the jumper (see the section called “Jumper configuration”) to switch Bootloader into programming mode.

Bootloader does not send response to BOOT_RESET command. It disconnects the device from USB bus and PC application stops receiving responses from Bootloader. It can't send commands any more either.

Before sending BOOT_RESET command you have to fill in boot_cmd_reset structure:

typedef struct
{
   unsigned char cmd;  /* command code, see BOOT_xxx constants */
} boot_cmd_reset;

Fields assignment:

cmd

Command code; the given field must be initialized by BOOT_RESET constant value.