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

sleep w memory rentention problem

hi,

i'm not able to have the nRF24LE1 go to sleep. I'm using the example at the link below, to which I've added code for UART and ADC usage. Is there a way to end the UART (the opposite of the hal_uart_init() function)?

I need the LE1 to wake up, take an analog reading, write it to the UART, then go to sleep for x seconds. I'd like it to sleep for 10 seconds but it seems 2 is the maximum I can get with this MUP.

code example:

www.nordicsemi.com/.../How-to-setup-memory-retention-timers-on-on-the-nRF24LE1

In the example, what do these lines do?

IEN1 = 0x20; EA = 1;

// Go to standby mode and wait for RTC interrupt

PWRDWN = 0x07; // Clear power down

PWRDWN = 0x00;

Thanks!

Mahesh

Parents
  • Hi Kenneth,
    I got it working. Only the hal_clklf_set_source(HAL_CLKLF_RCOSC32K) works for the memory retention and the register retention modes (timers on). Any idea why? 
    What is the advantage of the register rentention mode? it takes more power (2uA) whereas the memory retention mode takes 1.8uA.
    The following don't work for both the memory and register retention modes (timers on)
    HAL_CLKLF_XOSC32K = 0, HAL_CLKLF_XOSC16M_SYNTH = 2, HAL_CLKLF_PAD_XC1 = 3, HAL_CLKLF_DIG_IO_RAIL = 4, HAL_CLKLF_NONE = 7
    thanks,
    mahesh

Reply
  • Hi Kenneth,
    I got it working. Only the hal_clklf_set_source(HAL_CLKLF_RCOSC32K) works for the memory retention and the register retention modes (timers on). Any idea why? 
    What is the advantage of the register rentention mode? it takes more power (2uA) whereas the memory retention mode takes 1.8uA.
    The following don't work for both the memory and register retention modes (timers on)
    HAL_CLKLF_XOSC32K = 0, HAL_CLKLF_XOSC16M_SYNTH = 2, HAL_CLKLF_PAD_XC1 = 3, HAL_CLKLF_DIG_IO_RAIL = 4, HAL_CLKLF_NONE = 7
    thanks,
    mahesh

Children
No Data
Related