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

Shared control block for the autonomous M33 counter demo. More...

#include <dualcore_background.h>

Data Fields

volatile uint32_t counter
 Incremented k_bg_target_count times by M33.
volatile uint32_t done
 Set to 1 by M33 once counting is complete.
volatile uint32_t m33_sig
 M33 stamps k_bg_m33_signature here on boot.

Detailed Description

Shared control block for the autonomous M33 counter demo.

All fields are volatile so each core reloads from SRAM on every access rather than using a cached register value. The M33 owns the write side of every field; the M85 only reads them after releasing the M33.

Invariant
done is 0 until the M33 finishes all k_bg_target_count increments, then 1 forever.
m33_sig is 0 until the M33 boots, then k_bg_m33_signature.
counter increases monotonically from 0 to k_bg_target_count.
Example:
volatile dualcore_bg_t* bg = dualcore_bg();
while (bg->done == 0U) {} // wait for M33
uint32_t n = bg->counter; // read result
static volatile dualcore_bg_t * dualcore_bg(void)
Typed pointer to the fixed-address shared control block.
Shared control block for the autonomous M33 counter demo.
volatile uint32_t counter
Incremented k_bg_target_count times by M33.
volatile uint32_t done
Set to 1 by M33 once counting is complete.
See also
dualcore_bg()
Since
0.1.0

Definition at line 113 of file dualcore_background.h.

Field Documentation

◆ counter

volatile uint32_t dualcore_bg_t::counter

Incremented k_bg_target_count times by M33.

Definition at line 114 of file dualcore_background.h.

Referenced by cpu1_main(), main(), and zero_bg().

◆ done

volatile uint32_t dualcore_bg_t::done

Set to 1 by M33 once counting is complete.

Definition at line 115 of file dualcore_background.h.

Referenced by cpu1_main(), wait_for_done(), and zero_bg().

◆ m33_sig

volatile uint32_t dualcore_bg_t::m33_sig

M33 stamps k_bg_m33_signature here on boot.

Definition at line 116 of file dualcore_background.h.

Referenced by cpu1_main(), wait_for_m33_sig(), and zero_bg().


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