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

Cross-CPU message struct backed by a fixed SRAM address. More...

#include <shared_pingpong.h>

Data Fields

volatile uint32_t ping_seq
 CPU0 increments after writing payload.
volatile uint32_t pong_seq
 CPU1 sets to match ping_seq after reply.
volatile uint32_t ping_payload
 CPU0 writes, CPU1 reads.
volatile uint32_t pong_payload
 CPU1 writes, CPU0 reads.

Detailed Description

Cross-CPU message struct backed by a fixed SRAM address.

Volatile so the compiler emits real memory accesses each iteration of the poll loops. Aligned to 16 bytes so the struct starts on a cache-line / strongly-ordered boundary even if the D-cache is later enabled.

Invariant
pong_seq only ever lags ping_seq by 0 or 1.
Both sequence counters monotonically increase.
See also
g_cpu1_pingpong_shared
Since
0.1.0

Definition at line 106 of file shared_pingpong.h.

Field Documentation

◆ ping_payload

volatile uint32_t cpu1_pingpong_shared_t::ping_payload

CPU0 writes, CPU1 reads.

Definition at line 109 of file shared_pingpong.h.

Referenced by internal_cpu1_main(), and main().

◆ ping_seq

volatile uint32_t cpu1_pingpong_shared_t::ping_seq

CPU0 increments after writing payload.

Definition at line 107 of file shared_pingpong.h.

Referenced by internal_cpu1_main(), and main().

◆ pong_payload

volatile uint32_t cpu1_pingpong_shared_t::pong_payload

CPU1 writes, CPU0 reads.

Definition at line 110 of file shared_pingpong.h.

Referenced by internal_cpu1_main(), and main().

◆ pong_seq

volatile uint32_t cpu1_pingpong_shared_t::pong_seq

CPU1 sets to match ping_seq after reply.

Definition at line 108 of file shared_pingpong.h.

Referenced by internal_cpu1_main(), internal_wait_for_pong(), and main().


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