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

LPComp events triggers by other inputs

Hi

I am currently doing a project based on the nRF52840 MCU and evaluation board

as part of my project, I have used the LPComp module, and set it up to trigger on rising voltage

I have done so by following the LPComp example of the 15.3 SDK, which my project uses

I have tested the module and it seems to work

however, I am also recording LPComp events triggering when other modules are used (for example, when using LEDs or other GPIOs)

I have tried connecting both references together, grounding both, yet I still get LPComp events

I have also tested on two evaluation boards, so I know that the one I normally use isn't just faulty (unless both are faulty somehow)

Is there any reason for this behavior? anything I could test to try and figure out the cause?

if there is any more information I can provide to help with solving this, please let me know and I'll do my best to provide it

thanks in advance

  • What do you have the LPCOMP pins connected to when you test this? I'm not able to generate the event when I have AIN0 connected to VDD and AIN1 connected to GND. When the pins are left unconnected/floating, I can see the event being generated many times, but I would expect the voltage level on floating pins bo to be affected by external circuitry.

    I also tested with AIN0/AIN1 both connected to GND and both connected to VDD, not able to generate the events by pressing buttons.

  • thanks for the suggestion

    currently the project is working on the nRF52840 evaluation board, so the circuit should be that of the evaluation board

    if the issue is indeed caused by sudden changes to the ICs, it is either an issue with the two evaluation boards I have, or with the HW in general, though I hope it is something I did wrong in the code

    I will keep your suggestions in mind and relay them to our HW team if we determine the issue is in fact HW related

  • I found the issue

    thanks to your comment, I realized that I had used the wrong pins (I took the pin number from the pca file instead of looking at the datasheet)

    testing on the correct pins, it seems that everything is working properly

    I'll test again to verify that the LPComp itself works correctly on the correct pins

    not sure how changing the states of other pins generated the events, but I must have caused currents in the ICs and caused the issue

    thanks a lot for your assistance, your test made me realize my error

    after I've verified everything works, I'll let you know and close this

  • I tested this again, and the LPComp triggers correctly

    I don't know how testing it on the wrong pins seemed to work correctly, but I guess I must have caused spikes in the currents of the ICs when I changed the voltage of the other pins

    thank you for your help, feel free to close this case

1 2