Hi, I am using phExDoorAccess application in stand by mode.
After the reset the microcontroller poll the evironment in LPCD mode correctly and if a card is detected it switch to full power mode.
My problem is that it happen once, after the card was detected for the first time and removed, the micro goes in stand by and stay there forever.
How can I put the micro in polling mode again?
Gianluca
You can check the phExDoorAccess.c.
As the standby enabled (PHFL_ENABLE_STANDBY was defined), it will not go to the polling.
For example: in phExDoorAccess_SystemTask()
case E_PH_CLIF:
switch(sSysMsg.dwMsg[0])
{
/** CLIF application completed its task either go to standby OR start poll timer */
case (uint32_t)E_PHEXDOORACCESS_CLIF_RSP_END:
#ifdef PHFL_ENABLE_STANDBY
while(1)
{
phLED_SetPattern(gkphLED_StandBy);
/** All the wakeup configurations are set by default in the EEPROM. */
phhalPcr_EnterLowPowerMode((phhalPcr_RfLdtParams_t *)gpkphCfg_EE_HW_RfLdtParams,
&phhalPcr_WakeUpConfig, &sStandbyPrevReason);
/** It is not expected to reach here, if so then wait for a while and try Standby. */
phRtos_TaskDelay(SYS_TASK_FREQUENCY_MS);
}
#else
phhalTimer_Start(gpphExDoorAccess_Clif_PollTimer, E_TIMER_SINGLE_SHOT);
#endif
So, you can try to modify the code to meet your needs.