USB PIC Bootloader. User Manual


7.4.6. BOOT_READ_ID response

Bootloader sends this response after BOOT_READ_ID command processing. The response contains data stored in ID Locations of PIC18F microcontroller.

Eight memory locations (200000h-200007h) are designated as ID locations, where the user can store checksum or other code identification numbers.

To ease data processing boot_rsp_read_id structure can be used:

typedef struct
{
   unsigned char cmd;  /* command code, see BOOT_xxx constants */
   unsigned char echo;  /* echo is used to link between command and response */
   unsigned char reserved[4];
   unsigned char data[BOOT_ID_LEN];
} boot_rsp_read_id;

Fields assignment:

cmd

Command code. cmd field contains BOOT_GET_FW_VER constant value for the given response.

echo

Package ID. Bootloader copies it from the corresponding command before the response is sent. Therefore, when response is received, PC program can associate this response with previously sent command.

reserved

Major version number.

data

Minor version number.