54typedef enum : uint32_t {
63typedef enum : uint8_t {
89 __asm__
volatile(
"wfi");
106 uint32_t cpuclk0_hz = 0U;
218 .src = (uint32_t)(uintptr_t)
s_src,
219 .dst = (uint32_t)(uintptr_t)
s_dst,
void main(void)
Secure fallback main entry point.
static uint32_t s_src[k_dtc_arm_buf_words]
Source / destination buffers (32-bit aligned by element type).
static uint32_t s_dst[k_dtc_arm_buf_words]
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_run_copy(void)
Clean src, run the DMAC block copy, then invalidate dst.
static void internal_fill_buffers(void)
Fill s_src with a deterministic pattern; prime s_dst.
static uint8_t internal_verify(void)
Verify s_dst matches s_src element-by-element.
dma_hal_byte_t
Single-byte constants.
@ k_dma_hal_byte_sh
DMA HAL demo byte sh.
@ k_dma_hal_channel
DMA HAL demo channel.
dma_hal_config_t
Compile-time settings.
@ k_dma_hal_buf_bytes
DMA HAL demo buffer bytes.
@ k_dma_hal_period_ms
DMA HAL demo period ms.
@ k_dma_hal_baud
DMA HAL demo baud.
@ k_dma_hal_buf_words
DMA HAL demo buffer words.
@ k_dma_hal_poll_limit
DMSTS.ACT poll bound.
static const uint8_t s_dma_hal_bad_msg[]
static const uint8_t s_dma_hal_ok_msg[]
Output line tags.
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).
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.
8-channel DMA controller (DMAC0) driver
@ k_ra8_dmac_width_word
32-bit transfers (DMTMD.SZ = 10b).
ra8_err_t ra8_dmac_stop(uint8_t channel)
Disable a DMAC0 channel and drop its MSTP reference.
ra8_err_t ra8_dmac_start_block(uint8_t channel, const ra8_dmac_config_t *cfg)
Programme a DMAC channel in block-transfer mode.
ra8_err_t ra8_dmac_wait_idle(uint8_t channel, uint32_t poll_limit)
Spin until a DMAC0 channel goes idle or a poll bound expires.
ra8_err_t ra8_dmac_software_trigger(uint8_t channel)
Software-trigger one transfer request on a DMAC0 channel.
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).
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.
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.
DMAC channel configuration.