43typedef enum : uint32_t {
50typedef enum : uint16_t {
84 __asm__
volatile(
"wfi");
128 uint32_t cpuclk0_hz = 0U;
void main(void)
Secure fallback main entry point.
volatile uint32_t g_gpt_irq_count
Count of GPT0 overflow interrupts actually serviced by the ISR.
gpt_irq_demo_const_t
Demo tunables.
@ k_gpt_irq_demo_period
16-bit period at div_1.
@ k_gpt_irq_demo_priority
NVIC priority for the overflow.
@ k_gpt_irq_demo_loop_ms
Idle sleep between iterations.
gpt_irq_demo_event_t
GPT channel and its counter-overflow ELC event (FSP ra8d2 0x0C1).
@ k_gpt_irq_demo_channel
GPT IRQ demo channel.
@ k_gpt_irq_demo_ovf_event
GPT0 GTCIV counter-overflow event.
static void internal_gpt_irq_demo_panic_halt(void)
Park the processor after an unrecoverable demo failure.
static void internal_gpt_irq_demo_isr(void *ctx)
GPT0 counter-overflow interrupt service routine.
static void internal_gpt_irq_demo_setup_or_halt(void)
Initialize the clocks, timebase, and observable LED fixture.
static ra8_err_t internal_gpt_irq_demo_arm(void)
Link the GPT0 overflow event to the NVIC and arm GPT0.
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).
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.
Event Link Controller driver.
ra8_elc_event_t
Partial list of ELC events (populate as drivers need them).
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.
Full-featured General PWM Timer (GPT) driver.
ra8_err_t ra8_gpt_start_free_run(uint8_t channel, uint32_t period)
Configure a GPT channel as a free-running up-counter.
@ k_ra8_gpt_mode_saw_pwm
Saw-wave PWM (up-count).
ra8_err_t ra8_gpt_init(uint8_t channel, const ra8_gpt_cfg_t *cfg)
Initialise a GPT channel with a full config descriptor.
@ k_ra8_gpt_ps_div_1
PCLKD / 1.
NVIC + ICU IELSR allocator.
ra8_err_t ra8_isr_init(void)
Initialise the ra8_isr table.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
ra8_err_t ra8_isr_register(ra8_elc_event_t event, ra8_isr_handler_t handler, void *ctx, uint8_t priority, uint16_t *out_slot)
Allocate an IELSR slot for an ELC event + handler.
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_gpt_init.