ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_bkup_regs.h File Reference

Battery Backup Function (VBATT / BAT*) register layout for the RA8D2. More...

#include <stdint.h>
Include dependency graph for ra8_bkup_regs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ra8_bkup_addr_t : uintptr_t { k_ra8_bkup_base_addr = 0x4001E000UL }
 Battery-backup register window base. More...
enum  ra8_bkup_off_t : uint16_t {
  k_ra8_bkup_off_vbrsabar = 0x3B0U ,
  k_ra8_bkup_off_vbrpabars = 0x3B4U ,
  k_ra8_bkup_off_vbrpabarns = 0x3B8U ,
  k_ra8_bkup_off_bbfsar = 0x3D0U ,
  k_ra8_bkup_off_vbattmnselr = 0xA84U ,
  k_ra8_bkup_off_vbtbpcr1 = 0xA88U ,
  k_ra8_bkup_off_vbtber = 0xC40U ,
  k_ra8_bkup_off_vbtbpcr2 = 0xC45U ,
  k_ra8_bkup_off_vbtbpsr = 0xC46U ,
  k_ra8_bkup_off_vbtadsr = 0xC48U ,
  k_ra8_bkup_off_vbtadcr1 = 0xC49U ,
  k_ra8_bkup_off_vbtadcr2 = 0xC4AU ,
  k_ra8_bkup_off_vbtictlr = 0xC4CU ,
  k_ra8_bkup_off_vbtictlr2 = 0xC4DU ,
  k_ra8_bkup_off_vbtimonr = 0xC4EU ,
  k_ra8_bkup_off_vbtncwcr = 0xC50U ,
  k_ra8_bkup_off_vbtadcr3 = 0xC54U ,
  k_ra8_bkup_off_vbtbkr0 = 0xD00U
}
 Byte-offsets of every BAT* / VBT* register the driver touches. More...
enum  ra8_bkup_limits_t : uint16_t {
  k_ra8_bkup_reg_count = 128U ,
  k_ra8_bkup_reg_stride = 1U ,
  k_ra8_bkup_word_count = 32U ,
  k_ra8_bkup_word_stride = 4U ,
  k_ra8_bkup_chan_count = 3U ,
  k_ra8_bkup_saba_align = 32U ,
  k_ra8_bkup_saba_align_mask = 0x1FU ,
  k_ra8_bkup_saba_max = 0xFFE0U
}
 Backup-register array dimensions and small numeric limits. More...
enum  ra8_bkup_vbtber_bit_t : uint8_t { k_ra8_bkup_vbtber_bit_vbae = 3U }
 Bit positions inside VBTBER (HUM Ch 12.2.6 p 504). More...
enum  ra8_bkup_vbtber_mask_t : uint8_t { k_ra8_bkup_vbtber_mask_vbae = 0x08U }
 Single-bit masks for VBTBER fields. More...
enum  ra8_bkup_vbtbpcr1_bit_t : uint8_t { k_ra8_bkup_vbtbpcr1_bit_bpwswstp = 0U }
 Bit positions inside VBTBPCR1 (HUM Ch 12.2.11 p 507). More...
enum  ra8_bkup_vbtbpcr1_mask_t : uint8_t { k_ra8_bkup_vbtbpcr1_mask_bpwswstp = 0x01U }
 Single-bit masks for VBTBPCR1. More...
enum  ra8_bkup_vbtbpcr2_bit_t : uint8_t {
  k_ra8_bkup_vbtbpcr2_bit_vdete = 4U ,
  k_ra8_bkup_vbtbpcr2_shift_lvl = 0U
}
 Bit positions inside VBTBPCR2 (HUM Ch 12.2.12 p 508). More...
enum  ra8_bkup_vbtbpcr2_mask_t : uint8_t {
  k_ra8_bkup_vbtbpcr2_mask_vdete = 0x10U ,
  k_ra8_bkup_vbtbpcr2_mask_lvl = 0x07U
}
 Field masks for VBTBPCR2. More...
enum  ra8_bkup_vbtbpsr_bit_t : uint8_t {
  k_ra8_bkup_vbtbpsr_bit_vbporf = 0U ,
  k_ra8_bkup_vbtbpsr_bit_vbporm = 4U ,
  k_ra8_bkup_vbtbpsr_bit_swm = 5U
}
 Bit positions inside VBTBPSR (HUM Ch 12.2.13 p 509). More...
enum  ra8_bkup_vbtbpsr_mask_t : uint8_t {
  k_ra8_bkup_vbtbpsr_mask_vbporf = 0x01U ,
  k_ra8_bkup_vbtbpsr_mask_vbporm = 0x10U ,
  k_ra8_bkup_vbtbpsr_mask_swm = 0x20U
}
 Single-bit masks for VBTBPSR. More...
