ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ereader_m33.h
Go to the documentation of this file.
1
79
80#pragma once
81
82#include <stdint.h>
83
85
86#ifdef __cplusplus
87extern "C" {
88#endif
89
104typedef enum : uintptr_t {
107
121/* HUM Ch 5.1 "Address Space" Table 5.1 p 239 -- external SDRAM window at 0x68000000 */
122typedef enum : uintptr_t {
123 k_erm33_sdram_base = 0x68000000U,
124 k_erm33_sdram_end = 0x6C000000U,
126
152
178
196typedef enum : uint32_t {
200
228typedef struct {
229 volatile uint32_t magic;
230 volatile uint32_t m33_sig;
231 volatile uint32_t status;
232 volatile uint32_t fb_base;
233 volatile uint32_t fb_width;
234 volatile uint32_t fb_height;
235 volatile uint32_t fb_stride;
236 volatile uint32_t fb_format;
237 volatile uint32_t fb_crc;
238 volatile uint32_t glyph_count;
239 volatile uint32_t done;
240 volatile uint32_t turn_req;
241 volatile uint32_t turn_ack;
242 volatile uint32_t turn_done;
244
263static inline volatile erm33_mailbox_t* erm33_mailbox(void)
264{
265 return (volatile erm33_mailbox_t*)(uintptr_t)k_erm33_mailbox_addr;
266}
267
268#ifdef __cplusplus
269}
270#endif
erm33_const_t
Signatures, status codes, the RGB565 format tag, and the page width shared by both core images.
@ k_erm33_page_chars
Characters the held page can carry.
@ k_erm33_status_running
status: M33 is rendering the page.
@ k_erm33_status_bad_book
status: baked book failed validation.
@ k_erm33_status_ok
status: page rendered + published.
@ k_erm33_fb_format_rgb565
Published fb_format (RGB565).
@ k_erm33_status_render_fail
status: ra8_gfx render path failed.
@ k_erm33_magic
"ERM3" – M85 stamps it when ready.
@ k_erm33_m33_sig
"RDR3" boot sentinel written by M33.
erm33_sdram_addr_t
Base + extent of the external SDRAM window the held page lives in.
@ k_erm33_sdram_base
External SDRAM window base.
@ k_erm33_sdram_end
External SDRAM window end (+64 MiB).
erm33_fb_geom_t
Geometry of the RGB565 page framebuffer both images agree on.
@ k_erm33_fb_stride
Bytes per pixel row (width * bpp).
@ k_erm33_fb_bpp
Bytes per pixel (RGB565).
@ k_erm33_fb_bytes
Total plane size in bytes (stride * height).
@ k_erm33_fb_cols
Glyph columns (width / 8-px glyph).
@ k_erm33_fb_rows
Glyph rows (height / 16-px glyph).
@ k_erm33_fb_height
Plane height in pixels (4 glyph rows of 16).
@ k_erm33_fb_width
Plane width in pixels.
erm33_mailbox_addr_t
Fixed shared-SRAM base address of the progress mailbox.
@ k_erm33_mailbox_addr
Mailbox base = window base.
erm33_cycle_t
Bounds for the #150 park / wake / re-render mode-switch cycle.
@ k_erm33_touch_dwell
M33 hold-loop spins per simulated touch wait.
@ k_erm33_max_turns
Page-turn handoffs the cycle exercises.
static volatile erm33_mailbox_t * erm33_mailbox(void)
Typed pointer to the fixed-address shared progress mailbox.
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.
Cross-core progress block backed by a fixed shared-SRAM address.
volatile uint32_t magic
M85 stamps k_erm33_magic when ready.
volatile uint32_t turn_done
M33->M85: re-render published for that turn.
volatile uint32_t fb_base
M33-published SDRAM framebuffer base address.
volatile uint32_t done
Set to 1 by the M33 once the page is published.
volatile uint32_t fb_crc
M33-folded CRC-32 over the rendered pixels.
volatile uint32_t turn_ack
M85->M33: heavy-work ack for the matching turn.
volatile uint32_t fb_format
M33-published ra8_gfx_format_t (RGB565).
volatile uint32_t turn_req
M33->M85: page-turn request, bumped per touch.
volatile uint32_t glyph_count
Characters the M33 laid onto the held page.
volatile uint32_t fb_stride
M33-published framebuffer stride in bytes.
volatile uint32_t m33_sig
M33 stamps k_erm33_m33_sig on boot.
volatile uint32_t status
Render status (erm33_const_t status codes).
volatile uint32_t fb_height
M33-published framebuffer height in pixels.
volatile uint32_t fb_width
M33-published framebuffer width in pixels.