53typedef enum : uint32_t {
108 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
static void internal_reset_cause_panic_halt(void)
Park the CPU forever in WFI – used after the SW reset write or if HAL init fails.
reset_cause_demo_const_t
Internal constants for the reset-cause demo.
@ k_reset_cause_loop_period_ms
20 Hz advance for HIL probe.
@ k_reset_cause_cpu_hz_at_reset
MOCO ~8.4 MHz before CGC bring-up.
@ k_reset_cause_settle_ms
Pause before triggering SW reset.
volatile uint32_t g_reset_cause_loop
HIL-probed counter – advances only after the second (software-cause) boot.
volatile uint32_t g_reset_cause_initial
Decoded reset cause observed on this boot, captured as soon as ra8_reset_init returns.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Boot entry points shared between a vector table and its startup code.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info_val(tag, message, value)
RA8 log info val.
Reset cause introspection + software reset trigger.
ra8_err_t ra8_reset_get_cause(ra8_reset_cause_t *out)
Decode the latched RSTSRn flags into a single primary cause.
ra8_err_t ra8_reset_init(void)
Snapshot the reset cause at boot.
ra8_reset_cause_t
Decoded reset-cause taxonomy.
@ k_ra8_reset_cause_software
RSTSR1.SWRF.
@ k_ra8_reset_cause_unknown
No flag latched.
void ra8_reset_software_reset(void)
Trigger a software-initiated system reset.
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
void ra8_delay_ms(uint32_t ms)
Busy-wait for at least ms milliseconds.