ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
shared_pingpong.h
Go to the documentation of this file.
1
45
46#pragma once
47
48#include <stdint.h>
49
50#include "ra8_attributes.h"
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
74
90
106typedef struct {
107 volatile uint32_t ping_seq;
108 volatile uint32_t pong_seq;
109 volatile uint32_t ping_payload;
110 volatile uint32_t pong_payload;
112
130{
131 return (volatile cpu1_pingpong_shared_t*)(uintptr_t)k_cpu1_pingpong_shared_addr;
132}
133
134#ifdef __cplusplus
135}
136#endif
@ k_cpu1_pingpong_magic_ping
Cpu1 pingpong magic ping.
Definition cpu1_main.c:32
@ k_cpu1_pingpong_magic_pong
Cpu1 pingpong magic pong.
Definition cpu1_main.c:33
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Where the EK-RA8D2's Cortex-M85 and Cortex-M33 meet, stated once.
@ k_ra8_board_shared_ram_base
Start of SRAM2: the CPU0 <-> CPU1 meeting window.
static volatile cpu1_pingpong_shared_t * internal_shared(void)
Typed pointer to the fixed-address shared message block.
cpu1_pingpong_addr_t
Where this app puts its shared block inside the board's window.
@ k_cpu1_pingpong_shared_addr
Shared block = window base.
cpu1_pingpong_shared_const_t
Compile-time magics + spin budget for the shared block.
@ k_cpu1_pingpong_poll_budget
Max spin iters per direction.
Cross-CPU message struct backed by a fixed SRAM address.
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.