Re: Determining source of GPIO Interrupt on NRF52832 #nrf52832 #gpio


bbradley@...
 

I just realized I responded to you privately by accident, Lawrence. Sorry about that. I will copy the message I sent to you to the group so that the discussion is up to date.

The suggestion regarding testing the gpio with gpio_pin_read is exactly what I am currently doing, and it does indeed work well, but I had the same thought about spurious pulses potentially causing issues here. I haven't observed issues with this yet, but it certainly was a concern of mine.

As for your second suggestion, I have not tried that! My understanding was that calling gpio_pin_configure a second time would (re)configure the gpio, not append additional configurations. So I have been configuring the gpio with interrupt flags which are bitwise OR'd. If the API can in fact allow me to have multiple pin configurations with different callbacks then it should work perfectly. This will require a bit of refactor for my current project, but I can at least test this concept fairly quickly. 

Thanks for the suggestions! I will let you know if it works.
Brian 

Join users@lists.zephyrproject.org to automatically receive all group messages.