37typedef enum : uint32_t {
42typedef enum : uint8_t {
71 __asm__
volatile(
"wfi");
167 uint16_t partial = 0U;
191 uint32_t cpuclk0_hz = 0U;
245 *out_match = (hw == sw) ? 1U : 0U;
271 }
else if (match != 0U) {
void main(void)
Secure fallback main entry point.
static void internal_setup_or_halt(void)
Bring up clocks, MSTP, delay timing, and the board console.
static void internal_panic_halt(void)
Park the core after an unrecoverable ADC demo failure.
static ra8_err_t internal_one_iter(uint8_t *out_match)
One iteration: HW sum + SW sum + compare.
static ra8_err_t internal_hw_sum(uint16_t *out_sum)
Hardware DOC sum: chain seven add16 calls into the accumulator.
volatile uint32_t g_doc_mismatch
HIL failure counter – incremented every time the hardware DOC sum disagreed with the software referen...
volatile uint32_t g_doc_match
HIL liveness counter – incremented on every iteration where the hardware DOC sum matched the software...
static uint16_t internal_sw_sum(void)
Software reference: sum every operand modulo 2^16.
static const uint16_t s_doc_demo_operands[k_doc_demo_table_len]
Eight 16-bit operands chained through DOC.add.
doc_demo_const_t
Demo tunables.
@ k_doc_demo_period_ms
Doc demo period ms.
doc_demo_layout_t
Operand-table layout.
@ k_doc_demo_table_len
Doc demo table length.
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_led2
LED2, GREEN, P303 (jumper E26).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
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.
Data Operation Circuit (DOC) driver header.
ra8_err_t ra8_doc_add16(uint16_t a, uint16_t b, uint16_t *out_sum)
Perform a 16-bit hardware add.
ra8_err_t ra8_doc_init(void)
Reset the DOC control register to its reset state.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
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.