Skip to content

Commit

Permalink
fix(update-agent): increase ack timeout for mcu (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah authored Nov 20, 2024
1 parent 5019ec7 commit ac75821
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions update-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 6.0.1

### Fixed

+ Increased ack timeout to 2.5s to accomodate read performance of MCU flash
when calculating CRC to confirm update

### Changed

+ archived internal repo. All new code should be developed in foss
`orb-software` repo.

## 6.0.0

### Breaking changes:
Expand Down
2 changes: 1 addition & 1 deletion update-agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "orb-update-agent"
version = "6.0.0"
version = "6.0.1"
authors = [
"Richard Janis Goldschmidt",
"Galileo Daras <galileo@getcoffee.io>",
Expand Down
4 changes: 2 additions & 2 deletions update-agent/src/update/can.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ const ARBITRARY_EVENT_KEY: usize = 42;
const MCU_MAX_FW_LEN_BYTES: u64 = 224 * 1024;
const MCU_BLOCK_LEN_BYTES: u64 = 39;
const MCU_BLOCK_SEND_ATTEMPTS: usize = 3;
/// 1.5s timeout for receiving an ack from the MCU
/// 2.5s timeout for receiving an ack from the MCU
/// external SPI flash sector is long to erase.
const MCU_BLOCK_SEND_TIMEOUT_MS: u64 = 1500;
const MCU_BLOCK_SEND_TIMEOUT_MS: u64 = 2500;
/// one block takes ~10ms to be sent over ISO-TP (with ack response)
/// let's use a maximum of 20% of the bandwidth when performing a microcontroller
/// firmware update so 10ms spaced by 40ms period
Expand Down

0 comments on commit ac75821

Please sign in to comment.