The document describes various bootloader commands that can be sent by a host to a microcontroller. It lists 12 commands that the bootloader supports, including commands to get the bootloader version, read chip identification, erase flash memory sectors, write memory, enable and disable read/write protection. Each command returns a success or error code to indicate if the operation was completed successfully.
The document describes various bootloader commands that can be sent by a host to a microcontroller. It lists 12 commands that the bootloader supports, including commands to get the bootloader version, read chip identification, erase flash memory sectors, write memory, enable and disable read/write protection. Each command returns a success or error code to indicate if the operation was completed successfully.
Code Replies BL_GET_VER 0x51 Bootloader This command is version used to read the number bootloader version (1byte) from the MCU BL_GET_HELP 0x52 All supported This command is Command used to know what codes are the commands (10 bytes) supported by the bootloader BL_GET_CID 0x53 Chip This command is identification used to read the number MCU chip (2 bytes) identification number BL_GET_RDP_STATUS 0x54 Returns the This command is FLASH Read used to read the Protection FLASH Read level. Protection level. (1byte) BL_GO_TO_ADDR 0x55 Success or This command is Error Code used to jump (1byte) bootloader to specified address. BL_FLASH_ERASE 0x56 Success or This command is Error Code used to mass erase (1byte) or sector erase of the user flash . BL_MEM_WRITE 0x57 Success or This command is Error Code used to write data (1byte) in to different memories of the MCU BL_EN_R_W_PROTECT 0x58 Success or This command is Error Code used to enable (1byte) read/write protect on different sectors of the user flash . BL_MEM_READ 0x59 Memory This command is contents of used to read data length asked from different by the host. memories of the microcontroller. TODO: This is left as exercise for the student BL_READ_SECTOR_STATUS 0x5A All sector This command is status used to read all the (2bytes) sector protection status. BL_OTP_READ 0x5B OTP contents This command is used to read the OTP contents. TODO: This is left as exercise for the student BL_DIS_R_W_PROTECT 0x5C Success or This command is Error Code used to disable (1byte) read/write protection on different sectors of the user flash . This command takes the protection status to default state.