When using GPIOE interrupt to drive MEMS, the power consumption is up to 470uA

When I set the GPIOE pin to float, NRF_DRV_gPIote_IN_config_t config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);

The power difference between true and false is 10uA, but when I set the GPIOE pin as the drive pin of MEMS, the power consumption is as high as 470UA, may I ask why this is caused?

Parents Reply Children
  • Thank you for your answer!but it doesn't add much to my question. I want to know why the external driver will increase the power consumption by 470ua when the GPIOE interrupt is set to Port Event mode, which should be about 10UA higher according to the manual.

  • Hi,

    Please check if my assumptions are correct:

    1. You configure the GPIOTE IN EVENT on a pin (GPIOTE_CONFIG_IN_SENSE_TOGGLE(true); )
    2. When MEMS is connected the current consumption is 470uA
    3. When MEMS is not connected the current consumption is 10uA

    If the MEMS output signal is not a defined 1 or 0, but floating in between, the current consumption will go up.

    If the MEMS output signal interrupts the nRF52 very fast, the current consumption will go up

    • Can you check the signal between the nRF52 and the MEMS with a logic analyzer?
    • What happens if you configure the line with a pullup resistor?

    Best regards,
    Stian

  • Thank you for your answer!

    The reality is that the GPIOE pin is only initialized and does not trigger an interrupt. That is, when the MEMS does not output, the detected power consumption will be 470uA. And GPIOE's three trigger modes have been tried, all are high power consumption.

    1, GPIOTE_CONFIG_IN_SENSE_LOTOHI (true)

    2, GPIOTE_CONFIG_IN_SENSE_HITOLO (true)

    3, GPIOTE_CONFIG_IN_SENSE_TOGGLE (true)

    So I want to know whether the power consumption will increase due to the external drive. Or is there something wrong with my code?

    void Mems_ActivePin_Enable(nrfx_gpiote_evt_handler_t memsActiveCB)
    {
    	ret_code_t errCode;
    	if (!nrf_drv_gpiote_is_init())
        {
            errCode = nrf_drv_gpiote_init();
            APP_ERROR_CHECK(errCode);
        }
    	
    	nrf_drv_gpiote_in_config_t inConfig = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
    	inConfig.pull = NRF_GPIO_PIN_PULLDOWN;										
        
    	errCode = nrf_drv_gpiote_in_init(INT1, &inConfig, memsActiveCB);
    	APP_ERROR_CHECK(errCode);
    	
    	nrf_drv_gpiote_in_event_enable(INT1, true);
    }

  • Hi,

    The power consumption should not be 470 uA with this setup. The GPIO is configured as an input which means that it will not drive the external component. What happens if you remove this line? inConfig.pull = NRF_GPIO_PIN_PULLDOWN;

    Are you using any other peripherals like SPI or TWI? I'm thinking that the conditions for this errata are met if you have SPI/TWI running and then configure GPIOTE: https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_89.html?cp=4_2_1_0_1_26

  • hi,

    The use of SPI may be the reason, but I have to use SPI in this project, so I plan to use Port Event mode to control the interruption of GPIOE, and this method is feasible. As for the power consumption problem, I think I may have solved it for now.

    Thank you very much for your answer to my question. Finally, I would like to ask: is it inevitable that the power consumption of up to 400uA occurs in the configuration of GPIOE when SPI/TWI is running?

Related