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
  • Hi, it's not clear to me what the MEMS sensor is doing, or how it is connected. In general if you configure a pin as output and forcing it high, and then you see a current increase, the external component is powered through the output pin.

    Best regards,
    Stian

  • 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);
    }

Reply
  • 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);
    }

Children
Related