|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| src | |
Clears a small ARGB8888 framebuffer in SRAM, has the DRW fill a rectangle into it through ra8_drw_fill_rect, waits for the engine, then checks the result byte-exact: the centre pixel must be filled and the corners must still be clear. LED1 toggles on a clean fill and LED2 on a mismatch; g_drw_match, g_drw_rev (HWREVISION), g_drw_fill_err and g_drw_heartbeat mirror the verdict for headless SWD probing. Needs no external hardware.
The engine was long believed inert on silicon (#247). The real cause was power: the D/AVE 2D block sits in the graphics power domain, which PDCTRGD gates OFF at reset (HUM Ch 11.2.14 p 452), and cancelling the module-stop bit is not enough. Once ra8_drw_init powers it, HWREVISION reads 0x0FBE0107 instead of zero. A second defect was geometry: the engine paints the bounding box that ORIGIN anchors, so the fill anchors ORIGIN at the rectangle's own top-left rather than trying to place it with the spatial limiters, and sets CONTROL2.WRITEALPHA = 01 because its reset value takes alpha from COLOR2, which is zero for a solid fill (#170). tools/ra8_emulator rasterizes the same bounding box, so the verdict holds in the emulator and on hardware alike.
This is the register/immediate path. For a loop-stable clear+fill where the DRW owns the framebuffer end to end and there is no CPU/engine write race, see drw_dlist_demo.