Skip to main content
Skip table of contents

MCB bootloader protocol

MCB bootloader uses also MCB protocol, although it uses its own register dictionary addressing for containing the registers needed to access the MCU flash:

  • Version address 0x67F. Return the bootloader version. The Slave reply with ACK.

Simple read version example

Version command request

HeaderConfig data
AddressCommandPending frame
0x67F0b0010b00x0
67F2 0000 0000 0000 0000

The reply contains, the major, minor and compilation data.

HeaderConfig data
AddressCommandPending frame
0x67F0b0110b0Major: 0x1, Minor: 0x2 Compile: 0x3
67F6 0001 0002 0003 0000
  • Enter boot mode 0x67B. Enter boot mode. The slave must reply with an ACK.

Enter boot mode

Enter boot mode.

HeaderConfig data
AddressCommandPending frame
0x67B0b0100b00x0
67B4 0000 0000 0000 0000

Version command reply. Error command → 0x6, ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x67B0b0110b00x0
67B6 0000 0000 0000 0000
  • Erase address 0x67D. It erases a flash sector. First 32 bits of config data field, are interpreted as an address, the sector that contains that address will be the target to erase. The slave must reply with an ACK or Error when the address is out of limits.

Erase command example

Erase command request for the sector that contains 0xB8000 address.

HeaderConfig data
AddressCommandPending frame
0x67D0b0100b00xB8000
67D4 8000 000B 0000 0000

Version command reply. Error command → 0x6, ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x67D0b0110b00x0
67D6 0000 0000 0000 0000
  • Write address 0x67C. Command that writes a flash memory sector. The first 32 bits of the config data field are used as begin address, from that point, all the data send will be written in sequence. The slave must reply with an ACK or Error when the address is out of limits.
    It makes sense to use segmented packages with this command, the performance will be increased substantially.

Write command example

Write command request for sector that contains the 0x88000 address, data 0x12345678

HeaderConfig data
AddressCommandPending frame
0x67C0b0100b00x8000000856781234
67C4 8000 0008 5678 1234

Version command reply. Error command → 0x6, ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x67C0b0110b00x0
67C6 0000 0000 0000 0000
  • Close address 0x67E. This command executes the end of booloader program.

Close command example

Close command request

HeaderConfig data
AddressCommandPending frame
0x67E0b0100b00x0
67E4 0000 0000 0000 0000

Version command reply. ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x67E0b0110b00x0
67E6 0000 0000 0000 0000
  • Open eeprom boot mode 0x67A. Invalidates the data stored into the external eeproms. The slave must reply with an ACK.

Enter boot mode

Enter eeprom boot mode.

HeaderConfig data
AddressCommandPending frame
0x67A0b0100b00x0
67A4 0000 0000 0000 0000

Enter eeprom boot mode command reply. Error command → 0x6, ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x67A0b0110b00x0
67A6 0000 0000 0000 0000
  • EEPROM Command 0x679. Command that writes or reads from EEPROM memory. The first 2 bytes of the config data field are used as node address, the next 2 bytes as address, and the following 4 bytes as data (write case). The slave must reply with an ACK or Error when the command fails.

Write EEPROM command example

Write command request (EEPROM node 0x51, EEPROM address 0x290 and data 0x64)

HeaderConfig data
AddressCommandPending frame
0x6790b0100b00x0051029000640000
6794 0051 0290 0064 0000

Version command reply. ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x6790b0110b00x0051029000000000
6796 0051 0290 0000 0000

Read EEPROM command example

Read command request (EEPROM node 0x51, EEPROM address 0x29)

HeaderConfig data
AddressCommandPending frame
0x6790b0010b0 0x0051029000000000
6794 0051 0290 0000 0000

Version command reply. ACK command → 0x3 Data = 123456

HeaderConfig data
AddressCommandPending frame
0x6790b0110b00x0051029034560012
6796 0051 0290 3456 0012
  • Close eeprom boot mode 0x678. Validates the stored eeprom data.

Close command example

Close eeprom command request

HeaderConfig data
AddressCommandPending frame
0x6780b0100b00x0
6784 0000 0000 0000 0000

Version command reply. ACK command → 0x3

HeaderConfig data
AddressCommandPending frame
0x6780b0110b00x0
6786 0000 0000 0000 0000
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.