OpenBSL  v.0.1.0
OPEN_BSL_CMD_ERASE_SEGMENT command

Description

The OPEN_BSL_CMD_ERASE_SEGMENT is used to erase the given memory segment with segment's start and end addresses as parameters

This command can be enabled by using the OPEN_BSL_CONFIG_SUPPORT_CMD_ERASE_SEGMENT compile options in OpenBSL_Config.h

Depeding on the device target hardware, the command might effect other memory area (e.g. take into account if target device can only erase the memory page-wise).

Packet Format

REQUEST packet format

| CMD | START_ADDR | END_ADDR | CHKSUM |

Field Name Length Description
CMD 1 byte OPEN_BSL_CMD_ERASE_SEGMENT (0x06)
START_ADDR 4 bytes start address (LSB first) of the memory area to be erased
END_ADDR 4 bytes end address (LSB first) of the memory area to be erased
CHKSUM 2 bytes 16 bit packet checksum (LSB first), calculated starting from START_ADDR to END_ADDR

Positive RESPONSE packet format:

| RESP |

Field Name Length Description
RESP 1 byte (OPEN_BSL_CMD_ERASE_SEGMENT|OPEN_BSL_RESP_BIT_MASK) (0x86)