enum  ra8_bkup_vbattmnselr_mask_t : uint8_t { k_ra8_bkup_vbattmnselr_mask_vbtmnsel = 0x01U }
 Single-bit masks for VBATTMNSELR (HUM Ch 12.2.5 p 503). More...
enum  ra8_bkup_vbtadsr_mask_t : uint8_t {
  k_ra8_bkup_vbtadsr_mask_vbtadf0 = 0x01U ,
  k_ra8_bkup_vbtadsr_mask_vbtadf1 = 0x02U ,
  k_ra8_bkup_vbtadsr_mask_vbtadf2 = 0x04U ,
  k_ra8_bkup_vbtadsr_mask_all = 0x07U
}
 Single-bit masks for VBTADSR tamper-detection flags (HUM Ch 12.2.14 p 510). More...
enum  ra8_bkup_vbtadcr1_mask_t : uint8_t {
  k_ra8_bkup_vbtadcr1_mask_vbtadie0 = 0x01U ,
  k_ra8_bkup_vbtadcr1_mask_vbtadie1 = 0x02U ,
  k_ra8_bkup_vbtadcr1_mask_vbtadie2 = 0x04U ,
  k_ra8_bkup_vbtadcr1_mask_vbtadce0 = 0x10U ,
  k_ra8_bkup_vbtadcr1_mask_vbtadce1 = 0x20U ,
  k_ra8_bkup_vbtadcr1_mask_vbtadce2 = 0x40U ,
  k_ra8_bkup_vbtadcr1_mask_ie_all = 0x07U ,
  k_ra8_bkup_vbtadcr1_mask_ce_all = 0x70U
}
 Bit masks for VBTADCR1 (HUM Ch 12.2.15 p 510). More...
enum  ra8_bkup_vbtadcr2_mask_t : uint8_t {
  k_ra8_bkup_vbtadcr2_mask_vbrtces0 = 0x01U ,
  k_ra8_bkup_vbtadcr2_mask_vbrtces1 = 0x02U ,
  k_ra8_bkup_vbtadcr2_mask_vbrtces2 = 0x04U ,
  k_ra8_bkup_vbtadcr2_mask_all = 0x07U
}
 Bit masks for VBTADCR2 (HUM Ch 12.2.16 p 511). More...
enum  ra8_bkup_vbtadcr3_mask_t : uint8_t {
  k_ra8_bkup_vbtadcr3_mask_vbtadze0 = 0x01U ,
  k_ra8_bkup_vbtadcr3_mask_vbtadze1 = 0x02U ,
  k_ra8_bkup_vbtadcr3_mask_vbtadze2 = 0x04U ,
  k_ra8_bkup_vbtadcr3_mask_all = 0x07U
}
 Bit masks for VBTADCR3 (HUM Ch 12.2.17 p 511). More...
enum  ra8_bkup_vbtictlr_mask_t : uint8_t {
  k_ra8_bkup_vbtictlr_mask_vch0inen = 0x01U ,
  k_ra8_bkup_vbtictlr_mask_vch1inen = 0x02U ,
  k_ra8_bkup_vbtictlr_mask_vch2inen = 0x04U ,
  k_ra8_bkup_vbtictlr_mask_all = 0x07U
}
 Bit masks for VBTICTLR (HUM Ch 12.2.8 p 505). More...
enum  ra8_bkup_vbtictlr2_mask_t : uint8_t {
  k_ra8_bkup_vbtictlr2_mask_vch0nce = 0x01U ,
  k_ra8_bkup_vbtictlr2_mask_vch1nce = 0x02U ,
  k_ra8_bkup_vbtictlr2_mask_vch2nce = 0x04U ,
  k_ra8_bkup_vbtictlr2_mask_vch0eg = 0x10U ,
  k_ra8_bkup_vbtictlr2_mask_vch1eg = 0x20U ,
  k_ra8_bkup_vbtictlr2_mask_vch2eg = 0x40U ,
  k_ra8_bkup_vbtictlr2_mask_nce_all = 0x07U ,
  k_ra8_bkup_vbtictlr2_mask_eg_all = 0x70U
}
 Bit masks for VBTICTLR2 (HUM Ch 12.2.9 p 506). More...
enum  ra8_bkup_vbtimonr_mask_t : uint8_t {
  k_ra8_bkup_vbtimonr_mask_vch0mon = 0x01U ,
  k_ra8_bkup_vbtimonr_mask_vch1mon = 0x02U ,
  k_ra8_bkup_vbtimonr_mask_vch2mon = 0x04U ,
  k_ra8_bkup_vbtimonr_mask_all = 0x07U
}
 Bit masks for VBTIMONR (HUM Ch 12.2.10 p 506). More...
