Detect ONOFF pin to boot up system

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect ONOFF pin to boot up system

323 Views
rudolphhsueh
Contributor II

Hi all,

     Recently, I want to boot up my system via detect ONOFF pin status. But I always get a lot of suggestions by detecting SNVS register value.

I tried to get SNVS_LP and SNVS_HP content during change ONOFF pin but these registers doesn't get any modification.

Is there anything idea for booting-up system by using ONOFF pin detect?

By the way, I want to implement this method into u-boot period. Is it possible?

Labels (4)
0 Kudos
2 Replies

60 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Rudolph

one can look at attached example showing ONOFF

detection in HW_SNVS_LPSR.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

60 Views
rudolphhsueh
Contributor II

Hi igorpadykov,

   

     Here is my code

========= code ========================

    unsigned int reg;
    reg = readl(SNVS_BASE_ADDR+ 0x38);
    //printf("rudolph add for 1 SNVS_BASE_ADDR DP_EN=%d \n",reg);
    if(reg == 0)
    {
            reg |= 0x0021;//set SNVS_LP Control Register from freescale pin define
            writel(reg,SNVS_BASE_ADDR + 0x38);
            reg |= 0x0061;//set system power off
            writel(reg,SNVS_BASE_ADDR + 0x38);

    }
    else
    {
            printf("rudolph start system \n");
    }

=============================================

Someone told me to get SNVS register status.

When my AC power on, I will check SNVS register whether value is zero or not.

If SNVS is zero, I will write an value into SNVS. And forced shutdown.

So when  I was triggered my ONOFF pin for booting-up system. It will check again SNVS register. SNVS won't get zero then process can be run continued.

Now I want to do something in u-boot period. But depend on SNVS register method I can not do anything because system is power off.

So this method seems can not work.

0 Kudos