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

Cross-core handoff block backed by a fixed shared-SRAM address. More...

#include <lowpower_holdpage.h>

Data Fields

volatile uint32_t magic
 M85 stamps k_lowpower_magic when ready.
volatile uint32_t page_num
 Held page; M85 sets 0, M33 bumps on turn.
volatile uint32_t active_core
 Which core owns the page (lowpower_const_t).
volatile uint32_t m33_heartbeat
 M33 increments each hold-loop iteration.
volatile uint32_t sw1_events
 M33 counts SW1 (page-turn) press edges.

Detailed Description

Cross-core handoff block backed by a fixed shared-SRAM address.

All fields are volatile so each core re-reads memory rather than caching a value in a register. The M85 owns magic and the initial page_num / active_core (writer); the M33 owns m33_heartbeat, sw1_events, and the post-handoff page_num (writer). The opposite core only reads what it does not own.

Invariant
magic is 0 until the M85 stamps k_lowpower_magic, then holds.
active_core is k_lowpower_core_m33 once the M85 has parked.
m33_heartbeat increases monotonically while the M33 holds.
Example:
mb->page_num = 0U;
mb->magic = (uint32_t)k_lowpower_magic;
__asm volatile("dsb" ::: "memory"); // publish before releasing the M33
static volatile lowpower_mailbox_t * lowpower_mailbox(void)
Typed pointer to the fixed-address shared mailbox.
@ k_lowpower_magic
"HOLD" – M85 stamps it when ready.
@ k_lowpower_core_m33
active_core: the M33 holds the page.
Cross-core handoff block backed by a fixed shared-SRAM address.
volatile uint32_t page_num
Held page; M85 sets 0, M33 bumps on turn.
volatile uint32_t active_core
Which core owns the page (lowpower_const_t).
volatile uint32_t magic
M85 stamps k_lowpower_magic when ready.
See also
lowpower_mailbox()
Since
0.1.0

Definition at line 116 of file lowpower_holdpage.h.

Field Documentation

◆ active_core

volatile uint32_t lowpower_mailbox_t::active_core

Which core owns the page (lowpower_const_t).

Definition at line 119 of file lowpower_holdpage.h.

Referenced by render_page0().

◆ m33_heartbeat

volatile uint32_t lowpower_mailbox_t::m33_heartbeat

M33 increments each hold-loop iteration.

Definition at line 120 of file lowpower_holdpage.h.

Referenced by cpu1_hold_page(), park_low_power(), and render_page0().

◆ magic

volatile uint32_t lowpower_mailbox_t::magic

M85 stamps k_lowpower_magic when ready.

Definition at line 117 of file lowpower_holdpage.h.

Referenced by render_page0().

◆ page_num

volatile uint32_t lowpower_mailbox_t::page_num

Held page; M85 sets 0, M33 bumps on turn.

Definition at line 118 of file lowpower_holdpage.h.

Referenced by cpu1_hold_page(), and render_page0().

◆ sw1_events

volatile uint32_t lowpower_mailbox_t::sw1_events

M33 counts SW1 (page-turn) press edges.

Definition at line 121 of file lowpower_holdpage.h.

Referenced by cpu1_hold_page(), and render_page0().


The documentation for this struct was generated from the following file: