This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

about the nRF24le1 wakeup

I use P0.2 as a wake-up pin, when the system into a deep sleep, I connected a High Voltage in the P0.2, it can wake up, but if I connected a High Voltage in the P0.2 always,it can not wake up the system on , or changes the connected Voltage from high to low too fast, it also can not wake up.Because I want to use the MCP2030 connected to nRF24lE1, MCP2030 is connected to nRF24lE1 LDATA of P0.2, when the MCP2030 output data, nRF24lE1 can wake up from p0.2 . why? How I guarantee that the system will wake up when I I connected a High Voltage in the P0.2 always or he connected Voltage from high to low too fast? my code:

void retentionpinset(void) {

WUOPC1=0x00;
WUOPC0=0x04;
P0DIR|=0x04;
OPMCON|=0x02;

Enableint(); }

void powrdownmodeset(unsigned char mode) { char low_power=0; switch(mode) { case DeepSleep :low_power=0x01;break; case Mem_Ret_On :low_power=0x03;break; case Mem_Ret_Off:low_power=0x02;break; case Reg_Ret_On :low_power=0x04;break; case Reg_Ret_Off:low_power=0x04;break; case Standby :low_power=0x07;break; default :low_power=0x07;break; }

CLKCTRL=0x10;
delay_ms(1);

// OPMCON&=0x00; // PWRDWN|=low_power;

}

void main(void) { char flag=1,rf_cd = 0; INT8U reclen,i,check_LF_p; INT16U LF_REV_DATA = 0,temp; PWRDWN = 0X00; delay_ms(100); OPMCON = 0X00;

  delay_ms(100);

// rtc2_off();
// rtc2_init(); Disableint(); workclkset(); baudrate(9600); chipiocfg(); LED = 0; delay_ms(1); temp = getlastresetinf() ;
Enableint();

  	retentionpinset(); 
	delay_ms(300);
	prints( "Powdown \r\n" );  
	
	LED = 1;
    powrdownmodeset(DeepSleep);  

}

Parents Reply Children
No Data
Related