Is it possible to use internal pull-up/pull-down resistors with I2C, UART, etc?

I need pull-up/pull-down resistors on my UART and I2C lines and am wondering if I can enable the pull-up/pull-down resistors instead.  If this possible?  I can see how to configure them for GPIO, but I'm wondering if I use the same approach if it would interfere with the UART/I2C drivers.  Thanks

Other info:
nRF52480

nRF Connect SDK v2.1.0

Parents Reply Children
  • Hi,

     

    You are re-using the same names that are originally defined in the board itself.

    To override that, you need to follow the exact same layout in terms of groups etc.

     

    It is usually easier to define your own pinctrl instance (you can name them whatever you want):

    &pinctrl {
    	new_pinctrl_default: new_pinctrl_default {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
    				<NRF_PSEL(TWIM_SCL, 0, 27)>;
    		};
    	};
    
    	new_pinctrl_sleep: new_pinctrl_sleep {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
    				<NRF_PSEL(TWIM_SCL, 0, 27)>;
    			low-power-enable;
    		};
    	};    
    };
    
    &i2c0 {
        ...
    	pinctrl-0 = <&new_pinctrl_default>;
    	pinctrl-1 = <&new_pinctrl_sleep>;
    	pinctrl-names = "default", "sleep";
    };

     

    Here you can add your own configurations.

     

    Kind regards,

    Håkon

Related