To start reprogramming a node, following sequence must be run.
Switch to bootloader
System will be switched too bootloader mode and restarted to let the mode switch become active.
-> [P2P, SID:123, RID:456, WD] 0xFF 0x80 0x00
Write Data: switch application mode, bootloader
<- [P2P, SID:456, RID:123, RE] 0xFF 0x80
Response: application mode accepted
-> [P2P, SID:123, RID:456, WD] 0xFF 0x88
Write Data: system reset
<- [P2P, SID:456, RID:123, RE] 0xFF 0x88
Response: reset ok - wait some time...Reprogram flash memory
This is where the flash programming is done.
-> [P2P, SID:123, RID:456, WD] 0xFE 0x10 0x01
Write Data: erase flash, block 1
<- [P2P, SID:456, RID:123, RE] 0xFE 0x10
Response: erase ok and done
-> [P2P, SID:123, RID:456, WD] 0xFE 0x20 0x01
Write Data: init flash download, block 1
<- [P2P, SID:456, RID:123, RE] 0xFE 0x20
Response: flash download ready
-> [P2P, SID:123, RID:456, WD] 0xFF 0x10 0x01 0x00 0x00
Write Data: init transfer data service, length 0x100, encoding RAW
<- [P2P, SID:456, RID:123, RE] 0xFF 0x10 0x01 0x00
Response: transfer data accepted and ready, max. block size 0x100
-> [BC, SID:123, TD] [8 byte data]
Transfer Data: data download #0
-> [Repeated download messages until all data of block #0 is transmitted]
-> [BC, SID:123, TD] [data]
Transfer Data: last frame of data download in this block... wait for response now
<- [P2P, SID:456, RID:123, RE]
Response: data block accepted and processed, ready for more... repeat download of blocks
-> [P2P, SID:123, RID:456, WD] 0xFF 0x11
Write Data: close the download session
<- [P2P, SID:456, RID:123, RE] 0xFF 0x11
Response: download session closed successfully
-> [P2P, SID:123, RID:456, WD] 0xFE 0x21 0x01
Write Data: verify flash download... wait for response here
<- [P2P, SID:456, RID:123, RE] 0xFE 0x21
Response: download ok and finished , signature is writtenSwitch back to application
System will be switched back to application mode and restarted to let the mode switch become active.
-> [P2P, SID:123, RID:456, WD] 0xFF 0x80 0x01
Write Data: switch application mode, bootloader
<- [P2P, SID:456, RID:123, RE] 0xFF 0x80
Response: application mode accepted
-> [P2P, SID:123, RID:456, WD] 0xFF 0x88
Write Data: system reset
<- [P2P, SID:456, RID:123, RE] 0xFF 0x88
Response: reset ok - wait some time...