Drive Strength of UART pins

 I need to use High Drive Strength of pin used as TX of UART. How may it be done using zephyr ?

Parents Reply
  • Hi.. I need same again but without using pinctrl. I need to use following style to set drive strentgh.

    &uart2{
        current-speed = < 115200 >;
        tx-pin = <2>;
        rx-pin = <3>;
        status = "okay";
    };
    How , may it be done ?
    Meanwhile, I temporarily added following  function and called it in uart_init() function by manually writing Pin Number as below:
    NRF_STATIC_INLINE void nrf_gpio_cfg_output_strong(uint32_t pin_number)
    {
        nrf_gpio_cfg(
            pin_number,
            NRF_GPIO_PIN_DIR_OUTPUT,
            NRF_GPIO_PIN_INPUT_DISCONNECT,
            NRF_GPIO_PIN_NOPULL,
            NRF_GPIO_PIN_H0H1,
            NRF_GPIO_PIN_NOSENSE);
    }
    void uart_init()
    {
      ... 
      nrf_gpio_cfg_output_strong(2); // used Tx pin of UART2
      ......
    }
    Though above method worked very well, but is not recommendable, because Pin Number got fixed. How to get Pin Number as set in overlay file instead of fixed, I don't know ?
Children
No Data
Related