| Documentation |
|---|
| Related products |
|---|
| USB-I2C/SPI/GPIO Adapter - U2C-12 |
| USB-IO Interface Adapter - GPIO-12 |
Bootloader sends this response after BOOT_READ_FLASH command processing. The response contains block of data, read from microcontroller flash memory.
If XTEA encryption algorithm is used (see the section called “XTEA - The encryption key”), the response contains the encrypted data. This data can be decrypted with encoder application, which is part of Bootloader setup package. During decryption you have to use the password, identical to the password in Bootloader.
To ease data processing boot_rsp_read_flash 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 addr_lo; /* address must be divisible by 2 */
unsigned char addr_hi;
unsigned char reserved[1];
unsigned char size8; /* size must be divisible by 8*/
unsigned char data[BOOT_RSP_SIZE - 6];
} boot_rsp_read_flash;
Fields assignment:
Data field is used to make the
size of all packages equal to BOOT_RSP_SIZE
bytes.
Header field is used to access
common for all packages parameters -
cmd and echo.
These parameters are also available from the structures that
define specific responses.
LSB byte of the address, flash memory reading starts from.
MSB byte of the address, flash memory reading starts from.
Not used
The size of the data in bytes.
Data read from microcontroller flash memory.