41typedef enum : uint32_t {
47typedef enum : uint16_t {
54typedef enum : uint32_t {
86 __asm__
volatile(
"wfi");
109 uint32_t cpuclk0_hz = 0U;
180 const uint32_t shift =
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_arm(void)
Configure ADC_B in 12-bit software-trigger mode.
static ra8_err_t internal_emit_tick(uint32_t tick)
Emit one cascade-tick banner over SCI8.
static void internal_format_tick(uint32_t tick, uint8_t *digits)
Render the 32-bit tick counter into an 8-byte ASCII-hex buf.
static const uint8_t s_agt_pulse_msg_tail[]
static const char s_agt_pulse_hex_chars[]
Hex print map for the tick counter.
static const uint8_t s_agt_pulse_msg_head[]
Tick-line prefix and CR/LF tail.
agt_pulse_timer_t
AGT channel + pulse-output settings.
@ k_agt_pulse_duty
50% via compare-match A.
@ k_agt_pulse_period
~1 Hz at the fake default.
@ k_agt_pulse_channel
AGT pulse channel.
agt_pulse_fmt_t
Hex-digit width + mask for the per-tick banner formatter.
@ k_agt_pulse_hex_shift
AGT pulse hex shift.
@ k_agt_pulse_hex_digits
AGT pulse hex digits.
@ k_agt_pulse_hex_mask
AGT pulse hex mask.
agt_pulse_const_t
Demo tunables.
@ k_agt_pulse_baud
AGT pulse baud.
@ k_agt_pulse_poll_ms
AGT pulse poll ms.
Asynchronous General-Purpose Timer (AGT) driver header.
@ k_ra8_agt_pulse_mode_continuous
Free-run, toggle every underflow.
@ k_ra8_agt_pulse_compare_a
AGTCMA + AGTOAn toggle armed.
ra8_err_t ra8_agt_get_status(uint8_t channel, uint8_t *out_mask)
Read the AGTCR status register.
@ k_ra8_agt_output_polarity_active_high
TEDGSEL = 1, start-low pin.
ra8_err_t ra8_agt_start_pulse_output(uint8_t channel, const ra8_agt_pulse_cfg_t *cfg)
Start an AGT channel in pulse-output / output-compare mode.
ra8_err_t ra8_agt_stop(uint8_t channel)
Stop an AGT channel.
Asynchronous General-Purpose Timer (AGT) register layout for RA8D2.
@ k_ra8_agt_agtcr_tundf_msk
Underflow flag.
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.
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.
Configuration for ra8_agt_start_pulse_output.