Skip to content

Commit 9b32cfe

Browse files
authored
Add ability to trigger firmware update mode from Harp protocol (#166)
* Fix typo in R_RESET_DEV register * Add bit to trigger firmware update mode from `R_RESET_DEVICE` * Clarify language regarding expected behavior during firmware update
1 parent 9cbda62 commit 9b32cfe

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Device.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ gantt
275275
section Id
276276
BOOT_EE :id7, 0, 1
277277
BOOT_DEF :id6, after bit7 , 2
278-
- :id5, after bit6 , 3
278+
UPDATE_FIRMWARE :id5, after bit6 , 3
279279
- :id4, after bit5 , 4
280280
NAME_TO_DEFAULT :id3, after bit4 , 5
281281
SAVE :id2, after bit3 , 6
@@ -297,9 +297,11 @@ gantt
297297

298298
* **RST_EE [Bit 1]:** If this bit is set and non-volatile memory is available, the device MUST reset and reboot with all core and application registers set to the values saved in persistent storage, usually an EEPROM. Any currently stored values MUST remain the permanent boot option. If this bit is set and non-volatile memory is not available, the device MUST respond with an `Error` message. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
299299

300-
* **SAVE [Bit 3]:** If this bit is set and non-volatile memory is available, the device MUST save any non-volatile core and application registers to persistent storage, and reboot. The non-volatile memory should be configured as the permanent boot option. If this bit is set and non-volatile memory is not available, the device MUST respond with an `Error` message. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
300+
* **SAVE [Bit 2]:** If this bit is set and non-volatile memory is available, the device MUST save any non-volatile core and application registers to persistent storage, and reboot. The non-volatile memory should be configured as the permanent boot option. If this bit is set and non-volatile memory is not available, the device MUST respond with an `Error` message. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
301+
302+
* **NAME_TO_DEFAULT [Bit 3]:** If this bit is set, the device MUST reboot and restore the value of [`R_DEVICE_NAME`](#r_device_name-25-bytes--devices-name) to its default value. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
301303

302-
* **NAME_TO_DEFAULT [Bit 4]:** If this bit is set, the device MUST reboot and restore the value of [`R_DEVICE_NAME`](#r_device_name-25-bytes--devices-name) to its default value. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
304+
* **UPDATE_FIRMWARE [Bit 5]:** If this bit is set, the device MUST enter firmware update mode. In this mode the device MAY NOT respond to any commands until the update completes. Once completed, the device MUST reset. When sending a response to a `Read` command, the device MUST clear this bit in the response payload.
303305

304306
* **BOOT_DEF [Bit 6]:** When sending a response to a `Read` command, the device MUST set this bit if the device booted with its default register values. If non-volatile memory is not available, the device MUST always set this bit when sending a response to a `Read` command. This bit is read-only state, so if this bit is set on a command message, the device MUST respond with an `Error` message.
305307

schema/core.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ bitMasks:
135135
RestoreEeprom: {value: 0x2, description: The device will boot and restore all the registers to the values stored in non-volatile memory.}
136136
Save: {value: 0x4, description: The device will boot and save all the current register values to non-volatile memory.}
137137
RestoreName: {value: 0x8, description: The device will boot with the default device name.}
138+
UpdateFirmware: {value: 0x20, description: The device will enter firmware update mode.}
138139
BootFromDefault: {value: 0x40, description: Specifies that the device has booted from default factory values.}
139140
BootFromEeprom: {value: 0x80, description: Specifies that the device has booted from non-volatile values stored in EEPROM.}
140141
ClockConfigurationFlags:

0 commit comments

Comments
 (0)