45typedef enum : uint32_t {
54typedef enum : uint8_t {
80 __asm__
volatile(
"wfi");
97 uint32_t cpuclk0_hz = 0U;
211 .src = (uint32_t)(uintptr_t)
s_src,
212 .dst = (uint32_t)(uintptr_t)
s_dst,
229 if (reg ==
nullptr) {
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.
static const uint8_t s_dma_demo_ok_msg[]
Output line tags.
static const uint8_t s_dma_demo_bad_msg[]
dma_demo_byte_t
Single-byte constants.
@ k_dma_demo_channel
DMA demo channel.
@ k_dma_demo_byte_sh
DMA demo byte sh.
dma_demo_config_t
Compile-time settings.
@ k_dma_demo_period_ms
DMA demo period ms.
@ k_dma_demo_baud
DMA demo baud.
@ k_dma_demo_buf_words
DMA demo buffer words.
@ k_dma_demo_poll_limit
DMA demo poll limit.
@ k_dma_demo_buf_bytes
DMA demo buffer bytes.
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.
DMAC (Direct Memory Access Controller) register layout for the RA8D2.
static volatile r_dmac_channel_regs_t * ra8_dmac(uint8_t channel)
Pointer to DMAC channel channel (0..7), or NULL on error.
@ k_ra8_dmreq_swreq_mask
RA8 dmreq swreq mask.
@ k_ra8_dmsts_act_mask
RA8 dmsts act mask.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_hw_timeout
Hardware timed out waiting for a flag or handshake.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_hw_error
Generic hardware fault detected (error flag set, fault interrupt).
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.
Per-channel DMAC register window.
volatile uint8_t DMSTS
+0x1E Status (ESIF/DTIF/ACT).
volatile uint8_t DMREQ
+0x1D Software Start (SWREQ/CLRS).
DMAC channel configuration.