Wake up from poweroff state using SRTC in i.MX6ULL

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

Wake up from poweroff state using SRTC in i.MX6ULL

1,952 Views
vivekrajpara
Contributor III

Hi,

We are keeping our i.MX6ULL based board at  85 °C constant for 16 hours. We observed that after some hours every supply gets down to 0 V i.e. SOC_IN and HIGH_IN goes to 0V, VSNVS is still 3V and PMIC_POWERON_REQ goes low. Hence the pmic goes to power off mode.

Board : i.MX6ULL

External PMIC: PF3001

Linux BSP: 4.9.88_2.0.0

Below is snapshot from i.MX6ULL Reference manual Table 51-3, where it says that if SoC goes OFF then SNVS can generate and alarm and wake the external PMIC. We want to achieve this, as our SoC automatically goes OFF, while we are in u-boot at  85 °C for some hours.

pastedImage_5.png

1) In this link one of the NXP member says, i.MX6ULL does not have SNVS RTC module. whereas, this link says that SNVS RTC is present in i.MX6ULL as well but not documented the SNVS LP registers in the Reference Manual. Does i.MX6ULL have SNVS LP registers and SNVS RTC support? One of the NXP engineer mentioned that there will be update in i.MX6ULL Reference Manual, but it has been more than a year and yet no update in the revision of i.MX6ULL Reference Manual. Can you please let us know about the SNVS LP registers details for i.MX6ULL?

2) If SNVS RTC is supported in i.MX6ULL, how to turn ON the SoC from OFF mode using SNVS timer? I tried the unit_tests package in i.MX6ULL EVK for SRTC in the latest BSP and tried running "rtcwakeup.out", and I am able to wakeup from suspend mode. 

However, I applied the below command, which poweroff the whole system. But unable to wakeup using SNVS RTC.

"echo +120 > /sys/class/rtc/rtc0/wakealarm && shutdown -h now"

Can anyone let me know how to wakeup from power off using the SNVS timer alarm as mentioned in the above screenshot? I have the EVK to test so, any verified/proven method for the same will be really helpful.

Regards,

Vivek

Labels (1)
Tags (3)
0 Kudos
7 Replies

1,588 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vivek

>Does i.MX6ULL have SNVS LP registers and SNVS RTC support? One of the NXP engineer

>mentioned that there will be update in i.MX6ULL Reference Manual, but it has been more than

>a year and yet no update in the revision of i.MX6ULL Reference Manual. 

issue was escalated on https://community.nxp.com/message/974260?commentID=974260#comment-974260 

with answer:

"I believe SNVS_LP Secure Real Time Counter hardware is present in the i.MX6ULL."

Regarding update in i.MX6ULL Reference Manual:

"Since some of the SNVS registers are security related they cannot be included in Reference
Manual, we should advice our customers to refer to SRM for detailed information about SNVS.

In i.MX7DRM and i.MX6ULRM all the SNVS registers mentioned in SRM are also included
in the RM, but this should be avoided. We will open a ticket for removing security related
registers from these RMs."

So recommendation is to use

Security Reference Manual for the i.MX 6ULL Applications Processor

For wakeup SNVS timer test one can try rtcwakeup.c (note VDD_SNVS_IN should be applied to i.MX6ULL)

mxc_rtc\test - imx-test - i.MX Driver Test Application Software 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,588 Views
vivekrajpara
Contributor III

Hi igorpadykov,

Thanks for your help in this case.

As I mentioned, we are using the "rtcwakeup.out" application available in "unit_tests". We are using the i.MX6ULL EVK with Linux 4.14.98 BSP for testing the SRTC.

Basically, my whole system will be in power off state, except the SNVS, so SRTC should turn ON the system and external PMIC is what I am targetting, In order to do the same, I am testing this in the EVK.

But  "rtcwakeup.out" application wakeup the system only when the system is in standby/mem state. We want to the wakeup the system when VDD_SNVS_IN is only high and other SOC and ARM voltage goes low. I tried the same by giving the "poweroff" command and measured the VDD_SNVS_IN in EVK, it is giving 3.12V and other voltages are low. But still I am unable to wakeup using SRTC with the help of "rtcwakeup.out" application.

Can you please help me with testing the SRTC with only VDD_SNVS_IN high in EVK ? Once, I will test this EVK we will replicate the same in our custom board. 

Also, the SRM(security reference manual) link you suggested requires an access which can be received in 24 to 48 hours, and we are running out of time. Can you please attach the same here or send me on my email-ID?

Regards,

Vivek

0 Kudos

1,588 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vivek

sorry, according to documentation  "rtcwakeup.out" application wakeup only from suspend
mode

FSL-UT-RTC-002.txt\doc\mxc_rtc\test - imx-test - i.MX Driver Test Application Software 

Suggest to obtain Security Reference Manual and check more details for SNVS RTC wake-up capability.

Best regards
igor

0 Kudos

1,588 Views
vivekrajpara
Contributor III

Hi igorpadykov,

Thanks for the suggestion, I tried with unit tests and able to wakeup the system using "rtcwakeup.out". However, now I want to autoreload the snvs rtc timer to generate the interrupt at regular interval. Does snvs rtc support this auto reload feature? I also tested "rtctest.out" which has periodic interrupts but this is not working as expected. As per this application at the end we should have 131 interrupts but I can see only 11 interrupts in cat /proc/interrupts for snvs rtc alarm. So, I doubt the 120 periodic interrupts are not working, 

Is there auto reload support in snvs rtc timer? I want to configure the alarm once and then from next time onwards it should auto-reload it self. Can you please help on this ASAP?

Regards,

Vivek

0 Kudos

1,562 Views
siva_prabhakara
Contributor III

@vivekrajpara what was the issue to do SRTC wakeup? how did you manage to wakeup from poweroff using SNVS RTC? if i set a value to wakealarm SRTC and do poweroff, it wont resume even when SNVS Voltages are high.

0 Kudos

1,588 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vivek

 

I am afraid reload is not supported by snvs rtc.

Best regards
igor

0 Kudos

1,588 Views
vivekrajpara
Contributor III

Hi igorpadykov,

We have verified the "rtcwakeup.c" and you are right, it will wakeup only from suspend. So, we commented the "suspend_system()"  function call from this. So, it will now only set the SNVS LP timer alarm and exit the application. Then, I used to give the "poweroff" command from the console and wait fro the SNVS alarm to wake the system up. But, it does not wakes up the system. Can you please help us on this?

Any other way you can suggest to test the SRTC in poweroff state with only VDD_SNVS_IN is high? I want to test the actual functionality of SRTC, and bring the SOC from OFF to ON by alarm timer.

Regards,

Vivek 

0 Kudos