Wake-up from stop 2 mode using ST25R3916 interrupt pin (NFC06-A1)
Hi,
I am using the NFC06-A1 with Nucleo-L476RG and I want to configure wakeup mode for NFC IC (with inductive tag detect mode) and also put the MCU into STOP2 mode.
Once the MCU enters STOP 2 mode using this fucntion HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI) I can't receive any interrupt and no tag is detected.
So in the code I did this :
in rfalWakeUpModeStart() function :
if( config == NULL )
{
gRFAL.wum.cfg.period = RFAL_WUM_PERIOD_800MS;
gRFAL.wum.cfg.irqTout = false;
gRFAL.wum.cfg.swTagDetect = true;
gRFAL.wum.cfg.indAmp.enabled = true;
gRFAL.wum.cfg.indPha.enabled = false;
gRFAL.wum.cfg.cap.enabled = false;
gRFAL.wum.cfg.indAmp.delta = 2U;
gRFAL.wum.cfg.indAmp.reference = RFAL_WUM_REFERENCE_AUTO;
gRFAL.wum.cfg.indAmp.autoAvg = true;
}in demoIni() function
bool demoIni( void )
{
ReturnCode err;
#if defined(STM32L476xx)
if( (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) != 0)
{
verbose = true;
}
#endif
ndefShowDemoUsage();
err = rfalNfcInitialize();
if( err == ERR_NONE )
{
discParam.compMode = RFAL_COMPLIANCE_MODE_NFC;
discParam.devLimit = 1U;
discParam.nfcfBR = RFAL_BR_212;
discParam.ap2pBR = RFAL_BR_424;
ST_MEMCPY( &discParam.nfcid3, NFCID3, sizeof(NFCID3) );
ST_MEMCPY( &discParam.GB, GB, sizeof(GB) );
discParam.GBLen = sizeof(GB);
discParam.notifyCb = NULL;
discParam.totalDuration = 1000U;
discParam.wakeupEnabled = true;
discParam.wakeupConfigDefault = true;
discParam.techs2Find = ( RFAL_NFC_POLL_TECH_A | RFAL_NFC_POLL_TECH_B | RFAL_NFC_POLL_TECH_F | RFAL_NFC_POLL_TECH_V | RFAL_NFC_POLL_TECH_ST25TB );
#if defined(ST25R3911) || defined(ST25R3916)
discParam.techs2Find |= RFAL_NFC_POLL_TECH_AP2P;
#endif /* ST25R3911 || ST25R3916 */
#if defined(ST25R3916)
/* Set configuration for NFC-A CE */
ST_MEMCPY( discParam.lmConfigPA.SENS_RES, ceNFCA_SENS_RES, RFAL_LM_SENS_RES_LEN ); /* Set SENS_RES / ATQA */
ST_MEMCPY( discParam.lmConfigPA.nfcid, ceNFCA_NFCID, RFAL_NFCID2_LEN ); /* Set NFCID / UID */
discParam.lmConfigPA.nfcidLen = RFAL_LM_NFCID_LEN_07; /* Set NFCID length to 7 bytes */
discParam.lmConfigPA.SEL_RES = ceNFCA_SEL_RES; /* Set SEL_RES / SAK */
/* Set configuration for NFC-F CE */
ST_MEMCPY( discParam.lmConfigPF.SC, ceNFCF_SC, RFAL_LM_SENSF_SC_LEN ); /* Set System Code */
ST_MEMCPY( &ceNFCF_SENSF_RES[RFAL_NFCF_LENGTH_LEN], ceNFCF_nfcid2, RFAL_LM_SENSF_RES_LEN ); /* Load NFCID2 on SENSF_RES */
ST_MEMCPY( discParam.lmConfigPF.SENSF_RES, ceNFCF_SENSF_RES, RFAL_LM_SENSF_RES_LEN ); /* Set SENSF_RES / Poll Response */
discParam.techs2Find |= ( RFAL_NFC_LISTEN_TECH_A | RFAL_NFC_LISTEN_TECH_F );
#endif /* ST25R3916 */
state = DEMO_ST_START_DISCOVERY;
return true;
}
return false;
}PS : the initialization is good and also without the stop mode the wake-up feature is working fine.
Could you please help to see what am I missing ?
Another question : What is the maximum supply current of the ST25R3916 ? looking into the datasheet I see many values , but in the maximum absolute ratings two values are mentionned IVDD_EXT = 500mA, IVDD_LDO = 350mA ?
Thanks,
