How to configure UART pins?

I would like to configure the TXD, RXD, RTS and CTS pins for the UART on the nRF52832.

I saw that the uart0 node (nordic,nrf-uarte) has attributes like rts-pin but they carry a warning:

IMPORTANT: This option will only be used if the new pin control driver is not enabled. It will be deprecated in the future.

So should I use something else?

Parents
  • Hi Andre,
    Based on our development experience, you can try the followings:

    Referring to the configuration in sdk\examples\ble_peripheral\ble_app_uart, pls change app_uart_comm_params_t to the following:

     app_uart_comm_params_t const comm_params = {
            .rx_pin_no    = RX_PIN_NUMBER,
            .tx_pin_no    = TX_PIN_NUMBER,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_ENABLED,//APP_UART_FLOW_CONTROL_DISABLED APP_UART_FLOW_CONTROL_ENABLED
            .use_parity   = false,
            .baud_rate    = bps
        };

    If possible, it is better to share the warning info.

    RF-star Sunny

Reply
  • Hi Andre,
    Based on our development experience, you can try the followings:

    Referring to the configuration in sdk\examples\ble_peripheral\ble_app_uart, pls change app_uart_comm_params_t to the following:

     app_uart_comm_params_t const comm_params = {
            .rx_pin_no    = RX_PIN_NUMBER,
            .tx_pin_no    = TX_PIN_NUMBER,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_ENABLED,//APP_UART_FLOW_CONTROL_DISABLED APP_UART_FLOW_CONTROL_ENABLED
            .use_parity   = false,
            .baud_rate    = bps
        };

    If possible, it is better to share the warning info.

    RF-star Sunny

Children
No Data
Related