Determine delay when setting a GPIO as input before reading its state

Hi Nordic staff!

I'm working on a project with nRF52833 SoC. I want to read the state of an input pulled-up pin GPIO_1 (P0.26). The GPIO_1 pin is NOT connected to any external component.

I'm looking for the delay needed to wait before I can reliably read the state of the input pin. Could you please tell me the specification for this delay? I couldn't find this information on the nRF52833 SoC product specification. Thank you!

    nrf_gpio_cfg_input(GPIO_1,NRF_GPIO_PIN_PULLUP);
    nrf_delay_ms(GPIO_TEST_SETTLE_MS);
    gpio_state = nrf_gpio_pin_read(GPIO_1);

Parents
  • There is none - because the time depends on the GPIO external load. 

    This is equal to a capacitor charging across a resistor - to calculate worst case time you take the highest external capacity and the highest pullup resistance from the datasheet - then calculate the time from U=0V to U=V_high_min.

    One millisecond should be plenty in most cases.

Reply
  • There is none - because the time depends on the GPIO external load. 

    This is equal to a capacitor charging across a resistor - to calculate worst case time you take the highest external capacity and the highest pullup resistance from the datasheet - then calculate the time from U=0V to U=V_high_min.

    One millisecond should be plenty in most cases.

Children
Related