50typedef enum : uint32_t {
54typedef enum : uint32_t {
88 __asm__
volatile(
"wfi");
150 uint32_t cpuclk0_hz = 0U;
181 uint32_t msg_len = 0U;
188 for (uint32_t i = 0U; i < total_refreshes; ++i) {
198 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
static const uint8_t s_wdt_demo_msg_wdt[]
Banner emitted when the cause is iwdt (we tripped).
static const uint8_t s_wdt_demo_msg_pwr[]
Banner emitted when the cause is power_on.
static const uint8_t s_wdt_demo_msg_stop[]
Logged just before the demo stops feeding the IWDT.
static const uint8_t * internal_wdt_demo_banner_for(ra8_reset_cause_t cause, uint32_t *out_len)
Pick the right banner string for cause.
wdt_demo_time_unit_t
Time-unit conversion.
@ k_ms_per_sec
Milliseconds per second.
static void internal_wdt_demo_panic_halt(void)
Park the processor after an unrecoverable watchdog demo failure.
@ k_wdt_demo_baud
Wdt demo baud.
@ k_wdt_demo_refresh_ms
Wdt demo refresh ms.
@ k_wdt_demo_alive_seconds
Wdt demo alive seconds.
static void internal_wdt_demo_setup_or_halt(void)
Initialize clocks, reset-cause decoding, console, and status LED.
static const uint8_t s_wdt_demo_msg_other[]
Banner emitted for any other cause.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
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).
Independent Watchdog driver header.
ra8_err_t ra8_iwdt_init(void)
Initialise the IWDT driver layer.
void ra8_iwdt_refresh_deferred(void)
Refresh the IWDT counter via a wrapper function.
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_power_on
RSTSR0.PORF.
@ k_ra8_reset_cause_unknown
No flag latched.
@ k_ra8_reset_cause_iwdt
RSTSR1.IWDTRF.
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.