enum  ra8_bkup_vbtncwcr_mask_t : uint8_t { k_ra8_bkup_vbtncwcr_mask_vincw = 0x07U }
 Bit masks for VBTNCWCR (HUM Ch 12.2.18 p 511). More...
enum  ra8_bkup_bbfsar_mask_t : uint32_t {
  k_ra8_bkup_bbfsar_mask_nonsec0 = 0x01UL ,
  k_ra8_bkup_bbfsar_mask_nonsec1 = 0x02UL ,
  k_ra8_bkup_bbfsar_mask_nonsec2 = 0x04UL ,
  k_ra8_bkup_bbfsar_mask_nonsec3 = 0x08UL ,
  k_ra8_bkup_bbfsar_mask_nonsec4 = 0x10UL ,
  k_ra8_bkup_bbfsar_mask_nonsec5 = 0x20UL ,
  k_ra8_bkup_bbfsar_mask_nonsec6 = 0x40UL ,
  k_ra8_bkup_bbfsar_mask_all = 0x7FUL
}
 BBFSAR target masks (HUM Ch 12.2.1 p 500). More...

Functions

static volatile uint8_t * ra8_bkup_vbattmnselr (void)
 Pointer to 8-bit VBATTMNSELR (HUM Ch 12.2.5 p 503).
static volatile uint8_t * ra8_bkup_vbtbpcr1 (void)
 Pointer to 8-bit VBTBPCR1 (HUM Ch 12.2.11 p 507).
static volatile uint8_t * ra8_bkup_vbtber (void)
 Pointer to 8-bit VBTBER (HUM Ch 12.2.6 p 504).
static volatile uint8_t * ra8_bkup_vbtbpcr2 (void)
 Pointer to 8-bit VBTBPCR2 (HUM Ch 12.2.12 p 508).
static volatile uint8_t * ra8_bkup_vbtbpsr (void)
 Pointer to 8-bit VBTBPSR (HUM Ch 12.2.13 p 509).
static volatile uint8_t * ra8_bkup_vbtadsr (void)
 Pointer to 8-bit VBTADSR (HUM Ch 12.2.14 p 509).
static volatile uint8_t * ra8_bkup_vbtadcr1 (void)
 Pointer to 8-bit VBTADCR1 (HUM Ch 12.2.15 p 510).
static volatile uint8_t * ra8_bkup_vbtadcr2 (void)
 Pointer to 8-bit VBTADCR2 (HUM Ch 12.2.16 p 511).
static volatile uint8_t * ra8_bkup_vbtadcr3 (void)
 Pointer to 8-bit VBTADCR3 (HUM Ch 12.2.17 p 511).
static volatile uint8_t * ra8_bkup_vbtictlr (void)
 Pointer to 8-bit VBTICTLR (HUM Ch 12.2.8 p 505).
static volatile uint8_t * ra8_bkup_vbtictlr2 (void)
 Pointer to 8-bit VBTICTLR2 (HUM Ch 12.2.9 p 506).
static volatile uint8_t * ra8_bkup_vbtimonr (void)
 Pointer to 8-bit VBTIMONR (HUM Ch 12.2.10 p 506).
static volatile uint8_t * ra8_bkup_vbtncwcr (void)
 Pointer to 8-bit VBTNCWCR (HUM Ch 12.2.18 p 511).
static volatile uint32_t * ra8_bkup_bbfsar (void)
 Pointer to 32-bit BBFSAR (HUM Ch 12.2.1 p 500).
static volatile uint16_t * ra8_bkup_vbrsabar (void)
 Pointer to 16-bit VBRSABAR (HUM Ch 12.2.2 p 502).
static volatile uint16_t * ra8_bkup_vbrpabars (void)
 Pointer to 16-bit VBRPABARS (HUM Ch 12.2.3 p 502).
static volatile uint16_t * ra8_bkup_vbrpabarns (void)
 Pointer to 16-bit VBRPABARNS (HUM Ch 12.2.4 p 503).
static volatile uint8_t * ra8_bkup_vbtbkr (uint16_t index)
 Pointer to one VBTBKRn byte (HUM Ch 12.2.7 p 505).
static volatile uint32_t * ra8_bkup_vbtbkr_word (uint8_t word_index)
 Pointer to one VBTBKR 32-bit word slot (4 bytes).

Detailed Description

Battery Backup Function (VBATT / BAT*) register layout for the RA8D2.

