Hello,
We're using an AM3715 part in our device, and I'm trying to get SYS_CLKREQ to deassert when the device is suspended.
We've got both our boot loader and our WinCE builds able to put the AM3715's core, MPU, and peripheral domains into retention with all other domains in off, and we can successfully wakeup from this state (using GPIO11/EMU0).
The problem is that SYS_CLKREQ is remaining actively driven high by the AM3715 in suspend from both WinCE and our boot loader.
I've confirmed that changing bit 1 of PRM_POLCTRL does result in SYS_CLKREQ switching between driven high and driven low, so the pin is correctly configured for SYS_CLKREQ (with an internal pull down), and being monitored correctly.
So, given that all domains are in retention or off, what could be keeping SYS_CLKREQ from going inactive?
Here's a dump of the states of interesting registers, saved to internal SRAM just before the WFI instruction which drops the core and MPU into retention:
SYS_CLKREQ configuration:
PRM_CLKSRC_CTRL 0x00000048 (bypass mode, CLKREQ deasserted on SLEEP, RETENTION, or OFF)
PRM_POLCTRL 0x0000000A
CONTROL_PADCONF_SYS_32K 0x00080100 (SYS_CLKREQ in upper half, pull down enabled)
IDLESTATUS:
CM_IDLEST_WKUP 0x000002F7
CM_IDLEST_IVA2 0x00000001
CM_IDLEST_PLL_IVA2 0x00000000
CM_IDLEST1_CORE 0xFFFFFFFF
CM_IDLEST2_CORE 0x0000001F
CM_IDLEST3_CORE 0x0000000D
CM_IDLEST_SGX 0x00000001
CM_IDLEST_CKGEN 0x00000001
CM_IDLEST2_CKGEN 0x00000000
CM_IDLEST_DSS 0x00000003
CM_IDLEST_CAM 0x00000001
CM_IDLEST_PER 0x0007FFFF
CM_IDLEST_NEON 0x00000001
CM_IDLEST_USBHOST 0x00000003
WAKEUPSTATUS:
PM_WKST1_CORE 0x00000000
PM_WKST3_CORE 0x00000000
PM_WKST_WKUP 0x00000000
PM_WKST_PER 0x00000000
PM_WKST_USBHOST 0x00000000
FCLKSTATUS:
CM_FCLKEN_WKUP 0x00000000
CM_FCLKEN_IVA2 0x00000000
CM_FCLKEN1_CORE 0x00000000
CM_FCLKEN3_CORE 0x00000000
CM_FCLKEN_SGX 0x00000000
CM_FCLKEN_DSS 0x00000000
CM_FCLKEN_CAM 0x00000000
CM_FCLKEN_PER 0x00000000
CM_FCLKEN_USBHOST 0x00000000
ICLKSTATUS:
CM_ICLKEN_WKUP 0x00000008
CM_ICLKEN1_CORE 0x00000000
CM_ICLKEN3_CORE 0x00000000
CM_ICLKEN_SGX 0x00000000
CM_ICLKEN_DSS 0x00000000
CM_ICLKEN_CAM 0x00000000
CM_ICLKEN_PER 0x00000000
CM_ICLKEN_USBHOST 0x00000000
AUTOIDLESTATUS:
CM_AUTOIDLE_WKUP 0x0000002D
CM_AUTOIDLE_PLL_IVA2 0x00000001
CM_AUTOIDLE_PLL_MPU 0x00000001
CM_AUTOIDLE1_CORE 0x7FFFFED8
CM_AUTOIDLE3_CORE 0x00000004
CM_AUTOIDLE_PLL 0x00000009
CM_AUTOIDLE2_PLL 0x00000001
CM_AUTOIDLE_DSS 0x00000001
CM_AUTOIDLE_CAM 0x00000001
CM_AUTOIDLE_PER 0x0007FFFF
CM_AUTOIDLE_USBHOST 0x00000001
CLKSTCTRL:
CM_CLKSTCTRL_IVA2 0x00000003
CM_CLKSTCTRL_MPU 0x00000003
CM_CLKSTCTRL_CORE 0x0000003F
CM_CLKSTCTRL_SGX 0x00000003
CM_CLKSTCTRL_DSS 0x00000003
CM_CLKSTCTRL_CAM 0x00000003
CM_CLKSTCTRL_PER 0x00000003
CM_CLKSTCTRL_EMU 0x00000003
CM_CLKSTCTRL_NEON 0x00000003
CM_CLKSTCTRL_USBHOST 0x00000003
MISC:
SDRC_POWER_REG 0x000CF8ED
CONTROL_PADCONF_SAD2D_IDLEACK 0x06003718
CONTROL_PADCONF_SAD2D_MSTDBY 0x07003718
CM_CLKOUT_CTRL 0x00000001
PRM_CLKOUT_CTRL 0x00000000
And here are the previous power state registers on resume, showing that everything was off or in retention:
PM_PREPWSTST_MPU 0x45
PM_PREPWSTST_CORE 0x55
PM_PREPWSTST_PER 0x05
PM_PREPWSTST_NEON 0x00
PM_PREPWSTST_USBHOST 0x00
PM_PREPWSTST_DSS 0x00
PM_PREPWSTST_CAM 0x00
PM_PREPWSTST_SGX 0x00
PM_PREPWSTST_IVA2 0x00
The only clock I've left enabled during suspend is GPIO1 ICLK, in order to allow GPIO11 to wake the CPU. But I've tried disabling this clock as well, and SYS_CLKREQ still doesn't go inactive (and I am unable to wake the CPU via GPIO11).
Any help getting SYS_CLKREQ to go inactive in suspend would be appreciated.
Brad B-)