|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| src | |
Software Standby (LPSCR.LPMD = 0x5) woken by the on-chip Ultra-Low-Power Timer (ULPT0) – the deep-idle foundation: an MCU that spends nearly all its time in standby and is woken by an internal periodic timer alone.
The wake source is what makes this app different from the RTC standby demos. ULPT0 counts down on ULPTLCLK, the LOCO-derived 32.768 kHz clock (HUM Table 9.2 p 320), which keeps running in Software Standby while LOCOCR.LCSTP = 0 (HUM Table 11.3 footnote 2 p 433). LOCO is fully on-chip, so this wake does not depend on the intermittent sub-clock crystal the RTC demos rely on, and the wake banner is a real signal rather than a boot-only proxy.
Arming the WUPEN bit alone is not enough – an earlier attempt did exactly that and never woke.
Two more HUM-required details, both handled here: confirm the count actually started (ULPTCR.TCSTF = 1, HUM 25.4.7 p 1214) before entering standby, or the transition can stall the counter before it begins; and keep LOCO running so ULPTLCLK survives standby.
When the run ends the chip is sitting in a deep LPM state that gates the AHB-AP, so a probe cannot simply reconnect and flash the next image – the harness has to issue an erase-chip first. That is a property of the state, not of this app, and it is the reason an automated lane that runs this app has to be sequenced carefully.
No external hardware required.