The RA8D2 battery backup block lives inside the SYSC peripheral window (base 0x4001_E000, non-secure alias 0x5001_E000). The full SYSC layout is described in ra8_system_regs.h; this header narrowly mirrors only the BAT* / VBT* register offsets so the battery-backup driver can be reviewed and extended without touching the shared system header.

Map (HUM Ch 12 "Battery Backup Function" p 498-519)

Offset Reg Width Purpose
0x3B0 VBRSABAR 16 Backup-register secure / non-secure boundary
0x3B4 VBRPABARS 16 Backup-register privilege boundary (Secure)
0x3B8 VBRPABARNS 16 Backup-register privilege boundary (Non-sec)
0x3D0 BBFSAR 32 Battery Backup security attribute
0xA84 VBATTMNSELR 8 VBATT voltage-monitor function select
0xA88 VBTBPCR1 8 Battery power-supply switch stop
0xC40 VBTBER 8 VBATT backup-register access enable (VBAE)
0xC45 VBTBPCR2 8 VBATT VDETBATT level + VDETE
0xC46 VBTBPSR 8 VBATT power-supply status (VBPORF/VBPORM/SWM)
0xC48 VBTADSR 8 VBATT tamper-detection status (VBTADF[2:0])
0xC49 VBTADCR1 8 Tamper IRQ enable + backup-clear enable
0xC4A VBTADCR2 8 RTC time-capture event source select
0xC4C VBTICTLR 8 RTCICn input enable
0xC4D VBTICTLR2 8 RTCICn edge / noise-canceller select
0xC4E VBTIMONR 8 RTCICn live input level monitor
0xC50 VBTNCWCR 8 Noise canceller width select
0xC54 VBTADCR3 8 Tamper HUK Zeroization enable
0xD00 VBTBKRn 8 128 backup-register bytes (n = 0..127)

Definition in file ra8_bkup_regs.h.

Enumeration Type Documentation

◆ ra8_bkup_addr_t

enum ra8_bkup_addr_t : uintptr_t

Battery-backup register window base.

Same physical base as k_ra8_system_base_addr – the BAT* registers live inside the SYSC block. We expose a separate enum value so the bkup driver does not have to depend on the system header.

Enumerator
k_ra8_bkup_base_addr 

SYSC + battery backup base.

Definition at line 59 of file ra8_bkup_regs.h.

◆ ra8_bkup_bbfsar_mask_t

enum ra8_bkup_bbfsar_mask_t : uint32_t

BBFSAR target masks (HUM Ch 12.2.1 p 500).

Enumerator
k_ra8_bkup_bbfsar_mask_nonsec0 

VBATTMNSELR.

k_ra8_bkup_bbfsar_mask_nonsec1 

VBTBER.

k_ra8_bkup_bbfsar_mask_nonsec2 

VBTICTLR/2/MONR.

k_ra8_bkup_bbfsar_mask_nonsec3 

VBTBPCR1/2 + VBTBPSR.

k_ra8_bkup_bbfsar_mask_nonsec4 

VBTADSR/CR1/CR2.

k_ra8_bkup_bbfsar_mask_nonsec5 

VBTADCR3.

k_ra8_bkup_bbfsar_mask_nonsec6 

VBTNCWCR.

k_ra8_bkup_bbfsar_mask_all 

All NONSEC bits.

Definition at line 242 of file ra8_bkup_regs.h.

◆ ra8_bkup_limits_t

enum ra8_bkup_limits_t : uint16_t

Backup-register array dimensions and small numeric limits.

Enumerator
k_ra8_bkup_reg_count 

128 byte-wide VBTBKRn slots.

k_ra8_bkup_reg_stride 

1 byte per VBTBKRn entry.

k_ra8_bkup_word_count 

128 bytes / 4 = 32 uint32_t words.

k_ra8_bkup_word_stride 

Bytes per uint32_t word.

k_ra8_bkup_chan_count 

RTCIC0..RTCIC2 tamper channels.

k_ra8_bkup_saba_align 

SABA boundary granularity (HUM Ch 12.2.2).

k_ra8_bkup_saba_align_mask 

Lower-5-bits-must-be-zero mask.

k_ra8_bkup_saba_max 

Maximum boundary address (last 32-byte slot).

Definition at line 95 of file ra8_bkup_regs.h.

◆ ra8_bkup_off_t

enum ra8_bkup_off_t : uint16_t

Byte-offsets of every BAT* / VBT* register the driver touches.

Citations are HUM Ch 12.2.x section numbers, all inside p 498..519.

Enumerator
k_ra8_bkup_off_vbrsabar 

