I have a custom board. It has its Tx and Rx combined into one wire bus. I am able to transmit data on the bus. But I am unable to receive any data on the board. This is because of circuit design.
In order to receive data I thought of disconnection the Tx pin when I am done transmitting the data. I did it by adding some code in `$SDK_ROOT/modules/nrfx/hal/nrf_uart.h`.
__STATIC_INLINE void nrf_uart_tx_pins_disconnect(NRF_UART_Type * p_reg) { #if defined(UART_PSEL_TXD_CONNECT_Pos) p_reg->PSEL.TXD = NRF_UART_PSEL_DISCONNECTED; #else p_reg->PSELTXD = NRF_UART_PSEL_DISCONNECTED; #endif }
I thought of calling this function when I am done transmitting and want to receive data. This is works partially.
When I transmit and disconnect tx pin then I do not receive any data. But If I do not send any data and directly try to receive it works.
I want both way communication.
Is there anything to turn off Tx completely and just wait for receive, and when I want to transmit I enable the Tx and starts sending.