|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
CPU0 (Cortex-M85 primary core) driver for the low-power hold-page demo. More...
#include <stdint.h>#include "lowpower_holdpage.h"#include "ra8_boot_entry.h"#include "ra8_dual_core.h"#include "ra8_err.h"#include "ra8_log.h"Go to the source code of this file.
Enumerations | |
| enum | m85_lowpower_const_t : uint32_t { k_m85_park_log_every = 240U } |
| Pacing for the parked-M85 narration. More... | |
Functions | |
| static void | render_page0 (volatile lowpower_mailbox_t *mb) |
| "Render" page 0 and publish it to the M33 via the shared mailbox. | |
| static void | park_low_power (volatile lowpower_mailbox_t *mb) |
| Park the M85 in low-power WFI sleep, narrating the M33's hold loop. | |
| static void | park_forever (void) |
| Park the M85 forever after an unrecoverable startup failure. | |
| void | main (void) |
| CPU0 (Cortex-M85) application entry. | |
Variables | |
| uint32_t | g_ra8_ls_cpu1_mram_start |
| Base of the embedded M33 image / its vector table (MRAM_CPU1). | |
| uint32_t | g_ra8_ls_cpu1_stack_top |
| Initial stack pointer handed to the M33 at release. | |
CPU0 (Cortex-M85 primary core) driver for the low-power hold-page demo.
This is the firmware that runs on the RA8D2's primary core, the Cortex-M85, out of reset. It demonstrates the #150 power-saving model: for a static e-reader page (text shown, waiting for a tap or a page-turn) the M85 @ 1 GHz is wasted, so the M85 hands the page to the M33 @ 250 MHz and PARKS. The slow core is plenty to hold a rendered page and service the user switch, at a fraction of the power – "power saving = drop to the slow core".
What the M85 does here:
The wake path – the M33 signalling the M85 to spin back up for a heavy re-render (opening or compiling a book, see #149) – is the remaining piece tracked in #150; this example lands the M85-parks / M33-holds foundation.
Definition in file main.c.
| enum m85_lowpower_const_t : uint32_t |
| void main | ( | void | ) |
CPU0 (Cortex-M85) application entry.
The application entry point Reset_Handler hands control to.
Brings up logging, "renders" page 0 into the shared mailbox, releases the Cortex-M33 into its hold loop, and parks the M85 in low-power WFI sleep. See the file header for the power-saving narrative.
Definition at line 161 of file main.c.
References g_ra8_ls_cpu1_mram_start, g_ra8_ls_cpu1_stack_top, k_ra8_ok, lowpower_mailbox(), park_forever(), park_low_power(), ra8_cpu1_release(), ra8_log_info, ra8_log_info_val, ra8_log_init(), and render_page0().
|
static |
Park the M85 forever after an unrecoverable startup failure.
|
static |
Park the M85 in low-power WFI sleep, narrating the M33's hold loop.
| [in] | mb | Pointer to the shared mailbox. |
mb is the fixed-address mailbox pointer (never NULL). Definition at line 111 of file main.c.
References k_m85_park_log_every, lowpower_mailbox_t::m33_heartbeat, and ra8_log_info_val.
|
static |
"Render" page 0 and publish it to the M33 via the shared mailbox.
| [out] | mb | Pointer to the shared mailbox. |
mb is the fixed-address mailbox pointer (never NULL). Definition at line 80 of file main.c.
References lowpower_mailbox_t::active_core, k_lowpower_core_m33, k_lowpower_magic, lowpower_mailbox_t::m33_heartbeat, lowpower_mailbox_t::magic, lowpower_mailbox_t::page_num, and lowpower_mailbox_t::sw1_events.
Referenced by main().
|
extern |
Base of the embedded M33 image / its vector table (MRAM_CPU1).
|
extern |
Initial stack pointer handed to the M33 at release.