VBRSABAR Ch 12.2.2 p 502.

k_ra8_bkup_off_vbrpabars 

VBRPABARS Ch 12.2.3 p 502.

k_ra8_bkup_off_vbrpabarns 

VBRPABARNS Ch 12.2.4 p 503.

k_ra8_bkup_off_bbfsar 

BBFSAR Ch 12.2.1 p 500.

k_ra8_bkup_off_vbattmnselr 

VBATTMNSELR Ch 12.2.5 p 503.

k_ra8_bkup_off_vbtbpcr1 

VBTBPCR1 Ch 12.2.11 p 507.

k_ra8_bkup_off_vbtber 

VBTBER Ch 12.2.6 p 504.

k_ra8_bkup_off_vbtbpcr2 

VBTBPCR2 Ch 12.2.12 p 508.

k_ra8_bkup_off_vbtbpsr 

VBTBPSR Ch 12.2.13 p 509.

k_ra8_bkup_off_vbtadsr 

VBTADSR Ch 12.2.14 p 509.

k_ra8_bkup_off_vbtadcr1 

VBTADCR1 Ch 12.2.15 p 510.

k_ra8_bkup_off_vbtadcr2 

VBTADCR2 Ch 12.2.16 p 511.

k_ra8_bkup_off_vbtictlr 

VBTICTLR Ch 12.2.8 p 505.

k_ra8_bkup_off_vbtictlr2 

VBTICTLR2 Ch 12.2.9 p 506.

k_ra8_bkup_off_vbtimonr 

VBTIMONR Ch 12.2.10 p 506.

k_ra8_bkup_off_vbtncwcr 

VBTNCWCR Ch 12.2.18 p 511.

k_ra8_bkup_off_vbtadcr3 

VBTADCR3 Ch 12.2.17 p 511.

k_ra8_bkup_off_vbtbkr0 

VBTBKR0..127 Ch 12.2.7 p 505.

Definition at line 70 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbattmnselr_mask_t

Single-bit masks for VBATTMNSELR (HUM Ch 12.2.5 p 503).

Enumerator
k_ra8_bkup_vbattmnselr_mask_vbtmnsel 

VBTMNSEL @ bit 0.

Definition at line 168 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtadcr1_mask_t

enum ra8_bkup_vbtadcr1_mask_t : uint8_t

Bit masks for VBTADCR1 (HUM Ch 12.2.15 p 510).

Enumerator
k_ra8_bkup_vbtadcr1_mask_vbtadie0 

VBTADIE0 @ bit 0.

k_ra8_bkup_vbtadcr1_mask_vbtadie1 

VBTADIE1 @ bit 1.

k_ra8_bkup_vbtadcr1_mask_vbtadie2 

VBTADIE2 @ bit 2.

k_ra8_bkup_vbtadcr1_mask_vbtadce0 

VBTADCE0 @ bit 4.

k_ra8_bkup_vbtadcr1_mask_vbtadce1 

VBTADCE1 @ bit 5.

k_ra8_bkup_vbtadcr1_mask_vbtadce2 

VBTADCE2 @ bit 6.

k_ra8_bkup_vbtadcr1_mask_ie_all 

All IE bits.

k_ra8_bkup_vbtadcr1_mask_ce_all 

All CE bits.

Definition at line 181 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtadcr2_mask_t

enum ra8_bkup_vbtadcr2_mask_t : uint8_t

Bit masks for VBTADCR2 (HUM Ch 12.2.16 p 511).

Enumerator
k_ra8_bkup_vbtadcr2_mask_vbrtces0 

VBRTCES0 @ bit 0.

k_ra8_bkup_vbtadcr2_mask_vbrtces1 

VBRTCES1 @ bit 1.

k_ra8_bkup_vbtadcr2_mask_vbrtces2 

VBRTCES2 @ bit 2.

k_ra8_bkup_vbtadcr2_mask_all 

All event-source bits.

Definition at line 193 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtadcr3_mask_t

enum ra8_bkup_vbtadcr3_mask_t : uint8_t

Bit masks for VBTADCR3 (HUM Ch 12.2.17 p 511).

Enumerator
k_ra8_bkup_vbtadcr3_mask_vbtadze0 

VBTADZE0 @ bit 0.

k_ra8_bkup_vbtadcr3_mask_vbtadze1 

VBTADZE1 @ bit 1.

k_ra8_bkup_vbtadcr3_mask_vbtadze2 

VBTADZE2 @ bit 2.

k_ra8_bkup_vbtadcr3_mask_all 

All zeroize bits.

Definition at line 201 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtadsr_mask_t

