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 Mahesh,

    I understand, but the nRF51822 and nRF52832 have lower power. Most of your questions are basically 8051 generic questions, but to quickly answer them:

    1. Init GPIO's, and release latch (to apply GPIO settings).

    2. Yes, to use the external clock, you need to set the pin as input.

    3. Sure.

    4. Yes (release on 0, lock on 2).

    1. Yes.

    2. Yes.

    3. No.

    1. At least it's a good idea.

    2. In memory retention mode there will be a reset on wakeup, so this else is to control if it should wait for the RTC interrupt, or init the RTC (first time run). Likely it is a better idea to look at the register retention mode.

    3. Yes.

    4. Normal operation if 0.

    Best regards,

    Kenneth

Reply
  • Hi Mahesh,

    I understand, but the nRF51822 and nRF52832 have lower power. Most of your questions are basically 8051 generic questions, but to quickly answer them:

    1. Init GPIO's, and release latch (to apply GPIO settings).

    2. Yes, to use the external clock, you need to set the pin as input.

    3. Sure.

    4. Yes (release on 0, lock on 2).

    1. Yes.

    2. Yes.

    3. No.

    1. At least it's a good idea.

    2. In memory retention mode there will be a reset on wakeup, so this else is to control if it should wait for the RTC interrupt, or init the RTC (first time run). Likely it is a better idea to look at the register retention mode.

    3. Yes.

    4. Normal operation if 0.

    Best regards,

    Kenneth

Children
No Data
Related