|
OpenBSL
v.0.1.0
|
The OPEN_BSL_CMD_DOWNLOAD_SEGMENT is used to download/write the given memory segment with given data bytes
This command can be enabled by using the OPEN_BSL_CONFIG_SUPPORT_CMD_DOWNLOAD_SEGMENT compile options in OpenBSL_Config.h
Depeding on the device target hardware (e.g. target device with flash memory), it might necessary to erase the memory section first (e.g. with OPEN_BSL_CMD_ERASE_SEGMENT) before writing the bytes.
REQUEST packet format
| Field Name | Length | Description |
|---|---|---|
| CMD | 1 byte | OPEN_BSL_CMD_DOWNLOAD_SEGMENT (0x07) |
| LEN | 1 byte | packet length from START_ADDR to CHKSUM |
| START_ADDR | 4 bytes | start address (LSB first) of the memory area to be written |
| BYTE_0 | 1 byte | data byte index 0 |
| BYTE_N-1 | 1 byte | data byte index N-1, where N is the number of data to be written |
| CHKSUM | 2 bytes | 16 bit packet checksum (LSB first), calculated starting from START_ADDR to BYTE_N-1 |
Positive RESPONSE packet format:
| Field Name | Length | Description |
|---|---|---|
| RESP | 1 byte | (OPEN_BSL_CMD_DOWNLOAD_SEGMENT|OPEN_BSL_RESP_BIT_MASK) (0x87) |
1.8.5