UART half-duplex

Hello, I am working on nRF52840 and using nRF Connect SDK v2.9.0.

I want to know how I can configure the UART to be half-duplex tx or half-duplex rx. 

I checked the APIs in zephyr/drivers/uart.h, but I didn`t find any function that can do this

Parents
  • Hi,

    By Half-duplex, do you mean to use a single pin for both TX and RX, and switch between transmitting and receiving on that one pin?

    The UART peripheral in nRF52840 does not support this directly. However, any GPIOs can be assigned to any serial peripheral pins, so it is technically possible to reconfigure the peripheral during runtime and alternate between connecting the GPIO to RX or TX pin of the UART. You can reference the Dynamic Pin Control sample to learn how to change UART pins during runtime\from application.

    Best regards,
    Jørgen

Reply
  • Hi,

    By Half-duplex, do you mean to use a single pin for both TX and RX, and switch between transmitting and receiving on that one pin?

    The UART peripheral in nRF52840 does not support this directly. However, any GPIOs can be assigned to any serial peripheral pins, so it is technically possible to reconfigure the peripheral during runtime and alternate between connecting the GPIO to RX or TX pin of the UART. You can reference the Dynamic Pin Control sample to learn how to change UART pins during runtime\from application.

    Best regards,
    Jørgen

Children
Related