103typedef enum : uint32_t {
124typedef enum : uint32_t {
334#if defined(RA8_OFF_TARGET) && defined(UNIT_TEST)
347typedef enum : uint32_t {
348 k_ra8_flash_maci_log_cap = 32U,
349} ra8_flash_maci_log_const_t;
367extern uint8_t g_ra8_flash_maci_cmd8_log[k_ra8_flash_maci_log_cap];
380extern uint32_t g_ra8_flash_maci_cmd8_len;
393extern uint16_t g_ra8_flash_maci_cmd16_log[k_ra8_flash_maci_log_cap];
406extern uint32_t g_ra8_flash_maci_cmd16_len;
425void ra8_flash_internal_maci_log_reset(
void);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_flash_runtime_t g_flash_rt
Single shared ra8_flash runtime-state instance.
const char * g_flash_tag
Shared log tag string for the ra8_flash module.
Code MRAM + Extra MRAM + Option-Setting driver – DANGEROUS, brick-capable.
bool priv_ra8_flash_internal_window_allows_pure(uintptr_t addr, uint32_t len, uintptr_t win_low, uintptr_t win_high)
Pure (state-free) reimplementation of internal_window_allows.
void priv_ra8_flash_internal_maci_cmd8(uint8_t byte)
Send a single byte through the MACI command-issuing area.
void priv_ra8_flash_internal_set_prefetch(bool enable)
Set MRCPFB.MPFBEN to enable/disable the prefetch buffer.
ra8_err_t priv_ra8_flash_internal_wait_mrdy(uint32_t limit)
Spin until MSTATR.MRDY rises or limit elapses.
ra8_err_t priv_ra8_flash_internal_wait_buffer_ready_call(uint32_t limit)
Direct-call test access to internal_wait_buffer_ready.
bool priv_ra8_flash_internal_window_allows(uintptr_t addr, uint32_t len)
Test whether [addr, addr+len) lies inside the soft window.
void priv_ra8_flash_internal_maci_cmd16(uint16_t half)
Send a halfword through the MACI command-issuing area.
ra8_err_t priv_ra8_flash_internal_wait_commit_done_call(uint32_t limit)
Direct-call test access to internal_wait_commit_done.
ra8_flash_key_t
KEY-byte shifts and codes that gate writes (cross-TU).
@ k_ra8_flash_mrefreq_key
RA8 flash mrefreq key.
@ k_ra8_flash_mrcfreq_key
RA8 flash mrcfreq key.
@ k_ra8_flash_freq_key_shift
KEY[7:0] @ [31:24] in MRCFREQ/MREFREQ.
ra8_flash_const_t
Bounds on configuration values + spin limits (cross-TU).
@ k_ra8_flash_pe_spin_limit
P/E entry spin limit.
@ k_ra8_flash_max_mrcfreq_mhz
MRCMHZ <= 250.
@ k_ra8_flash_max_list_select
MCTRLSR.LIST max value.
@ k_ra8_flash_maci_spin_limit
MACI command spin limit.
@ k_ra8_flash_zeroize_spin
W-HUK zeroize spin.
@ k_ra8_flash_max_mrefreq_mhz
MREMHZ <= 125.
@ k_ra8_flash_busy_spin_limit
Direct-write busy spin.
void(* ra8_flash_callback_t)(const ra8_flash_isr_event_t *ev)
Callback signature for the unified flash IRQ dispatcher.
File-scope runtime state shared across the ra8_flash TUs.
void * user_ctx
Caller pointer passed to cb.
uintptr_t win_low
Soft access-window low (incl).
bool initialized
True after ra8_flash_init.
uintptr_t win_high
Soft access-window high (excl).
ra8_flash_callback_t cb
Registered IRQ callback (or NULL).
bool prefetch_on
Last-known MRCPFB state.