enum ra8_bkup_vbtadsr_mask_t : uint8_t

Single-bit masks for VBTADSR tamper-detection flags (HUM Ch 12.2.14 p 510).

Enumerator
k_ra8_bkup_vbtadsr_mask_vbtadf0 

VBTADF0: RTCIC0 event.

k_ra8_bkup_vbtadsr_mask_vbtadf1 

VBTADF1: RTCIC1 event.

k_ra8_bkup_vbtadsr_mask_vbtadf2 

VBTADF2: RTCIC2 event.

k_ra8_bkup_vbtadsr_mask_all 

Combined VBTADF[2:0].

Definition at line 173 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtber_bit_t

enum ra8_bkup_vbtber_bit_t : uint8_t

Bit positions inside VBTBER (HUM Ch 12.2.6 p 504).

Enumerator
k_ra8_bkup_vbtber_bit_vbae 

VBAE: VBTBKRn access enable.

Definition at line 110 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtber_mask_t

enum ra8_bkup_vbtber_mask_t : uint8_t

Single-bit masks for VBTBER fields.

Enumerator
k_ra8_bkup_vbtber_mask_vbae 

VBAE @ bit 3.

Definition at line 118 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpcr1_bit_t

enum ra8_bkup_vbtbpcr1_bit_t : uint8_t

Bit positions inside VBTBPCR1 (HUM Ch 12.2.11 p 507).

Enumerator
k_ra8_bkup_vbtbpcr1_bit_bpwswstp 

Battery power-supply switch stop.

Definition at line 126 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpcr1_mask_t

enum ra8_bkup_vbtbpcr1_mask_t : uint8_t

Single-bit masks for VBTBPCR1.

Enumerator
k_ra8_bkup_vbtbpcr1_mask_bpwswstp 

BPWSWSTP @ bit 0.

Definition at line 131 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpcr2_bit_t

enum ra8_bkup_vbtbpcr2_bit_t : uint8_t

Bit positions inside VBTBPCR2 (HUM Ch 12.2.12 p 508).

Enumerator
k_ra8_bkup_vbtbpcr2_bit_vdete 

VDETE: VCC drop-detection enable.

k_ra8_bkup_vbtbpcr2_shift_lvl 

VDETLVL[2:0] @ [2:0].

Definition at line 139 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpcr2_mask_t

enum ra8_bkup_vbtbpcr2_mask_t : uint8_t

Field masks for VBTBPCR2.

Enumerator
k_ra8_bkup_vbtbpcr2_mask_vdete 

VDETE @ bit 4.

k_ra8_bkup_vbtbpcr2_mask_lvl 

VDETLVL[2:0].

Definition at line 145 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpsr_bit_t

enum ra8_bkup_vbtbpsr_bit_t : uint8_t

Bit positions inside VBTBPSR (HUM Ch 12.2.13 p 509).

Enumerator
k_ra8_bkup_vbtbpsr_bit_vbporf 

VBATT_POR flag (W0C).

k_ra8_bkup_vbtbpsr_bit_vbporm 

VBATT_R level monitor.

k_ra8_bkup_vbtbpsr_bit_swm 

Battery switch monitor.

Definition at line 154 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtbpsr_mask_t

enum ra8_bkup_vbtbpsr_mask_t : uint8_t

Single-bit masks for VBTBPSR.

Enumerator
k_ra8_bkup_vbtbpsr_mask_vbporf 

VBATT_POR flag.

k_ra8_bkup_vbtbpsr_mask_vbporm 

VBATT_R OK.

k_ra8_bkup_vbtbpsr_mask_swm 

Switch monitor.

Definition at line 161 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtictlr2_mask_t

enum ra8_bkup_vbtictlr2_mask_t : uint8_t

Bit masks for VBTICTLR2 (HUM Ch 12.2.9 p 506).

Enumerator
k_ra8_bkup_vbtictlr2_mask_vch0nce 

VCH0NCE @ bit 0.

k_ra8_bkup_vbtictlr2_mask_vch1nce 

VCH1NCE @ bit 1.

k_ra8_bkup_vbtictlr2_mask_vch2nce 

VCH2NCE @ bit 2.

k_ra8_bkup_vbtictlr2_mask_vch0eg 

VCH0EG @ bit 4.

k_ra8_bkup_vbtictlr2_mask_vch1eg 

VCH1EG @ bit 5.

k_ra8_bkup_vbtictlr2_mask_vch2eg 

VCH2EG @ bit 6.

k_ra8_bkup_vbtictlr2_mask_nce_all 

All NCE bits.

k_ra8_bkup_vbtictlr2_mask_eg_all 

