Difference between revisions of "Bootload CAN Communication Protocol"

From OpenMotics
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 83: Line 83:
 
|<div align="center">-</div>
 
|<div align="center">-</div>
 
|Response on bootloader time being programmed
 
|Response on bootloader time being programmed
 +
|-
 +
!<div align="center">M->S</div>
 +
|<div align="center">7</div>
 +
|<div align="center">0</div>
 +
|<div align="center">125</div>
 +
|<div align="center">ID.Byte2</div>
 +
|<div align="center">ID.Byte1</div>
 +
|<div align="center">ID.Byte0</div>
 +
|<div align="center">Bootloader safety flag</div>
 +
|<div align="center">Checksum</div>
 +
|<div align="center">-</div>
 +
|Write the bootloader safety flag (1 = set bit, 0 = clear bit)
 +
|-
 +
!<div align="center">S->M</div>
 +
|<div align="center">7</div>
 +
|<div align="center">125</div>
 +
|<div align="center">125</div>
 +
|<div align="center">ID.Byte2</div>
 +
|<div align="center">ID.Byte1</div>
 +
|<div align="center">ID.Byte0</div>
 +
|<div align="center">Bootloader safety flag</div>
 +
|<div align="center">Checksum</div>
 +
|<div align="center">-</div>
 +
|Response on bootloader safety flag written
 
|}
 
|}
  

Latest revision as of 13:31, 15 October 2019

Direction Nr Of Bytes Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7 Description
M->S
6
0
94
ID.Byte2
ID.Byte1
ID.Byte0
Checksum
-
-
Reset uCAN with specific ID
S->M
7
94
94
ID.Byte2
ID.Byte1
ID.Byte0
AppMode
Checksum
-
Resetting CAN has been done (App_mode=1 -> App running, =0 -> In Bootloader)
M->S
7
0
96
ID.Byte2
ID.Byte1
ID.Byte0
Ping Message
Checksum
-
Ping the Micro CAN slave to see if the Micro CAN is available
S->M
7
1
96
ID.Byte2
ID.Byte1
ID.Byte0
Ping Message
Checksum
-
Micro CAN will respond to a ping request from the Master
M->S
7
0
123
ID.Byte2
ID.Byte1
ID.Byte0
Bootloader Mode
Checksum
-
Write bootloader time in byte 128 of the Micro CAN EEPROM
S->M
7
123
123
ID.Byte2
ID.Byte1
ID.Byte0
Bootloader Mode
Checksum
-
Response on bootloader time being programmed
M->S
7
0
125
ID.Byte2
ID.Byte1
ID.Byte0
Bootloader safety flag
Checksum
-
Write the bootloader safety flag (1 = set bit, 0 = clear bit)
S->M
7
125
125
ID.Byte2
ID.Byte1
ID.Byte0
Bootloader safety flag
Checksum
-
Response on bootloader safety flag written


Notes:

  • M->S: This means that the Master or CAN Control is sending information to Micro CAN (Slave)
  • S->M: This means that the Micro CAN (Slave) is sending information to the Master or CAN Control
  • This CAN protocol only works for firmware Version 2.x.x
  • CAN protocol speed is 125kbps
  • Since the Micro CAN in bootload mode will only respond to messages with SID 1, make sure to have the SID set at 1.
  • Checksum is calculated as the sum of the previous bytes. Example: Nr of bytes=5 (so 5 bytes to transmit), Checksum=Byte0+Byte1+Byte2+Byte3