SLVUCI5 april 2023 AM6526 , AM6528 , AM6548 , TPS6594-Q1
As shown in Section 6.3.9, the MCU is powered off and therefore the transition out of the RETENTION to the MCU ONLY or the ACTIVE states must be configured before entering RETENTION. In this example GPIO8 on the PMIC is used to wake the device from RETENTION to ACTIVE.
Write 0x48:0x34:0xC0;0x3F // Set GPIO8 to WKUP1 (goes to ACTIVE state)
Write 0x48:0x64:0x80:0x7F // clear interrupt of gpio8, write to clear
Write 0x48:0x4F:0x00:0x7F // unmask interrupt for GPIO8 falling edge
Write 0x48:0x86:0x00:0xFC // trigger the TO_RETENTION power sequence
After the GPIO8 has gone low and the PMICs have returned to the ACTIVE state
Write 0x48:0x86:0x03:0xFC // Set NSLEEPx bits for ACTIVE state
Write 0x48:0x64:0x08:0xF7 // clear interrupt of gpio8
In this example the RTC Timer is used to wake the device from RETENTION to ACTIVE.
Write 0x48:0xC3:0x01;0xFE // Enable Crystal
Write 0x48:0xC5:0x05:0xF8 // minute timer, enable TIMER interrupts
Write 0x48:0xC2:0x01:0xFE // start timer, if the timer values are non-zero clear before starting
Write 0x48:0x86:0x00:0xFC // trigger the TO_RETENTION power sequence
After the RTC Timer interrupt has occurred and the PMICs have returned to the ACTIVE state
Write 0x48:0x86:0x03:0xFC // Set NSLEEPx bits for ACTIVE state
Write 0x48:0xC5:0x00:0xFB // disable timer interrupt, clear bit 2
Write 0x48:0xC4:0x00:0xDF // clear timer interrupt, clear bit 5