All EG bits.

Definition at line 217 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtictlr_mask_t

enum ra8_bkup_vbtictlr_mask_t : uint8_t

Bit masks for VBTICTLR (HUM Ch 12.2.8 p 505).

Enumerator
k_ra8_bkup_vbtictlr_mask_vch0inen 

VCH0INEN @ bit 0.

k_ra8_bkup_vbtictlr_mask_vch1inen 

VCH1INEN @ bit 1.

k_ra8_bkup_vbtictlr_mask_vch2inen 

VCH2INEN @ bit 2.

k_ra8_bkup_vbtictlr_mask_all 

All input-enable bits.

Definition at line 209 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtimonr_mask_t

enum ra8_bkup_vbtimonr_mask_t : uint8_t

Bit masks for VBTIMONR (HUM Ch 12.2.10 p 506).

Enumerator
k_ra8_bkup_vbtimonr_mask_vch0mon 

VCH0MON @ bit 0.

k_ra8_bkup_vbtimonr_mask_vch1mon 

VCH1MON @ bit 1.

k_ra8_bkup_vbtimonr_mask_vch2mon 

VCH2MON @ bit 2.

k_ra8_bkup_vbtimonr_mask_all 

All MON bits.

Definition at line 229 of file ra8_bkup_regs.h.

◆ ra8_bkup_vbtncwcr_mask_t

enum ra8_bkup_vbtncwcr_mask_t : uint8_t

Bit masks for VBTNCWCR (HUM Ch 12.2.18 p 511).

Enumerator
k_ra8_bkup_vbtncwcr_mask_vincw 

VINCW[2:0] @ [2:0].

Definition at line 237 of file ra8_bkup_regs.h.

Function Documentation

◆ ra8_bkup_bbfsar()

volatile uint32_t * ra8_bkup_bbfsar ( void )
inlinestatic

Pointer to 32-bit BBFSAR (HUM Ch 12.2.1 p 500).

Definition at line 338 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_bbfsar.

Referenced by ra8_bkup_security_apply(), and ra8_bkup_security_get().

◆ ra8_bkup_vbattmnselr()

volatile uint8_t * ra8_bkup_vbattmnselr ( void )
inlinestatic

Pointer to 8-bit VBATTMNSELR (HUM Ch 12.2.5 p 503).

Definition at line 259 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbattmnselr.

Referenced by ra8_bkup_get_voltage_monitor_enabled(), and ra8_bkup_set_voltage_monitor().

◆ ra8_bkup_vbrpabarns()

volatile uint16_t * ra8_bkup_vbrpabarns ( void )
inlinestatic

Pointer to 16-bit VBRPABARNS (HUM Ch 12.2.4 p 503).

Definition at line 357 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbrpabarns.

Referenced by ra8_bkup_security_apply(), and ra8_bkup_security_get().

◆ ra8_bkup_vbrpabars()

volatile uint16_t * ra8_bkup_vbrpabars ( void )
inlinestatic

Pointer to 16-bit VBRPABARS (HUM Ch 12.2.3 p 502).

Definition at line 350 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbrpabars.

Referenced by ra8_bkup_security_apply(), and ra8_bkup_security_get().

◆ ra8_bkup_vbrsabar()

volatile uint16_t * ra8_bkup_vbrsabar ( void )
inlinestatic

Pointer to 16-bit VBRSABAR (HUM Ch 12.2.2 p 502).

Definition at line 344 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbrsabar.

Referenced by ra8_bkup_security_apply(), and ra8_bkup_security_get().

◆ ra8_bkup_vbtadcr1()

volatile uint8_t * ra8_bkup_vbtadcr1 ( void )
inlinestatic

Pointer to 8-bit VBTADCR1 (HUM Ch 12.2.15 p 510).

Definition at line 296 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtadcr1.

Referenced by ra8_bkup_isr_handle(), ra8_bkup_no_switch_init(), ra8_bkup_tamper_disable(), and ra8_bkup_tamper_init().

◆ ra8_bkup_vbtadcr2()

volatile uint8_t * ra8_bkup_vbtadcr2 ( void )
inlinestatic

Pointer to 8-bit VBTADCR2 (HUM Ch 12.2.16 p 511).

Definition at line 302 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtadcr2.

Referenced by ra8_bkup_no_switch_init(), ra8_bkup_tamper_disable(), and ra8_bkup_tamper_init().

◆ ra8_bkup_vbtadcr3()

volatile uint8_t * ra8_bkup_vbtadcr3 ( void )
inlinestatic

Pointer to 8-bit VBTADCR3 (HUM Ch 12.2.17 p 511).

