|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Real-Time Clock (RTC) register layout for the Renesas RA8D2. More...
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | r_rtc_regs_t |
| RTC register window matching FSP R_RTC_Type byte-for-byte. More... | |
Functions | |
| static volatile r_rtc_regs_t * | ra8_rtc (void) |
| Get pointer to the RTC block. | |
Real-Time Clock (RTC) register layout for the Renesas RA8D2.
RTC block at 0x40202000. Layout re-derived against FSP R_RTC_Type (BSP header R7KA8D2KF_core0.h, size 128 / 0x80) and cross-checked against HUM Ch 26 "Realtime Clock (RTC)" pages 1219..1255.
Two operating modes:
Important offset notes vs the older spin of this header:
All time/date count and alarm registers are BCD-encoded. The RTC clock source is selected in CGC (sub-clock or LOCO) before this driver is brought up.
Definition in file ra8_rtc_regs.h.
| enum ra8_rcr1_bit_t : uint8_t |
Bit positions in RCR1 (HUM Ch 26.2.3 p 1229).
Definition at line 168 of file ra8_rtc_regs.h.
| enum ra8_rcr2_bit_t : uint8_t |
Bit positions in RCR2 (HUM Ch 26.2.4 p 1230).
Re-derived against FSP R_RTC_Type::RCR2_b: START.0, RESET.1, ADJ30.2, RTCOE.3, AADJE.4, AADJP.5, HR24.6, CNTMD.7. The previous spin of this enum had aadje at bit 5; that was wrong – bit 4 is AADJE, bit 5 is AADJP.
Definition at line 186 of file ra8_rtc_regs.h.
| enum ra8_rcr4_bit_t : uint8_t |
Bit positions in RCR4 (HUM Ch 26.2.6 p 1232 area).
| Enumerator | |
|---|---|
| k_ra8_rcr4_bit_rcksel | Count source select. |
| k_ra8_rcr4_bit_ropsel | RTC operation mode select. |
Definition at line 201 of file ra8_rtc_regs.h.
| enum ra8_rtc_addr_t : uintptr_t |
| Enumerator | |
|---|---|
| k_ra8_rtc_base_addr | RA8 rtc base address. |
Definition at line 42 of file ra8_rtc_regs.h.
| enum ra8_rtc_layout_t : uint8_t |
Authoritative struct offsets used by the layout asserts below.
Mirrors FSP R_RTC_Type (BSP R7KA8D2KF_core0.h, total size 0x80). Kept as a typed enum so the static_assert lines below do not contain magic numbers (clang-tidy readability-magic-numbers).
Definition at line 135 of file ra8_rtc_regs.h.
|
inlinestatic |
Get pointer to the RTC block.
Definition at line 159 of file ra8_rtc_regs.h.
References k_ra8_rtc_base_addr.
Referenced by ra8_rtc_clear_status(), ra8_rtc_clock_init(), ra8_rtc_deinit(), ra8_rtc_dispatch(), ra8_rtc_enter_stop(), ra8_rtc_exit_stop(), ra8_rtc_get(), ra8_rtc_get_status(), ra8_rtc_init(), ra8_rtc_set(), ra8_rtc_set_alarm(), and ra8_rtc_set_irq_enable().