problem with nrf52832 gpio

Hi,I'm using nrf52832. I configured P0.20 as GPIO output,P0.22 as GPIO input.These two pins are connected wiht a 10Kohm resistor.I measured the voltage level on P0.22 is about 2V.

Why?The chip is broken?I have dozens of nrf52832 have the same problem.

Parents Reply Children
  • #define J11_IN 22
    #define J11_OUT 20
    int main(void)
    {
    bool erase_bonds;

    log_init();
    NRF_LOG_INFO("TX_TANZHUAN %s started %s %s.", APP_VERSION, __DATE__, __TIME__);

    timers_init();
    leds_init(&erase_bonds);
    gpiote_init();
    record_init();
    set_sensor_id(Readid());
    NRF_LOG_INFO("id:%s", get_sensor_id());
    nrf_gpio_cfg(
    J11_OUT,
    NRF_GPIO_PIN_DIR_OUTPUT,
    NRF_GPIO_PIN_INPUT_DISCONNECT,
    NRF_GPIO_PIN_PULLUP,
    NRF_GPIO_PIN_S0H1,
    NRF_GPIO_PIN_NOSENSE);

    nrf_gpio_cfg_output(J9_OUT);
    nrf_gpio_pin_set(J11_OUT);
    nrf_gpio_pin_set(J9_OUT);
    nrf_gpio_cfg_input(J9_IN,NRF_GPIO_PIN_NOPULL);
    // nrf_gpio_cfg_input(J10_IN,NRF_GPIO_PIN_NOPULL);
    nrf_gpio_cfg(
    J11_IN,
    NRF_GPIO_PIN_DIR_INPUT,
    NRF_GPIO_PIN_INPUT_CONNECT,
    NRF_GPIO_PIN_NOPULL,
    NRF_GPIO_PIN_S0S1,
    NRF_GPIO_PIN_NOSENSE);

    NRF_LOG_INFO("num8 %d",nrf_gpio_pin_read(J8_IN));
    NRF_LOG_INFO("num9 %d",nrf_gpio_pin_read(J9_IN));
    NRF_LOG_INFO("num10 %d",nrf_gpio_pin_read(J10_IN));
    NRF_LOG_INFO("num11 %d",nrf_gpio_pin_read(J11_IN));
    NRF_LOG_INFO("num6 %d",nrf_gpio_pin_read(J6_IN));
    while(1);

Related