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

  • Hi,

    Which currents are you measuring and what do you use for the measurements?

    Regards,
    Sigurd Hellesvik

  • I'm measuring the current consumption for a custom board using Power Profiler Kit 2. During CPU idle getting ~2uA for both options.

  • In this case, it is a good idea to first check if the configuration was applied correctly or not.

    Could you debug your code for both cases and check what INTENSET is set to?
    If I remember correctly, the configuration you refer to selects wether this is configured to PORT or not.

  • 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.

  • 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.

Related