This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE power problem IC revision 3

Hello everyone,

My IC description: nRF51822 QFAAHO, which belongs to IC revision 3 and, as the PANv3.0 says, "1V2 + HFCLKarerequested always when the GPIOTE task is configured." is a fixed anomaly.

My nRF should do the next: I have a button that wakes up the device and, in the case there is a phone connected, the device will send a '1', otherwise, pressing the button will reset the device.

My problem is: when I'm using GPIOTE (gpiote_init() is not commented), the device consumes around 0.922 mA. On the other hand, when I comment gpiote_init() the consumption goes to 0.033 mA.

My question is: Can someone check what am I doing wrong or comment a solved thread with same/similar issue??

This is my code:

int main(void){

    bool     erase_bonds = true;

    // Initialize.
    timers_init();

    gpiote_init();

    ble_stack_init();
    peer_manager_init(erase_bonds);
    gap_params_init();
    advertising_init();
    gatt_init();
    services_init();
    conn_params_init();
    application_timers_start();
    advertising_start();
    for (;;){
        power_manage();
     }
}

void gpiote_init(void){

    if(!nrf_drv_gpiote_is_init()){
        nrf_drv_gpiote_init();
    }
    nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
    config.pull = NRF_GPIO_PIN_PULLDOWN;
    nrf_drv_gpiote_in_init(BUTTON, &config, gpio_handler);
    nrf_drv_gpiote_in_event_enable(BUTTON, true);
    return;
}


static void gpio_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action){
      if(checkConnection(&m_hrs) == 1){
        //  NRF_LOG_INFO("ShortPress: Connected!\r\n");
          //err_code =
          ble_hrs_heart_rate_measurement_send(&m_hrs);

      }else{
          NVIC_SystemReset();
      }
}
Parents
  • Hi Pablo, If you read the PAN again: "1V2 + HFCLKarerequested always when the GPIOTE task is configured."

    You can find that it's GPIOTE task is what described in the PAN, not GPIOTE event.

    The GPIOTE event would always requires 1V2 and HFCLK to detect the pin level changes.

    If you want detect a button press with low power consumption, please use GPIO PORT event instead.

Reply
  • Hi Pablo, If you read the PAN again: "1V2 + HFCLKarerequested always when the GPIOTE task is configured."

    You can find that it's GPIOTE task is what described in the PAN, not GPIOTE event.

    The GPIOTE event would always requires 1V2 and HFCLK to detect the pin level changes.

    If you want detect a button press with low power consumption, please use GPIO PORT event instead.

Children
Related