|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| src | |
The same 1 KB SRAM-to-SRAM block copy as dtc_transfer_demo, but it arms and disarms DTC activation through the ra8_isr_set_dtc() HAL primitive (#579) instead of open-coding the IELSRn.DTCE read-modify-write. Because the primitive owns that write, this app never includes ra8_icu_regs.h at all – the DTC-vs-CPU routing decision no longer leaks into application code.
Each cycle runs two phases and the verdict is the AND of both:
The ELC event is not a convenience: the DTC has no software-start register (HUM Ch 18.3, "The DTC is activated by an interrupt request"), so an event is the only way to kick it. LED1 toggles on success and LED2 on failure; g_dtc_armed_ok, g_dtc_disarmed_ok, g_dtc_heartbeat and g_dtc_isr_count mirror the result for headless J-Link probing. No external hardware required.
Both pre-existing DTC apps took the raw IELSR slot pointer and OR'd in the DTCE bit by hand. ra8_isr owned IELSR slot allocation but exposed no arm-DTC-on-slot primitive, so that read-modify-write was copy-pasted into every DTC application. The primitive performs the identical write – preserving the IELS event field and the write-0-to-clear IR status flag – so it drops into both call sites unchanged while adding a disarm path they never had.
Nothing but a bench run. ra8_emulator models the DTC descriptor engine and its DTCE gate – the ELC event activates the controller only when a DTCE-enabled IELSR slot links it – so the armed copy runs and the disarmed one is correctly skipped off-target. The activation path is byte-identical to the silicon-validated dtc_transfer_demo.