50typedef enum : uint32_t {
58typedef enum : uint8_t {
81 __asm__
volatile(
"wfi");
100 uint32_t cpuclk0_hz = 0U;
136 uint32_t pclka_hz = 0U;
144 .pclka_hz = pclka_hz,
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 void internal_clocks_or_halt(void)
Bring CGC + SysTick + MSTP up.
static const uint8_t s_spi_demo_msg_pass[]
static const uint8_t s_spi_demo_msg_fail[]
static bool internal_round_trip_ok(void)
Walk the test pattern once and return whether RX matches TX.
spi_demo_byte_t
Test pattern width and seed.
@ k_spi_demo_pattern_base
SPI demo pattern base.
@ k_spi_demo_pattern_len
SPI demo pattern length.
spi_demo_const_t
App-wide tunables.
@ k_spi_demo_period_ms
SPI demo period ms.
@ k_spi_demo_spi_channel
SPI demo SPI channel.
@ k_spi_demo_spi_baud_hz
SPI demo SPI baud Hz.
@ k_spi_demo_baud
SPI demo baud.
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).
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.
@ k_ra8_clock_id_pclka
PCLKA.
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).
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
SPI_B controller driver (RA8D2 Type-B SPI peripheral).
ra8_err_t ra8_spi_xfer8(uint8_t channel, uint8_t tx, uint8_t *rx)
Full-duplex 8-bit exchange.
@ k_ra8_spi_mode_0
CPOL=0, CPHA=0.
ra8_err_t ra8_spi_init(uint8_t channel, const ra8_spi_cfg_t *cfg)
Initialise an SPI channel with a full config descriptor.
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_spi_init.