mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
Merge 9f27cd4a94
into a2356f2f4a
This commit is contained in:
commit
3a0a6cb561
|
@ -250,6 +250,8 @@ Before running this step, wait to receive `0x10`, `0x04`, `0x01` which indicates
|
|||
|
||||
Once all of these steps are complete, the DFU is complete. Don't forget to validate the firmware in the settings.
|
||||
|
||||
![BLE firmware upgrade sequence diagram](ble/dfu_sequence.png "BLE firmware upgrade sequence diagram")
|
||||
|
||||
---
|
||||
|
||||
### Music Control
|
||||
|
|
BIN
doc/ble/dfu_sequence.png
Normal file
BIN
doc/ble/dfu_sequence.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
58
doc/ble/dfu_sequence.puml
Normal file
58
doc/ble/dfu_sequence.puml
Normal file
|
@ -0,0 +1,58 @@
|
|||
@startuml
|
||||
|
||||
group Step 1 [States::Start]
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::StartDFU, ImageTypes::Application)
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Ack)
|
||||
end
|
||||
|
||||
group Step 2 [States::Start]
|
||||
CompanionApp --> Pinetime : Packet Endpoint (softdeviceSize: uint32_le, bootloaderSize: uint32_le, applicationSize: uint32_le)
|
||||
end
|
||||
|
||||
group Step 3 [States::Init]
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::Response, Opcodes::InitDFUParameters, ErrorCodes::NoError)
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::InitDFUParameters, complete=0x00)
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Ack)
|
||||
end
|
||||
|
||||
group Step 4 [States::Init]
|
||||
CompanionApp --> Pinetime : Packet Endpoint (<.dat init file>)
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::InitDFUParameters, complete=0x01)
|
||||
end
|
||||
|
||||
group Step 5 [States::Init]
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::Response, Opcodes::InitDFUParameters, ErrorCodes::NoError)
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::PacketReceiptNotificationRequest, nbPacketsToNotify)
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Ack)
|
||||
end
|
||||
|
||||
group Step 6 [States::Init]
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::ReceiveFirmwareImage)
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Ack)
|
||||
end
|
||||
|
||||
group Step 7 [States::Data]
|
||||
loop firmware in 20 bytes
|
||||
CompanionApp --> Pinetime : Packet Endpoint (<firmware-chunk>)
|
||||
alt nbPacketsToNotify chunks received
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::PacketReceiptNotification, bytesReceived: uint32_le)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
group Step 8 [States::Validate]
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::Response, Opcodes::ReceiveFirmwareImage, ErrorCodes::NoError)
|
||||
CompanionApp -> Pinetime : ControlPoint Endpoint (Opcodes::ValidateFirmware)
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Ack)
|
||||
end
|
||||
|
||||
alt validation succcess
|
||||
group Step 9 [States::Validated]
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::Response, Opcodes::ValidateFirmware, ErrorCodes::NoError)
|
||||
CompanionApp ->x Pinetime : ControlPoint Endpoint (Opcodes::ActivateImageAndReset)
|
||||
end
|
||||
else crc mismatch
|
||||
Pinetime --> CompanionApp : ControlPoint Endpoint (Opcodes::Response, Opcodes::ValidateFirmware, ErrorCodes::CrcError)
|
||||
end
|
||||
|
||||
@enduml
|
Loading…
Reference in a new issue