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

Module-private graphics power-domain state for the gated blocks. More...

#include "ra8_attributes.h"
Include dependency graph for board_periph_pdctr_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool priv_board_pdctr_graphics_powered (void)
 Report whether the graphics power domain is currently powered.

Detailed Description

Module-private graphics power-domain state for the gated blocks.

The RA8D2 graphics power domain (MIPI DSI, MIPI CSI, VIN, DRW, GLCDC – HUM Ch 11.5.1 Table 11.7 p 480) is gated OFF at reset by PDCTRGD (HUM Ch 11.2.14 p 452). While it is gated, the peripherals inside it are unpowered: their registers read 0 and their writes are lost.

board_periph_pdctr.c owns PDCTRGD; the blocks that model peripherals inside the domain ask priv_board_pdctr_graphics_powered before reporting a live register value, so the emulator shows a dark domain exactly as the bench does. This header is the seam between them.

Since
0.1.0

Definition in file board_periph_pdctr_internal.h.

Function Documentation

◆ priv_board_pdctr_graphics_powered()

bool priv_board_pdctr_graphics_powered ( void )

Report whether the graphics power domain is currently powered.

Tracks PDCTRGD.PDPGSF: false while the domain is gated off (the reset state), true once firmware has cleared PDDE with PRCR.PRC1 unlocked.

Returns
true when the graphics domain is powered on.
Return values
truePDPGSF == 0: DRW / GLCDC / MIPI / VIN are alive.
falseDomain still gated; those peripherals read 0.
Precondition
The PDCTRGD block is registered (host constructor, before main).
Postcondition
No state is mutated.
Note
Not thread-safe; ra8_emulator drives all blocks from one thread.
Since
0.1.0
Precondition
The call executes on the emulator's single owning thread.
Postcondition
Ownership of caller-supplied storage is unchanged.

Definition at line 89 of file board_periph_pdctr.c.

References k_pdctr_pdpgsf_mask, RA8_PRIV, and s_pdctr.

Referenced by internal_drw_read(), internal_drw_render_modelled(), internal_drw_write(), and internal_pdctr_write().