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

How to wakeup with analogComparator on nRF24LE1

Hi,

i try without succes to go into MemoryRentention Timer On sleep mode, and wakeup with the analog comparator activated by AIN1 without sucess. Here is my code, please can you tell me what is wrong ?

Please can you show me correct sequence to enter and output this mode with the analog comparator ?

Tank you !

IEN0  = 0x00; 									//disable global interrupt
IEN1  = 0x00; 									//disable tick interrupt

CLKCTRL =  128;
CLKLFCTRL =  	0x01;     							//Enable 32768 clock synthesi
ADCCON1 =  0x05;                                    // AIN1 > 0.25*VDD
COMPCON = 0x01;                                    //Enable comparator and configure selected pin as analog input
PWRDWN = 0x03;  	                                   /*  3->Memory retention timerOn */
while(1); /*zZZzzZZZz*/	
Parents Reply
  • Can some one tell me how to wake up from register retention mode using analog comparator, because I used the above code Bui but could no get it working. Could you please provide the complete code for register retention with analog comparator such that after it wakes up it does some task and goes back to sleep with waking up happening by analog comparator method..

Children
Related