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

External Pull ups I2C

Hello,

I'm using nrf52840 and i would like to ask if it possible to use the I2C bus without external pullups. I mean, i would like to avoid using external pullups

is there any configuration of the I2C bus in which the external pullpus can be avoided?

Thank you in advance.

Parents Reply
  • If you're using TWI driver from SDK, it configures internal pull-ups by default. To configure manually, add these lines:

    nrf_gpio_cfg(scl_pin, NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_CONNECT, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE);
    nrf_gpio_cfg(sda_pin, NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_CONNECT, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE);
    

Children
Related