|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Technical reference for the RA8 multi-chip build (both R7KA8D2KFLCAC and R7KA8P1KFLCAC from one tree). This file is the durable memory-map / register-base map; the plan, rationale, and follow-ups live in the GitHub epic (search issues for "RA8P1 support: RA8D2-vs-RA8P1 difference analysis"). The device-selection code is libs/ra8_core/inc/ra8_device.h.
| Datasheet | Hardware User's Manual | |
|---|---|---|
| RA8D2 | R01DS0493EJ | R01UH1065EJ (in docs/reference/) |
| RA8P1 | R01DS0439EJ0130 | R01UH1064EJ0130 |
The RA8P1 is "RA8D2 + an Arm Ethos-U55 NPU". Same Cortex-M85 @ 1 GHz + Cortex-M33 @ 250 MHz, same pin-compatible 289-pin BGA. The peripheral register bases (155/155), the memory map, the ICU/ELC event numbers, and the MSTP module-stop bits are byte-identical. The register headers therefore need no device-conditional edits; only new peripherals get new headers.
| Region | Base | Size | Notes | ||
|---|---|---|---|---|---|
| Code MRAM | 0x02000000 | 1 MB | CM85 768 KB `0x02000000 + CM33 256 KB @0x020C0000 \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> System SRAM \ilinebr </td> <td class="markdownTableBodyNone"> 0x22000000 \ilinebr </td> <td class="markdownTableBodyNone"> 1664 KB \ilinebr </td> <td class="markdownTableBodyNone"> SRAM0 1024 KB + SRAM1 640 KB @0x22100000, ECC; shared with NPU (AXI) \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> ITCM (M85) \ilinebr </td> <td class="markdownTableBodyNone"> 0x00000000 \ilinebr </td> <td class="markdownTableBodyNone"> 64 KB* \ilinebr </td> <td class="markdownTableBodyNone"> *linker floor; RA8P1 M85 TCM budget is 256 KB total (split unconfirmed) \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> DTCM (M85) \ilinebr </td> <td class="markdownTableBodyNone"> 0x20000000 \ilinebr </td> <td class="markdownTableBodyNone"> 64 KB* \ilinebr </td> <td class="markdownTableBodyNone"> (+128 KB M33 TCM: 1664+256+128 = 2048 KB "total RAM") \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> SDRAM (ext) \ilinebr </td> <td class="markdownTableBodyNone"> 0x68000000 \ilinebr </td> <td class="markdownTableBodyNone"> 64 MB (EK) \ilinebr </td> <td class="markdownTableBodyNone"> 32-bit external bus \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> OSPI/xSPI XIP \ilinebr </td> <td class="markdownTableBodyNone"> 0x80000000 (CS0), 0x90000000 (CS1) \ilinebr </td> <td class="markdownTableBodyNone"> ext \ilinebr </td> <td class="markdownTableBodyNone"> HyperRAM/HyperBus capable \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> Option-setting \ilinebr </td> <td class="markdownTableBodyNone"> 0x02C9F040.. (+ 0x12C9F4C0 NS aliases, BPS 0x02C9F200, OTP 0x02E07400) \ilinebr </td> <td class="markdownTableBodyNone"> \ilinebr </td> <td class="markdownTableBodyNone"> identical on both parts, OFS0..OFS3 (see correction below) \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> **NPU regs** \ilinebr </td> <td class="markdownTableBodyNone"> **0x40140000`** | 4 KB | RA8P1 only (Ethos-U55) |
| Peripheral | Base | Event / MSTP |
|---|---|---|
| Ethos-U55 NPU | 0x40140000 | ELC_EVENT_NPU_IRQ = 0x067; MSTPCRA bit 16; NPUCLK = SCKDIVCR2[11:8] |
| DOC alias | 0x40311000 | alias of the shared DOC_B (cosmetic) |
There is no legacy ETHERC/EDMAC MAC at 0x40354000 on the RA8P1 – an earlier draft of this table listed one, but it does not exist (see "Correction" below).
An earlier revision listed "- OFS3 / WDT1 option register" as delta 2. It is not a delta – see the correction below.
An earlier revision of this reference (and roadmap issues #220 / #224) claimed the RA8P1 adds a classic single-port ETHERC/EDMAC Ethernet MAC at 0x40354000, in addition to the shared R-Switch/ESWM fabric. That was a misread; the RA8P1 has no such peripheral. Verified by full-text search of both primary manuals:
Consequently there is no RA8_HAS_ETHERC_EDMAC flag in libs/ra8_core/inc/ra8_device.h, no ra8_etherc / ra8_edmac driver, and no ra8_emulator ETHERC model to add. Because the "MAC" that motivated the "#21 large- frame TX defect is a different IP" angle does not exist, that angle is moot: the RA8P1's clean-vs-defect Ethernet story is identical to the RA8D2's R-Switch.
An earlier revision of this reference claimed **RA8P1 has no OFS3/WDT1 option register**, and issue #223 acted on it – deleting the OFS3 / OFS3_SEC / OFS3_SEL family from the four RA8P1 app linker scripts and gating it out of ra8_ofs.{h,c} behind RA8_HAS_OFS3. That was wrong. Verified by direct extraction from both primary manuals:
The claim originated in FSP's ra/fsp/src/bsp/mcu/ra8p1/bsp_feature.h (BSP_FEATURE_BSP_HAS_OFS3 (0UL), vs (1UL) for ra8d2). That flag contradicts Renesas' own manual, has zero consumers in open FSP source (it is metadata for the closed RASC configurator), and FSP's own bsp_linker.c is byte-identical between the two parts. A RASC-generated RA8P1 project emits the OFS3 sections at exactly the HUM addresses. Treat the flag as an FSP data error, not evidence.
The old "option-setting region `0x0300A000`" address in the memory-map table was also wrong – that string appears zero times in either HUM.
Consequently there is no RA8_HAS_OFS3 flag, no k_ra8_feat_ofs3, and no ra8_ofs_has_ofs3(). scripts/checks/check_linker_scripts.py rule LD008 enforces that the option-setting family is all-or-nothing per script, so this cannot regress a third time.
The "same pin-compatible 289-pin BGA" line above was an assertion until scripts/gen/gen_pinouts.py began parsing section 1.7 "Pin Lists" out of both datasheets and diffing them. It is now a measurement: across all three packages and both MIPI variants, every ball carries an identical function set on the two groups, and the pinout-freshness gate re-establishes that on every run. See docs/pinouts/README.md.
Identical on both: TrustZone-M v2 (NS-alias = address bit 28), R_CPSCU 0x40008000, R_PSCU 0x40204000, RSIP-E50D, DLM 8-state, boot modes (single-chip / JTAG / SCI / USB), secure boot (immutable FSBL in OTP), 14 port groups (P0-P9, PA-PD), and the full peripheral set (GLCDC, MIPI DSI/CSI, CEU, DRW 2D, CANFD x2, USB FS+HS, SDHI x2, OSPI x2, SCI x10, I3C, GPT x14, AGT, SSIE, PDM, CAC, DMAC x8, DTC, ELC, IPC dual-core).
RA8P1 HUM R01UH1064EJ0130 Rev.1.30 and datasheet R01DS0439EJ0130 Rev.1.30 (both read directly and full-text searched – see the two "Correction" sections above).
Verify per claim, not per document. The RA8P1 datasheet is now committed as docs/reference/ra8p1-datasheet.pdf, so any claim sourced from it is re-checkable from the tree. The RA8P1 HUM is not (it is ~49 MB), so "the manual was searched" is still not something a reader can re-check for HUM-sourced claims. Both corrections above are cases where a line in this file cited the RA8P1 HUM for something the RA8P1 HUM does not say – the OFS3 claim came from an FSP feature flag alone. When a claim here drives a code change, re-derive it from the manual and record the section AND printed page, as the corrections do. FSP metadata is a lead, never a citation.
FSP github.com/renesas/fsp (R7KA8{P1,D2}KF_core0.h, bsp/mcu/ra8{p1,d2}/{bsp_elc,bsp_feature,bsp_peripheral}.h, bsp/mcu/all/bsp_module_stop.h, ra/board/ra8p1_ek/board.h); Zephyr dts/arm/renesas/ra/ra8/r7ka8{p1,d2}kflcac*.dtsi; Renesas part page r7ka8p1kflcac-uc0.