[PN7362] System halted in phhalPcr_EnterLowPowerMode()

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[PN7362] System halted in phhalPcr_EnterLowPowerMode()

2,684 Views
nicholas_yao
Contributor I

Hello,

We are doing a NFC card reader implementation with PN7362.
This reader will wake up and activate the antenna then get into the low_power mode periodically.

//=====
phhalPcr_StandbyPrevReason_t sStandbyPrevReason = {0};
phhalPcr_WakeUpConfig_t sWakeUpConfig = {0};
phhalHw_FieldOff(pHal);

phhalHw_Wait(pHal, PHHAL_HW_TIME_MICROSECONDS, 5100);

sWakeUpConfig.bWakeUpTimer = 1;
sWakeUpConfig.wWakeUpTimerVal = 300;

phhalPcr_EnterLowPowerMode((phhalPcr_RfLdtParams_t *)gpkphCfg_EE_HW_RfLdtParams, &sWakeUpConfig, &sStandbyPrevReason);
//=====


Sometimes, the system has halted and struck in phhalPcr_EnterLowPowerMode.
And we found that if changed the wait time (5100) to 6000ms or more, seems the occurrence is reduced...

Any idea about this? What is the exact wait time in this system?

Labels (1)
0 Kudos
Reply
6 Replies

2,514 Views
nicholas_yao
Contributor I

Dear Kan,

Sorry, My typo error, it's microsecond(us)..

changed the wait time (5100) to 6000us or more,  the occurrence is reduced...

0 Kudos
Reply

2,514 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello Nicholas,

Thanks for the clarification!

If you comment out the code to activate the antenna, would this issue happen with wait time of 5100us?

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.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,514 Views
nicholas_yao
Contributor I

Hello Kan,

for the gpkphCfg_EE_HW_RfLdtParams, it is the original default.

//========

<structure name="RfLdtParams">
<!-- Reviewed structure contents PGh: 2015.03.09 -->
<description>\see phhalPcr_RfLdtParams_t</description>
<field name="bRfldRefLo" type="u8" value="02" valuetype="int" >
<description>
Higher Reference Value for RF Level Detector
</description>
</field>
<field name="bRfldRefHi" type="u8" value="03" valuetype="int" >
<description>
Lower Reference Value for RF Level Detector
</description>
</field>
<field name="bEnableAdvancedRFLD" type="u8" value="0" valuetype="int" >
<description>
Should we used advanced RFLD Feature or normal RFLD Feature
</description>
</field>
<field name="bPadding" type="u8" value="0" valuetype="int" >
<description>
Structure padding.
</description>
</field>
</structure>

//========

And which part should comment out? Sorry, I didn't get it.

//=====
phhalPcr_StandbyPrevReason_t sStandbyPrevReason = {0};
phhalPcr_WakeUpConfig_t sWakeUpConfig = {0};
phhalHw_FieldOff(pHal);

phhalHw_Wait(pHal, PHHAL_HW_TIME_MICROSECONDS, 5100); 

sWakeUpConfig.bWakeUpTimer = 1;
sWakeUpConfig.wWakeUpTimerVal = 300; 

phhalPcr_EnterLowPowerMode((phhalPcr_RfLdtParams_t *)gpkphCfg_EE_HW_RfLdtParams, &sWakeUpConfig, &sStandbyPrevReason);
//=====

This section is the last step of the routine process, try to stop/turn off everything and get into low power mode.

B/R,

Nicholas

0 Kudos
Reply

2,514 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello Nicholas,

Thanks for the information! What I mean is to stop/turn off everything before get into the loop of entering and exiting the low power mode.

for example, just a while loop containing the following code:

phhalPcr_StandbyPrevReason_t sStandbyPrevReason = {0};
phhalPcr_WakeUpConfig_t sWakeUpConfig = {0};

phhalHw_Wait(pHal, PHHAL_HW_TIME_MICROSECONDS, 5100); 

 

sWakeUpConfig.bWakeUpTimer = 1;
sWakeUpConfig.wWakeUpTimerVal = 300; 

 

phhalPcr_EnterLowPowerMode((phhalPcr_RfLdtParams_t *)gpkphCfg_EE_HW_RfLdtParams, &sWakeUpConfig, &sStandbyPrevReason);

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.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,514 Views
nicholas_yao
Contributor I

Hello Kan,

Thanks for your reply.

Yes, will try to do the experiment.

But, just curious...

I have released all the other application resource before phhalPcr_EnterLowPowerMode, is there any other system waiting time that I should add into the process?

Because if I extend the waiting time(phhalHw_Wait) to 6000us(6ms), everything is working fine.

Is there any step I missed? or did wrong?

B/R,

Nicholas

0 Kudos
Reply

2,514 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello,

How did you set for gpkphCfg_EE_HW_RfLdtParams? and PHHAL_HW_TIME_MICROSECONDS is used for microsecond(us), not millisecond(ms), is that the expected time unit?

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.
-------------------------------------------------------------------------------

0 Kudos
Reply