39static const char*
s_tag =
"LPM";
68 for (uint32_t i = 0U; i < limit; ++i) {
71 if (is_set == want_set) {
173 if (timeout_iters == 0U) {
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_RETURN_ON_ERROR(err, tag, message)
Early return on error, propagating the code upward.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_err_hw_timeout
Hardware timed out waiting for a flag or handshake.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info(tag, message)
RA8 log info.
#define ra8_log_error(tag, message)
RA8 log error.
Low Power Mode (LPM) HAL driver – public API.
static void internal_graphics_enable_moco(void)
Start MOCO so the graphics power-gating controller has a clock.
static ra8_err_t internal_graphics_confirm_ready(uint32_t limit)
Wait until PDCSF = 0 and PDPGSF = 1 (domain ready for the clear).
static ra8_err_t internal_pdctrgd_wait(uint8_t mask, bool want_set, uint32_t limit)
Poll a PDCTRGD status flag until it reads the wanted level.
ra8_err_t ra8_lpm_graphics_power_on(uint32_t timeout_iters)
Power the graphics domain on (DRW / GLCDC / MIPI DSI+CSI / VIN).
static void internal_graphics_clear_pdde(void)
Clear PDDE under the PRC1 unlock so the domain powers on.
static ra8_err_t internal_graphics_confirm_powered(uint32_t limit)
Wait until PDCSF = 0 and PDPGSF = 0 (gating finished, domain live).
Low Power Mode (LPM) register layout for the Renesas RA8D2.
@ k_ra8_lpm_pdctr_pdcsf_mask
PDCSF @ bit 6: control busy.
@ k_ra8_lpm_pdctr_pdpgsf_mask
PDPGSF @ bit 7: 1 = gated off.
@ k_ra8_lpm_pdctrgd_off
PDCTRGD (8b) – HUM Ch 11.2.14 p 452.
@ k_ra8_lpm_mococr_off
MOCOCR (8b) – HUM Ch 9.2.18 p 346.
@ k_ra8_lpm_clock_stop_mask
STOP @ bit 0 in every OCR.
static volatile uint8_t * ra8_lpm_sysc_reg8(ra8_lpm_off_t off)
Return a typed pointer to an 8-bit SYSC register.
Scoped PRCR unlock helper.
#define RA8_PROTECTED_WRITE(unlock_val)
Scoped PRCR unlock block.
@ k_ra8_prcr_unlock_cgc
RA8 prcr unlock cgc.
@ k_ra8_prcr_unlock_lpm
RA8 prcr unlock lpm.