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

How to set NRF24LE1 in register retention with analog comparator wakeup? Sample code needed. Please help.

I want to set up nrf24le1 in register retention mode with analog comparator wake up. The moment it wakes up it should do few ADC conversions and then again go back to sleep. I could not find much information on this or any example code. I just found this:

hal_ancmp_set_input_channel(8);//P1.0
hal_ancmp_set_ref_voltage_scale(0x01);//50%
hal_ancmp_set_reference(0);
hal_ancmp_enable(true);
PWRDWN=0x04

from this thread here: https://devzone.nordicsemi.com/f/nordic-q-a/20741/how-to-wakeup-with-analogcomparator-on-nrf24le1

But I do not know how that code works or how to change it to do ADC conversions on wake up and then go back to power saving mode. Someone please help.

Related