Hello @Kan_Li,
I am using PN7462 (EVK). I want to wake up my board from sleep mode.
I am using the following code to enter into sleep mode. After Executing the following API board is not responding.
void test_sleep()
{
//RfLd detection settings
phhalPcr_RfLdtParams_t sRfLdParams ={0, 0, 0, 0};
//Wake up sources selection GPIO is selected as wakeup source
phhalPcr_WakeUpConfig_t WakeUpConfigs= {0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0};
//Standby prevention reason
phhalPcr_StandbyPrevReason_t sStandbyPrevReason = 0;
uint32_t pwrDownConfig = E_APPLY_ALL_SETTNGS & ~(E_PD_GPIO2 ) ;
phhalPcr_Init( (phhalPcr_PwrTempConfig_t *)gpkphCfg_EE_Boot_PcrPwrTempConfig,
(phhalPcr_TxAnaStandByConfig_t *)gpkphCfg_EE_Boot_TxAnaStandByConfig,
pwrDownConfig);
//As phhalPcr_Init clear wakeup configuration init GPIO2 in input
phhalPcr_ConfigInput(2, true, true, true, true, false, false);
//Pullup GPIO2
phhalPcr_ConfigPuPd(2,true,false);
//Powerdown VDDOUT
phhalPmu_PvddLdoStop(); //TODO : Due to this BON setup wakes up without motion.
phhalPmu_PvddLdoLowPower();
DEBUG_PRINTF("\n Goint into sleep mode! \n");
//Enter into low power mode
phhalPcr_EnterLowPowerMode(&sRfLdParams, &WakeUpConfigs, &sStandbyPrevReason);
}
If I configure GPIO2 as a active high I am able board is going into sleep and wakeup on rising edge on GPIO2.
//As phhalPcr_Init clear wakeup configuration init GPIO2 in input
phhalPcr_ConfigInput(2, true, true, true, false, false, false);
//PullDown GPIO2
phhalPcr_ConfigPuPd(2,false,true);
Can you please let me know if I have misconfigured or remaining to configure?
Hi @pratikyadav ,
I am sorry, but seems only a transition from 0 to 1 can be used as a wake up event, please kindly refer to the following for details.
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------