This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trigger LPComp manually

Hi,

I took a look at the low power comparator example from the Nordic SDK and test it with my nRF52-DK and I found out that the comparator isn´t triggering when I set the input voltage to 1.4 V (for example) and start a debug session. Instead, the interrupt is triggered when I adjust the input voltage by a bit.

Is there a solution to trigger the LPComp after starting the application?

Parents
  • Hi Kampino,

    The LPCOMP will generate events only when the input voltage VIN+ crosses the reference voltage VIN-. In sdk_config.h the default reference voltage is set to VDD/2, which for nRF52832 DK is around 1.4V. You will not get any event before the input voltage cross the reference voltage.

    If you want to check if the input voltage is above or below the reference voltage when the application starts you will need to trigger an sample manually using TASKS_SAMPLE and read the result from RESULT after EVENTS_READY event.

    Best regards,

    Marjeris

Reply
  • Hi Kampino,

    The LPCOMP will generate events only when the input voltage VIN+ crosses the reference voltage VIN-. In sdk_config.h the default reference voltage is set to VDD/2, which for nRF52832 DK is around 1.4V. You will not get any event before the input voltage cross the reference voltage.

    If you want to check if the input voltage is above or below the reference voltage when the application starts you will need to trigger an sample manually using TASKS_SAMPLE and read the result from RESULT after EVENTS_READY event.

    Best regards,

    Marjeris

Children
No Data
Related