|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| src | |
Enables full ECC ("with-check") SECDED on a spare SRAM bank, round-trips a deterministic pattern through an ECC-protected buffer at the bank base, and reports the ECC error-status register (#130). LED1 toggles while healthy and LED2 on a round-trip fault; g_ecc_ok, g_ecc_rw_ok, g_ecc_esr, g_ecc_1bit, g_ecc_2bit and g_ecc_heartbeat mirror the result for headless probing. Needs no external hardware.
Why a spare bank. ECC with-check requires the bank's ECC codes to be initialised first, or reading a never-written word raises a spurious 2-bit error and takes the NMI. The zero-init pass rewrites the whole bank, so it has to target memory the program does not use: this app's linker keeps .data, .bss and the stack in the first 1 MiB (banks 0-1), and the upper banks are unused. The on_error action stays NMI, but nothing injects an error here so it never fires.
tools/ra8_emulator shadows the SRAM ECC control window but does not model ECC itself, so the bring-up and the round-trip run off-target while the actual error-detection path cannot. Confirming that a real 1-bit flip latches SRAMESR (corrected) and that a 2-bit flip drives the NMI needs an error source on the bench.