QUERY_EXTENDED_INFO is a command that may be sent from the PC GUI application controlling the bootloading process, to the bootloader firmware. This command is only supported in bootloader firmware version 1.01 or later.
When the firmware receives this command from the host, the firmware is obligated to send back a response packet on the HID interrupt IN endpoint. For PIC16 and PIC18 devices, the QUERY_EXTENDED_INFO has the following structure (note: format is architecture specific, and will not necessarily be the same for devices identifying themselves as PIC24 or other devices):
//Structure for the QUERY_EXTENDED_INFO command (and response) struct{ unsigned char Command; unsigned int BootloaderVersion; unsigned int ApplicationVersion; unsigned long SignatureAddress; unsigned int SignatureValue; unsigned long ErasePageSize; unsigned char Config1LMask; unsigned char Config1HMask; unsigned char Config2LMask; unsigned char Config2HMask; unsigned char Config3LMask; unsigned char Config3HMask; unsigned char Config4LMask; unsigned char Config4HMask; unsigned char Config5LMask; unsigned char Config5HMask; unsigned char Config6LMask; unsigned char Config6HMask; unsigned char Config7LMask; unsigned char Config7HMask; };
The “ConfigxH/LMask” values in the response structure should be loaded with the appropriate AND mask values that the PC application should use when performing the verify operation, and comparing the read out contents of memory versus the .hex file contents. Generally speaking, unimplemented configuration bit positions should be excluded from the verify operations, since the .hex file may contain a ‘1’ or ‘0’ in these locations, even though the microcontroller hardware may not implement some of these locations. If the PC GUI application were to attempt to verify these locations, they would therefore always read back as the default unimplemented value (ex: 0 for PIC18 devices), which may not necessarily match the .hex file (ex: if it had a ‘1’ in the same location). Therefore, the firmware should properly respond to the host’s QUERY_EXTENDED_INFO command, with AND mask values that the PC GUI program should use to AND the .hex file values before comparing them to the read values, ensuring that the verify operation successfully ignores unimplemented/unimportant locations.
MLA - USB Library Help Version : 2.16
![]() |