Definition at line 308 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtadcr3.

Referenced by ra8_bkup_tamper_disable(), and ra8_bkup_tamper_init().

◆ ra8_bkup_vbtadsr()

volatile uint8_t * ra8_bkup_vbtadsr ( void )
inlinestatic

◆ ra8_bkup_vbtber()

volatile uint8_t * ra8_bkup_vbtber ( void )
inlinestatic

Pointer to 8-bit VBTBER (HUM Ch 12.2.6 p 504).

Definition at line 272 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtber.

Referenced by ra8_bkup_deinit(), and ra8_bkup_init().

◆ ra8_bkup_vbtbkr()

volatile uint8_t * ra8_bkup_vbtbkr ( uint16_t index)
inlinestatic

Pointer to one VBTBKRn byte (HUM Ch 12.2.7 p 505).

Parameters
[in]indexBackup-register index in 0..127. Out-of-range indices return nullptr (the caller is expected to validate, but the accessor is defensive).
Returns
Volatile pointer to the byte slot, or nullptr if index >= k_ra8_bkup_reg_count.

Definition at line 372 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, k_ra8_bkup_off_vbtbkr0, k_ra8_bkup_reg_count, and k_ra8_bkup_reg_stride.

Referenced by ra8_bkup_read_byte(), ra8_bkup_write_byte(), and ra8_bkup_zero_all().

◆ ra8_bkup_vbtbkr_word()

volatile uint32_t * ra8_bkup_vbtbkr_word ( uint8_t word_index)
inlinestatic

Pointer to one VBTBKR 32-bit word slot (4 bytes).

Parameters
[in]word_indexWord index in 0..31. The 128-byte VBTBKRn array is little-endian per HUM Ch 12.2.7.
Returns
Volatile pointer to the word slot, or nullptr if out of range.

Definition at line 389 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, k_ra8_bkup_off_vbtbkr0, k_ra8_bkup_word_count, and k_ra8_bkup_word_stride.

Referenced by ra8_bkup_read_word(), and ra8_bkup_write_word().

◆ ra8_bkup_vbtbpcr1()

volatile uint8_t * ra8_bkup_vbtbpcr1 ( void )
inlinestatic

Pointer to 8-bit VBTBPCR1 (HUM Ch 12.2.11 p 507).

Definition at line 266 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtbpcr1.

Referenced by ra8_bkup_cold_start_init(), ra8_bkup_deinit(), ra8_bkup_init(), and ra8_bkup_no_switch_init().

◆ ra8_bkup_vbtbpcr2()

volatile uint8_t * ra8_bkup_vbtbpcr2 ( void )
inlinestatic

Pointer to 8-bit VBTBPCR2 (HUM Ch 12.2.12 p 508).

Definition at line 278 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtbpcr2.

Referenced by ra8_bkup_cold_start_init(), ra8_bkup_init(), and ra8_bkup_no_switch_init().

◆ ra8_bkup_vbtbpsr()

volatile uint8_t * ra8_bkup_vbtbpsr ( void )
inlinestatic

◆ ra8_bkup_vbtictlr()

volatile uint8_t * ra8_bkup_vbtictlr ( void )
inlinestatic

Pointer to 8-bit VBTICTLR (HUM Ch 12.2.8 p 505).

Definition at line 314 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtictlr.

Referenced by ra8_bkup_no_switch_init(), ra8_bkup_set_input_enable(), ra8_bkup_tamper_disable(), and ra8_bkup_tamper_init().

◆ ra8_bkup_vbtictlr2()

volatile uint8_t * ra8_bkup_vbtictlr2 ( void )
inlinestatic

Pointer to 8-bit VBTICTLR2 (HUM Ch 12.2.9 p 506).

Definition at line 320 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtictlr2.

Referenced by ra8_bkup_no_switch_init(), ra8_bkup_tamper_disable(), and ra8_bkup_tamper_init().

◆ ra8_bkup_vbtimonr()

volatile uint8_t * ra8_bkup_vbtimonr ( void )
inlinestatic

Pointer to 8-bit VBTIMONR (HUM Ch 12.2.10 p 506).

Definition at line 326 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtimonr.

Referenced by ra8_bkup_read_input().

◆ ra8_bkup_vbtncwcr()

volatile uint8_t * ra8_bkup_vbtncwcr ( void )
inlinestatic

Pointer to 8-bit VBTNCWCR (HUM Ch 12.2.18 p 511).

Definition at line 332 of file ra8_bkup_regs.h.

References k_ra8_bkup_base_addr, and k_ra8_bkup_off_vbtncwcr.

Referenced by ra8_bkup_tamper_init().