NRF52832 Proper way to configure GPIO interrupts in NRF Connect

Hi all,

NRF52832
NRF Connect 2.6.0

We need to configure interrupts on a GPIO on both edges. There are several topics recommending to use GPIO_INT_TRIG_BOTH instead of GPIO_INT_EDGE_BOTH for power savings.

As discussed in the following topic this triggers an assert in Zephyr GPIO:

 RE: reducing current consumption of nrf5340 GPIO interrupts configured for edge triggering 

However, after actually measuring the power consumption, I can't see any difference between the two options. Is the recommendation still valid for NRF52832 with the latest NRF Connect?

Cheers

Parents Reply
  • Thanks.

    But why wouldn't the configuration be applied correctly? AFAIK, Nordic maintains the relevant part of Zephyr and we are using your SDK without any modifications.

    In case the current consumption difference is actually ~10uA, any chance Nordic could come up with an application example for your boards/chips together with proper documentation? Or even changing the defaults in Zephyr with a clear notice about the tradeoff.

Children
  • Rait said:
    In case the current consumption difference is actually ~10uA, any chance Nordic could come up with an application example for your boards/chips together with proper documentation? Or even changing the defaults in Zephyr with a clear notice about the tradeoff.

    Zephyr is a complex system, so for general debugging I like to check my assumptions just to cover all bases. I would expect them to be set correctly, but want to make sure 100%.

    ...

    Unfortunately we can not have samples for everything that causes extra current draw.
    We can not document nRF current draw on the generic Zephyr API for GPIO.
    The current solution we have to this is indirect, but I would say effective, as it covers most current consumption issues and not only this one.
    Firstly, we assume that users perform current consumption analysis on their products.
    And then users can check the Product Specification or search/ask here on DevZone if they need to figure out anything about their current consumption.
    We also provide some guides and docs for power optimization, but they can not cover everything.

  • You are correct about Zephyr being a complex system. Unfortunately, mandating Zephyr is a decision Nordic made..

    Figured it out.

    The problem with the assert was caused by incorrect suggestion in the other topic (GPIO_INT_EDGE_FALLING -> GPIO_INT_TRIG_BOTH). Should have been GPIO_INT_EDGE_BOTH. 

     RE: reducing current consumption of nrf5340 GPIO interrupts configured for edge triggering 

    Reason why the extra current consumption did not show up was because I still had the "sense-edge-mask" set in devicetree as it overrides the configuration. Seeing +4uA without it.

    The extra documentation/example would still be very useful. Google gives 7 results total for "sense-edge-mask". Maybe in the "nrf\samples" folder.

Related