Download STM8 bootloader - STMicroelectronics
Transcript
Bootloader command set 3.3 Erase memory command The erase memory command allows the host to erase sectors of the Flash program memory/data EEPROM. The bootloader receives the erase command message, when the ID contains the command type (0x43) and the data field contains the sectors to be erased (see Table 9: STM8 sector codes on page 49). A sector size is 1 Kbyte, therefore, the granularity with the erase command is eight blocks (1 block = 128 bytes). If the host wants to erase one byte only, the write command (write 0x00) can be used. Erase memory command description 27/72 1. The bootloader receives one byte which contains the number (N) of sectors to be erased. N is device-dependent. 2. Then, the bootloader receives (N + 1) bytes, where each byte contains a sector code (see Table 9: STM8 sector codes on page 49). DocID14798 Rev 9