|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Asynchronous General-Purpose Timer (AGT) register layout for RA8D2. More...
Go to the source code of this file.
Data Structures | |
| struct | r_agt_regs_t |
| AGT (16-bit view) register layout, one per channel. More... | |
Functions | |
| static volatile r_agt_regs_t * | ra8_agt (uint8_t channel) |
| Get pointer to AGT channel N. | |
Asynchronous General-Purpose Timer (AGT) register layout for RA8D2.
The AGT is a 16-bit down-counter typically used as a tick timer or a low-power wakeup source. RA8D2 has AGTX0..AGTX9 at 0x40221000 with a 0x100 stride per instance. Each AGT can clock from PCLKB, LOCO, subclock, or an underflow of another AGT. RA8D2 also exposes each channel as a 32-bit AGTW alias starting at offset 0x00; the 16-bit and 32-bit views overlay the same channel registers and the 8-bit CTRL block lives at offset 0x08 (16-bit view) / 0x0C (32-bit view). This driver targets the 16-bit view and matches the authoritative FSP R_AGTX0_AGT16_Type layout exactly. HUM Ch 24 "Low Power Asynchronous General Purpose Timer (AGT)" p 1164-1186.
Definition in file ra8_agt_regs.h.
| enum ra8_agt_addr_t : uintptr_t |
| Enumerator | |
|---|---|
| k_ra8_agt0_base_addr | RA8 agt0 base address. |
Definition at line 32 of file ra8_agt_regs.h.
| enum ra8_agt_agtcmsr_masks_t : uint8_t |
AGTCMSR (AGT Compare Match Function Select) bit masks.
HUM Ch 24.2.9 "AGTCMSR : AGT Compare Match Function Select Register" p 1172.
Definition at line 109 of file ra8_agt_regs.h.
| enum ra8_agt_agtcr_bits_t : uint8_t |
AGTCR (AGT Control Register) bit positions.
HUM Ch 24.2.4 "AGTCR : AGT Control Register" p 1167.
Definition at line 45 of file ra8_agt_regs.h.
| enum ra8_agt_agtcr_masks_t : uint8_t |
AGTCR bit masks.
Mirror of ra8_agt_agtcr_bits_t for ALU use.
Definition at line 59 of file ra8_agt_regs.h.
| enum ra8_agt_agtioc_masks_t : uint8_t |
AGTIOC (AGT I/O Control Register) bit masks.
HUM Ch 24.2.7 "AGTIOC : AGT I/O Control Register" p 1170.
| Enumerator | |
|---|---|
| k_ra8_agt_agtioc_tedgsel_msk | Output polarity bit 0. |
| k_ra8_agt_agtioc_toe_msk | AGTOn pin output enable. |
Definition at line 89 of file ra8_agt_regs.h.
| enum ra8_agt_agtmr1_fields_t : uint8_t |
AGTMR1 (AGT Mode Register 1) field encodings.
HUM Ch 24.2.5 "AGTMR1 : AGT Mode Register 1" p 1168.
Definition at line 73 of file ra8_agt_regs.h.
| enum ra8_agt_cascade_channels_t : uint8_t |
Cascade-mode channel indices.
RA8D2 only supports cascade on the AGT0 / AGT1 pair – AGT1's TCK[2:0] = 101b uses "Underflow event signal from AGT0" (HUM Ch 24.2.5 p 1168, Note 6).
| Enumerator | |
|---|---|
| k_ra8_agt_cascade_lo_channel | Low 16 bits live in AGT0. |
| k_ra8_agt_cascade_hi_channel | High 16 bits live in AGT1. |
Definition at line 124 of file ra8_agt_regs.h.
| enum ra8_agt_compare_sentinel_t : uint16_t |
Compare-match register "parked" sentinel.
HUM Ch 24.2.2 "AGTCMA : AGT Compare Match A Register" p 1166 Note 1: "Set the AGTCMA register to 0xFFFF when compare match A is not used." Same applies to AGTCMB (HUM Ch 24.2.3 p 1166).
| Enumerator | |
|---|---|
| k_ra8_agt_compare_parked_value | RA8 AGT compare parked value. |
Definition at line 100 of file ra8_agt_regs.h.
| enum ra8_agt_limits_t : uint16_t |
| Enumerator | |
|---|---|
| k_ra8_agt_channel_count | RA8 AGT channel count. |
| k_ra8_agt_channel_stride | RA8 AGT channel stride. |
Definition at line 36 of file ra8_agt_regs.h.
|
inlinestatic |
Get pointer to AGT channel N.
Definition at line 157 of file ra8_agt_regs.h.
References k_ra8_agt0_base_addr, k_ra8_agt_channel_count, and k_ra8_agt_channel_stride.
Referenced by internal_agt_cascade_resolve_halves(), ra8_agt_deinit(), ra8_agt_dispatch(), ra8_agt_enter_stop(), ra8_agt_exit_stop(), ra8_agt_get_status(), ra8_agt_set_reload(), ra8_agt_start_free_run(), ra8_agt_start_pulse_output(), and ra8_agt_stop().