Skip to content

Commit 03a7f4d

Browse files
committed
[ownership] Update documentation
Document the rescue configuration options. Signed-off-by: Chris Frantz <[email protected]>
1 parent c9e232b commit 03a7f4d

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

sw/device/silicon_creator/rom_ext/doc/ownership.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,14 @@ See the definition in [datatypes.h](../../lib/ownership/datatypes.h).
732732
### Rescue Configuration
733733

734734
The rescue configuration describes the owner's desired configuration of the ROM\_EXT rescue protocol.
735+
- The owner may configure desired rescue protocol: Xmodem, USB-DFU or SPI-DFU.
736+
- The owner may configure desired rescue trigger: UART break, Strapping combination or GPIO pin.
737+
- When the trigger is UART break, at least 350us of the break condition must be observed on the UART RX line to trigger the rescue protocol.
738+
- When the trigger is a strapping combination, the desired strap pattern must be configured (e.g. a value 0-61).
739+
- When the trigger is a GPIO pin, the desired IO pin as well as the sense of the pin and whether or not to enable the internal pull-up/down resistor must be configured.
740+
- The owner may configure rescue to be triggered by failure to boot an owner payload.
741+
- The owner may configure rescue to be triggered by a watchdog timeout as the reset reason.
742+
- The owner may configure rescue to automatically exit after a specific timeout of no activity.
735743
- The owner may configure the region of flash to be erased and reprogrammed during firmware rescue.
736744
- The owner may configure the allowed interactions with the rescue protocol.
737745
- Allowed rescue modes permit whether the rescue client can upload firmware or interact with the boot log and boot services.
@@ -753,21 +761,31 @@ typedef struct owner_rescue_config {
753761
*/
754762
uint8_t protocol;
755763
/**
756-
* The gpio configuration (if relevant, depending on `detect`).
764+
* The miscellaneous and gpio configuration (if relevant, depending on `detect`).
757765
*
758-
* 7 2 1 0
766+
* 7 6 2 1 0
759767
* +---------------+--------+-------+
760-
* | Reserved | PullEn | Value |
768+
* | WDT | Resv'd | PullEn | Value |
761769
* +---------------+--------+-------+
770+
*
771+
* WDT: Enter rescue if the reset reason is watchdog timeout.
772+
* PullEn: When GPIO is the trigger, enable the internal pullup in the
773+
* opposite direction of Value.
774+
* Value: When GPIO is the trigger, the GPIO value which signifies entry
775+
* into rescue mode.
762776
*/
763777
uint8_t gpio;
764778
/**
765-
* The timeout configuration (not implemented yet).
779+
* The timeout configuration.
766780
*
767781
* 7 6 0
768782
* +-----+--------------------------+
769783
* | EoF | Timeout |
770784
* +-----+--------------------------+
785+
*
786+
* EoF: Enter rescue on failure to boot.
787+
* Timeout: After `timeout` seconds of no activity, exit rescue mode and
788+
* reboot.
771789
*/
772790
uint8_t timeout;
773791
/**
@@ -777,6 +795,12 @@ typedef struct owner_rescue_config {
777795
* +--------+-----------------------+
778796
* | Detect | Index |
779797
* +--------+-----------------------+
798+
*
799+
* Detect and Index:
800+
* 0 - None; index is meaningless.
801+
* 1 - UART Break; index is meaningless.
802+
* 2 - Strapping pins; index is the strapping value.
803+
* 3 - GPIO; index is the pin to sample.
780804
*/
781805
uint8_t detect;
782806
/** The start offset of the rescue region in flash (in pages). */

0 commit comments

Comments
 (0)