ZHCUAY3 april 2023 AM6526 , AM6528 , AM6548 , TPS6594-Q1
运行、仅 MCU 或保持状态均可转换为待机状态。若要保持在待机任务状态,而不进入硬件状态 LP_STANDBY,则必须将 LP_STANDBY_SEL 位清零。
当 ENABLE 引脚变为低电平时,TO_STANDBY 序列会被触发。当 ENABLE 引脚再次变为高电平时,目标状态取决于 STARTUP_DEST 位。I2C_0 触发条件也会触发 TO_STANDBY 序列。从 I2C_0 触发时,可以通过 GPIO8 或/和 RTC 计时器或警报触发 PMIC 来返回到运行或仅 MCU 状态。本例中使用 I2C_0 触发条件来进入待机状态,并使用 GPIO8 来进入运行状态。
Write 0x48:0xC3:0x00:0xF7 // LP_STANDBY_SEL=0
Write 0x48:0x7D:0xC0:0x3F // Mask NSLEEP bits
Write 0x48:0x38:0xC0;0x3F // Set GPIO4 to WKUP1 (goes to ACTIVE state)
Write 0x48:0x64:0x80:0x7F // clear interrupt of GPIO8
Write 0x48:0x4F:0x00:0x7F // unmask interrupt for GPIO8 falling edge
Write 0x48:0x85:0x01:0xFE // set I2C_0 trigger, trigger TO_STANDBY sequence
After the GPIO8 has gone low and the PMICs have returned to the ACTIVE state
Write 0x48:0x7D:0x00:0x3F // unmask NSLEEP bits
Write 0x48:0x86:0x03:0xFC // Set NSLEEPx bits for ACTIVE state
Write 0x48:0x64:0x80:0x7F // clear interrupt of GPIO8