40typedef enum : uint32_t {
45typedef enum : uint8_t {
90 __asm__
volatile(
"wfi");
120 uint32_t cpuclk0_hz = 0U;
void main(void)
Secure fallback main entry point.
acmphs_demo_chan_t
Channel + register-field selectors.
@ k_acmphs_demo_ivrefsel
Default IVREF selector (CMPSEL1, IVREF).
@ k_acmphs_demo_ivpsel
Default IVCMP selector (CMPSEL0).
@ k_acmphs_demo_channel
Acmphs demo channel.
static ra8_err_t internal_acmphs_demo_one_iter(void)
Read the comparator output and route to the matching LED.
static void internal_acmphs_demo_panic_halt(void)
Park the CPU forever after a fatal comparator-demo failure.
acmphs_demo_const_t
Demo tunables.
@ k_acmphs_demo_period_ms
Acmphs demo period ms.
static ra8_err_t internal_acmphs_demo_setup(void)
Bring CGC + SysTick + LEDs + ACMPHS channel 0 up.
volatile uint32_t g_acmphs_compare_tick
HIL liveness counter – incremented each comparator read iteration.
Full-featured High-Speed Analog Comparator (ACMPHS) driver.
ra8_err_t ra8_acmphs_channel_init(uint8_t channel, const ra8_acmphs_cfg_t *cfg)
Initialise one channel with a full config descriptor.
ra8_err_t ra8_acmphs_read_output(uint8_t channel, ra8_level_t *out)
Read the live output of a channel.
ra8_err_t ra8_acmphs_init(void)
Legacy init – reset every channel to its power-on state.
@ k_ra8_acmphs_edge_none
Polling only, no edge trigger.
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).
ra8_err_t ra8_board_led_on(ra8_board_led_id_t led)
Drive led HIGH (light it).
@ k_ra8_board_led2
LED2, GREEN, P303 (jumper E26).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
@ k_ra8_board_led3
LED3, RED, PA07 (jumper E28).
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.
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).
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_level_t
Digital output / input level.
@ k_ra8_level_high
Drive or read 1.
@ k_ra8_level_low
Drive or read 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.
Configuration descriptor for ra8_acmphs_channel_init.