Using the new LPCOMP driver in Zephyr

Hi,

I'm polishing up the development of my product, and I need to use the LPCOMP driver to wakeup my NRF52840 from the deepest sleep mode. There is not much information on the web, and I saw there is a new driver, but absolutely no example.

Since I'm quite new to Zephyr (started 2 weeks ago...), I'm a bit lost on how to implement this. Basically, I need:

- Go to deep sleep

- Configure the LPCOMP to detect a trigger point around 1,5V

- Wakeup when I go above this trigger point

- Once waken up, I need to still be able to get the interrupts because I then use this signal to detect clicks of a button (that doesn't go back to 0, hence the use of LPCOMP).

Could you provide me with some pointers to make that happen?

Thanks in advance.

Parents Reply
  • Hi, thanks a lot it was very helpful :) I got a simple exemple working now. I'll probably be working on the low power section of the device next week or end of the week, so maybe I'll come back to you if I can't get it to wake the device.

Children
No Data