|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
Why the IOmcu last started: see reset_cause.h. More...
Functions | |
| int | reset_cause_boot_type (const reset_regs_t *r) |
| The boot type in the boot word, without the chained flag. | |
| reset_cause_t | reset_cause_decode (const reset_regs_t *r) |
| Names the cause of the last start. | |
| const char * | reset_cause_word (reset_cause_t c) |
| The fixed word for a cause: POR, BOR, RUN_PIN, GLITCH, DEBUGGER, POWER_DOWN, FLASH_UPDATE, RAM_IMAGE, BOOTSEL_REBOOT, SW_RESET, WATCHDOG or UNKNOWN. | |
| static size_t | as_len (int len) |
| snprintf()'s count as a size_t; a format error reads as 0. | |
| size_t | reset_cause_full (const reset_regs_t *r, char *out, size_t n) |
| The text of the start-up line and the 3s line, every raw value in hex: POR (chip_reset 0x00010000 reason 0x0 boot 0x00000000
params 0x00000000 0x00000000 scratch 0x00000000 0x00000000), with boot none in place of the boot word and the params when rom_get_boot_info() failed. | |
Variables | |
| static const char *const | k_words [RESET_CAUSE_COUNT] |
| The words, indexed by reset_cause_t. | |
Why the IOmcu last started: see reset_cause.h.
SPDX-License-Identifier: MIT
|
static |
snprintf()'s count as a size_t; a format error reads as 0.
| len | What snprintf() returned. |
len, or 0 when it is negative. | int reset_cause_boot_type | ( | const reset_regs_t * | r | ) |
The boot type in the boot word, without the chained flag.
| r | The raw values. |
| reset_cause_t reset_cause_decode | ( | const reset_regs_t * | r | ) |
Names the cause of the last start.
First match wins:
A debugger's warm reset of a core clears REASON (datasheet, WATCHDOG REASON) without a chip-level reset; the start after one reads as the chip-level reset before it.
| r | The raw values; NULL reads as UNKNOWN. |
| size_t reset_cause_full | ( | const reset_regs_t * | r, |
| char * | out, | ||
| size_t | n ) |
The text of the start-up line and the 3s line, every raw value in hex: POR (chip_reset 0x00010000 reason 0x0 boot 0x00000000 params 0x00000000 0x00000000 scratch 0x00000000 0x00000000), with boot none in place of the boot word and the params when rom_get_boot_info() failed.
| r | The raw values. |
| out | Receives the text, NUL-terminated and cut to fit. |
| n | Size of out in bytes; RESET_CAUSE_FULL_MAX holds it. |
| const char * reset_cause_word | ( | reset_cause_t | c | ) |
The fixed word for a cause: POR, BOR, RUN_PIN, GLITCH, DEBUGGER, POWER_DOWN, FLASH_UPDATE, RAM_IMAGE, BOOTSEL_REBOOT, SW_RESET, WATCHDOG or UNKNOWN.
| c | The cause; a value out of range reads as UNKNOWN. |
|
static |
The words, indexed by reset_cause_t.