ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_dtc_regs.h
Go to the documentation of this file.
1
44
45#pragma once
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51#include <stdint.h>
52
53#include "ra8_attributes.h"
54
55typedef enum : uintptr_t {
56 k_ra8_dtc_base_addr = 0x4000AC00UL,
58
63
64typedef enum : uint16_t {
67
68/* DTCCR / DTCCR_SEC bit positions (HUM 18.2.1 p 786). Bit 3 is
69 * documented as "reserved -- write 1, read 1"; FSP encodes the
70 * RRS-enable / RRS-disable values as the literals 0x18 / 0x08 to
71 * preserve that constraint. */
79
80/* DTCST bit positions (HUM 18.2.3 p 787). */
85
86/* DTCSTS bit positions (HUM 18.2.4 p 788). */
87typedef enum : uint16_t {
91
92/* DTCADMOD bit positions (HUM 18.2.12 p 793). */
93typedef enum : uint8_t {
96
107typedef struct {
108 volatile uint8_t DTCCR;
109 volatile uint8_t _r0;
110 volatile uint16_t _r1;
111 volatile uint32_t DTCVBR;
112 volatile uint8_t DTCADMOD;
113 volatile uint8_t _r2;
114 volatile uint16_t _r3;
115 volatile uint8_t DTCST;
116 volatile uint8_t _r4;
117 volatile uint16_t DTCSTS;
118 volatile uint8_t DTCCR_SEC;
119 volatile uint8_t _r5;
120 volatile uint16_t _r6;
121 volatile uint32_t DTCVBR_SEC;
122 volatile uint32_t DTCDISP;
123 volatile uint32_t _r7;
124 volatile uint32_t DTEVR;
125 volatile uint32_t DTCIBR;
126 volatile uint8_t DTCOR;
127 volatile uint8_t _r8;
128 volatile uint16_t _r9;
129 volatile uint16_t DTCSQE;
130 volatile uint16_t _r10;
132
161typedef struct {
162 volatile uint32_t MR;
163 volatile uint32_t SAR;
164 volatile uint32_t DAR;
165 volatile uint16_t CRB;
166 volatile uint16_t CRA;
168
171static inline volatile r_dtc_regs_t* ra8_dtc(void)
172{
173 return (volatile r_dtc_regs_t*)k_ra8_dtc_base_addr;
174}
175
176#ifdef __cplusplus
177}
178#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_HW_REGISTER_ACCESS
Mark an MMIO accessor function (returns volatile register pointer).
ra8_dtc_dtcst_bits_t
@ k_ra8_dtcst_dtcst_msk
DTCST.DTCST mask.
@ k_ra8_dtcst_dtcst_pos
DTCST.DTCST bit position.
ra8_dtc_layout_t
@ k_ra8_dtc_vector_align
TI alignment within table (HUM 18.3.1).
@ k_ra8_dtc_xfer_info_size
Per-source TI block (HUM 18.2 p 793-797).
static volatile r_dtc_regs_t * ra8_dtc(void)
Get pointer to the DTC controller register block.
ra8_dtc_dtcsts_bits_t
@ k_ra8_dtcsts_vecn_msk
Active-vector number field.
@ k_ra8_dtcsts_act_msk
Active flag (bit 15).
ra8_dtc_addr_t
@ k_ra8_dtc_base_addr
DTC0 register block base.
ra8_dtc_dtcadmod_bits_t
@ k_ra8_dtcadmod_short_msk
SHORT mode bit.
ra8_dtc_vector_align_t
@ k_ra8_dtc_vector_table_align
DTCVBR write granularity (HUM 18.2.2).
ra8_dtc_dtccr_bits_t
@ k_ra8_dtccr_rrs_enable
DTCCR with RRS=1 (FSP value).
@ k_ra8_dtccr_rrs_disable
DTCCR with RRS=0 (FSP value).
@ k_ra8_dtccr_rrs_msk
DTCCR.RRS mask.
@ k_ra8_dtccr_rrs_pos
DTCCR.RRS bit position.
@ k_ra8_dtccr_reserved3
Bit 3: read-as-1 / write-as-1.
DTC controller register block at 0x4000AC00.
volatile uint16_t DTCSQE
+0x2C Sequence Transfer Enable (HUM 18.2.11).
volatile uint8_t _r2
+0x09 reserved.
volatile uint32_t _r7
+0x1C reserved.
volatile uint16_t _r10
+0x2E reserved.
volatile uint16_t _r3
+0x0A reserved.
volatile uint8_t _r5
+0x11 reserved.
volatile uint8_t DTCST
+0x0C Module Start Register (HUM 18.2.3).
volatile uint16_t _r1
+0x02 reserved.
volatile uint32_t DTCVBR_SEC
+0x14 Secure Vector Base (HUM 18.2.6).
volatile uint16_t _r9
+0x2A reserved.
volatile uint8_t DTCCR
+0x00 Control Register (HUM 18.2.1).
volatile uint32_t DTCVBR
+0x04 Vector Base Register (HUM 18.2.2).
volatile uint32_t DTCDISP
+0x18 Address Displacement (HUM 18.2.7).
volatile uint32_t DTEVR
+0x20 DTC Error Vector Register (HUM 18.2.8).
volatile uint8_t _r0
+0x01 reserved.
volatile uint8_t DTCOR
+0x28 Operation Register (HUM 18.2.10).
volatile uint8_t DTCCR_SEC
+0x10 Secure Control Register (HUM 18.2.5).
volatile uint16_t _r6
+0x12 reserved.
volatile uint8_t _r4
+0x0D reserved.
volatile uint16_t DTCSTS
+0x0E Status Register (HUM 18.2.4).
volatile uint32_t DTCIBR
+0x24 Index Table Base Register (HUM 18.2.9).
volatile uint8_t DTCADMOD
+0x08 Address Mode Register (HUM 18.2.12).
volatile uint8_t _r8
+0x29 reserved.
One 16-byte Transfer Information (TI) block referenced by the DTC vector table.
volatile uint32_t SAR
Source address register.
volatile uint16_t CRB
Block-count register (block mode only).
volatile uint16_t CRA
Transfer-count register (CRAH/CRAL).
volatile uint32_t MR
Mode word: [31:24] MRA, [23:16] MRB, [15:8] MRC.
volatile uint32_t DAR
Destination address register.