|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Interrupt Control Unit (ICU) register layout for the Renesas RA8D2. More...
#include <stdint.h>Go to the source code of this file.
Functions | |
| static volatile uint32_t * | ra8_icu_nmier (void) |
| Get pointer to the 32-bit NMIER register. | |
| static volatile uint32_t * | ra8_icu_nmisr (void) |
| Get pointer to the 32-bit NMISR register. | |
| static volatile uint32_t * | ra8_icu_nmiclr (void) |
| Get pointer to the 32-bit NMICLR register. | |
| static volatile uint8_t * | ra8_icu_nmicr (void) |
| Get pointer to the 8-bit NMICR register. | |
| static volatile uint32_t * | ra8_icu_wupen0 (void) |
| Get pointer to the 32-bit WUPEN0 register. | |
| static volatile uint32_t * | ra8_icu_wupen1 (void) |
| Get pointer to the 32-bit WUPEN1 register. | |
| static volatile uint32_t * | ra8_icu_delsr (uint8_t index) |
| Get pointer to DELSR[index], the DMAC Event Link Setting Register. | |
| static volatile uint32_t * | ra8_icu_ielsr (uint16_t index) |
| Get pointer to IELSR register N. | |
| static volatile uint8_t * | ra8_icu_irqcr (uint8_t irq_num) |
| Get pointer to the IRQCRi register for IRQ channel irq_num. | |
Interrupt Control Unit (ICU) register layout for the Renesas RA8D2.
The RA Interrupt Control Unit sits between the peripheral event sources and the two Cortex-M NVICs (one per core). Unlike most Cortex-M chips, peripheral interrupt numbers on RA are programmable: you tell the ICU "please route event X to NVIC line Y", then enable line Y in the NVIC as usual. The event-to-line map lives in the IELSR registers below.
| Offset | Name | Width | Purpose |
|---|---|---|---|
| 0x000 | IRQCR0-15 | 8 | External IRQ input digital filter |
| 0x100 | NMICR | 8 | NMI pin control |
| 0x300 | IELSR0..n | 32 | Event Link Setting Registers |
| 0x1000 | IELSRN0..m | 32 | (secure copy / non-secure copies) |
Definition in file ra8_icu_regs.h.
| enum ra8_icu_addr_t : uintptr_t |
| Enumerator | |
|---|---|
| k_ra8_icu_base_addr | R_ICU block base. |
Definition at line 52 of file ra8_icu_regs.h.
| enum ra8_icu_fclksel_t : uint8_t |
IRQCRi.FCLKSEL[1:0] digital filter sampling clock (HUM 14.2.12 p 535).
Definition at line 100 of file ra8_icu_regs.h.
| enum ra8_icu_irqcr_bit_t : uint8_t |
IRQCRi bit positions.
| Enumerator | |
|---|---|
| k_ra8_icu_irqcr_bit_fclksel | FCLKSEL[1:0] at bits 5..4. |
| k_ra8_icu_irqcr_bit_flten | FLTEN at bit 7. |
Definition at line 111 of file ra8_icu_regs.h.
| enum ra8_icu_irqcr_mask_t : uint8_t |
IRQCRi bit masks.
| Enumerator | |
|---|---|
| k_ra8_icu_irqcr_mask_irqmd | IRQMD[1:0] bits 1..0. |
| k_ra8_icu_irqcr_mask_fclksel | FCLKSEL[1:0] bits 5..4. |
| k_ra8_icu_irqcr_mask_flten | FLTEN bit 7. |
Definition at line 120 of file ra8_icu_regs.h.
| enum ra8_icu_irqmd_t : uint8_t |
IRQCRi.IRQMD[1:0] detection sense values (HUM 14.2.12 p 535).
| Enumerator | |
|---|---|
| k_ra8_icu_irqmd_falling | 00: falling edge. |
| k_ra8_icu_irqmd_rising | 01: rising edge. |
| k_ra8_icu_irqmd_both | 10: rising OR falling. |
| k_ra8_icu_irqmd_low | 11: low-level sensitive. |
Definition at line 89 of file ra8_icu_regs.h.
| enum ra8_icu_limits_t : uint16_t |
Definition at line 56 of file ra8_icu_regs.h.
| enum ra8_icu_off_t : uint32_t |
Definition at line 70 of file ra8_icu_regs.h.
| enum ra8_ielsr_bit_t : uint8_t |
Bit positions in an IELSR register.
Cross-checked against FSP R_ICU_Type::IELSR_b[96] in R7KA8D2KF_core0.h: IELS is a 10-bit field at [9:0], IR (interrupt status flag, RW1C) at [16], DTCE at [24]. HUM Ch 14.2.17 "IELSRn : ICU Event Link Setting Register n", p 524.
| Enumerator | |
|---|---|
| k_ra8_ielsr_iels_shift | IELS event-select shift, bits [9:0]. |
| k_ra8_ielsr_ir_bit | IR interrupt status flag (W0C). |
| k_ra8_ielsr_dtce_bit | DTCE: DTC activation enable. |
Definition at line 263 of file ra8_icu_regs.h.
| enum ra8_ielsr_mask_t : uint32_t |
| Enumerator | |
|---|---|
| k_ra8_ielsr_iels_mask | IELS field mask (10 bits). |
| k_ra8_ielsr_ir_mask | IR bit mask (RW1C). |
| k_ra8_ielsr_dtce_mask | DTCE bit mask. |
Definition at line 269 of file ra8_icu_regs.h.
|
inlinestatic |
Get pointer to DELSR[index], the DMAC Event Link Setting Register.
DELSR has 8 entries, each a 32-bit register with DELS at [9:0] and IR at [16]. HUM Ch 14 "DELSRn : DMAC Event Link Setting Register n", p 524..582.
| [in] | index | DELSR slot 0..7. |
< RA8 icu number delsr.
Definition at line 187 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_delsr0.
|
inlinestatic |
Get pointer to IELSR register N.
Definition at line 205 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, k_ra8_icu_num_ielsr, and k_ra8_icu_off_ielsr0.
Referenced by dtc_coh_arm_slot(), dtc_demo_arm_slot(), internal_ielsr_clear(), internal_ielsr_write(), ra8_isr_dispatch(), and ra8_isr_set_dtc().
|
inlinestatic |
Get pointer to the IRQCRi register for IRQ channel irq_num.
RA8D2 has 32 external IRQ channels split across two 16-deep arrays:
Mirrors the FSP ICU_IRQCR_CH(c) macro: for c in 16..31 the byte offset is c + 4 from IRQCRa[0] which lands inside IRQCRb after the 4-byte NMICR/reserved gap.
HUM Ch 14.2.12 "IRQCRi : IRQ Control Register", p 535
| [in] | irq_num | IRQ channel 0..31. |
Definition at line 232 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, k_ra8_icu_irqcrb_first, k_ra8_icu_irqcrb_offset, k_ra8_icu_num_irqs, and k_ra8_icu_off_irqcra0.
Referenced by ra8_icu_configure_irq_pin(), ra8_icu_init(), and ra8_icu_read_irqcr().
|
inlinestatic |
Get pointer to the 32-bit NMICLR register.
Definition at line 139 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_nmiclr.
Referenced by ra8_icu_init(), and ra8_icu_nmi_clear().
|
inlinestatic |
Get pointer to the 8-bit NMICR register.
Definition at line 145 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_nmicr.
|
inlinestatic |
Get pointer to the 32-bit NMIER register.
Definition at line 127 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_nmier.
Referenced by ra8_icu_init(), ra8_icu_nmi_disable(), and ra8_icu_nmi_enable().
|
inlinestatic |
Get pointer to the 32-bit NMISR register.
Definition at line 133 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_nmisr.
Referenced by internal_nmi_report(), internal_ra8_board_nmi_report(), and ra8_icu_nmi_status().
|
inlinestatic |
Get pointer to the 32-bit WUPEN0 register.
WUPEN0 holds 16 IRQWUPENn bits (channels 0..15) at [15:0] and 16 peripheral WUPENn bits at [31:16]. HUM Ch 14 "WUPEN : Wake Up Interrupt Enable Register 0", p 524..582.
Definition at line 158 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_wupen0.
Referenced by ra8_icu_init().
|
inlinestatic |
Get pointer to the 32-bit WUPEN1 register.
WUPEN1 holds 16 peripheral WUPEN16..31 bits at [15:0] and 16 IRQWUPEN16..31 bits at [31:16]. HUM Ch 14 "WUPEN : Wake Up Interrupt Enable Register 1", p 524..582.
Definition at line 171 of file ra8_icu_regs.h.
References k_ra8_icu_base_addr, and k_ra8_icu_off_wupen1.
Referenced by ra8_icu_init().