49static const char*
s_tag =
"DTC";
80 reg->
DTCVBR = (uint32_t)(uintptr_t)vector_base;
81 reg->
DTCVBR_SEC = (uint32_t)(uintptr_t)vector_base;
140 reg->
DTCVBR = (uint32_t)(uintptr_t)vector_base;
141 reg->
DTCVBR_SEC = (uint32_t)(uintptr_t)vector_base;
184 const uint16_t mask = reg->
DTCSTS;
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_ISR_SAFE
The function is callable from interrupt context.
Cortex-M85 L1 cache maintenance, enable/disable, and I-cache invalidate.
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.
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_RETURN_ON_ERROR(err, tag, message)
Early return on error, propagating the code upward.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
ra8_err_t ra8_dtc_disable(void)
Stop the DTC module.
static ra8_dtc_event_fn_t s_dtc_fn
ra8_err_t ra8_dtc_enter_stop(void)
Put the DTC into MSTP-gated stop.
ra8_err_t ra8_dtc_get_status(uint16_t *out_mask)
Read the DTCSTS activation status register.
ra8_err_t ra8_dtc_deinit(void)
Tear down the DTC (clears run bit + drops MSTP ref).
ra8_err_t ra8_dtc_reconfigure(void *vector_base)
Reconfigure the DTC vector base at runtime.
ra8_err_t ra8_dtc_exit_stop(void)
Exit MSTP-gated stop and re-arm the engine.
void ra8_dtc_dispatch(void)
Fire the attached activation callback with current DTCSTS.
ra8_err_t ra8_dtc_attach_handler(ra8_dtc_event_fn_t fn, void *ctx)
Attach a shared activation-complete callback.
static void * s_dtc_vector_base
ra8_err_t ra8_dtc_enable(void)
Start the DTC module.
ra8_err_t ra8_dtc_clear_status(uint16_t mask)
Clear sticky bits in DTCSTS.
ra8_err_t ra8_dtc_init(void *vector_base)
Initialise the DTC and install its vector table base.
Data Transfer Controller (DTC) driver.
void(* ra8_dtc_event_fn_t)(void *ctx, uint16_t status)
DTC activation-complete callback.
DTC (Data Transfer Controller) register layout for the RA8D2.
@ k_ra8_dtcst_dtcst_msk
DTCST.DTCST mask.
static volatile r_dtc_regs_t * ra8_dtc(void)
Get pointer to the DTC controller register block.
@ k_ra8_dtc_vector_table_align
DTCVBR write granularity (HUM 18.2.2).
@ k_ra8_dtccr_rrs_enable
DTCCR with RRS=1 (FSP value).
@ k_ra8_dtccr_rrs_disable
DTCCR with RRS=0 (FSP value).
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.
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_enable(ra8_mstp_t id)
Reference-counted "ungate this peripheral" request.
ra8_err_t ra8_mstp_disable(ra8_mstp_t id)
Reference-counted "gate this peripheral" request.
@ k_ra8_mstp_dmac0_dtc0
MSTPA22 DMAC0+DTC0 (shared).
DTC controller register block at 0x4000AC00.
volatile uint8_t DTCST
+0x0C Module Start Register (HUM 18.2.3).
volatile uint32_t DTCVBR_SEC
+0x14 Secure Vector Base (HUM 18.2.6).
volatile uint8_t DTCCR
+0x00 Control Register (HUM 18.2.1).
volatile uint32_t DTCVBR
+0x04 Vector Base Register (HUM 18.2.2).
volatile uint16_t DTCSTS
+0x0E Status Register (HUM 18.2.4).