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

Low Power Comparator

Hello,

I'm working with nrf51822 on a custom board and i'd like to use the LPCOMP as wakeup source. I configured the module by the code listed above:

void lpcomp_init(void) { NRF_LPCOMP->PSEL = 0x00000000; NRF_LPCOMP->REFSEL = 0x00000006; NRF_LPCOMP->ANADETECT = 0x00000000;

NRF_LPCOMP->ENABLE = 1;
NRF_LPCOMP->TASKS_START = 1;

while (NRF_LPCOMP->EVENTS_READY == 0) {

}

}

I don't know if the configuration is correct but the function stuck into the while cycle. Am i doing something wrong? Could be an hardware issue related to the silicon revision of my chip?

Thanks in advance and best regards

Related