79typedef enum : uint32_t {
87typedef enum : uint8_t {
143 __asm__
volatile(
"wfi");
285 .src = (uint32_t)(uintptr_t)
s_src,
286 .dst = (uint32_t)(uintptr_t)
s_dst,
299 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_report(uint8_t ok)
Emit the PASS/FAIL result over VCOM and ITM, toggle an LED.
dma_coh_byte_t
Single-byte constants.
@ k_dma_coh_align
D-cache line size (bytes).
@ k_dma_coh_channel
DMAC0 channel index.
@ k_dma_coh_byte_sh
Pattern xor shift.
dma_coh_config_t
Compile-time settings.
@ k_dma_coh_buf_words
Words per buffer (256 x 4 = 1 KiB).
@ k_dma_coh_poll_limit
DMSTS.ACT poll bound.
@ k_dma_coh_baud
J-Link OB VCOM baud rate.
@ k_dma_coh_sentinel
Pre-fill so a no-op copy fails.
static ra8_err_t internal_run_copy(void)
Clean src, run the DMAC block copy, then invalidate dst.
static const uint8_t s_dma_coh_pass_banner[]
VCOM success banner.
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_coh_fail_banner[]
VCOM failure banner (caught by hil.conf HIL_EXPECT_NEGATIVE).
static void internal_park(void)
Halt forever in WFI – panic stop on a fatal init failure.
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.
ra8_err_t ra8_board_uart_console_flush(void)
Block until every byte queued on the J-Link OB VCOM console has finished clocking out on the wire.
Boot entry points shared between a vector table and its startup code.
Cortex-M85 L1 cache maintenance, enable/disable, and I-cache invalidate.
ra8_err_t ra8_cache_dcache_invalidate_by_addr(const void *addr, uint32_t size)
Invalidate (drop) the D-cache lines covering a byte range.
ra8_err_t ra8_cache_dcache_clean_by_addr(const void *addr, uint32_t size)
Clean (write back) the D-cache lines covering a byte range.
High-level Clock Generation Circuit driver.
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).
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info(tag, message)
RA8 log info.
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.
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.