Trigger STARTRX task before enabling UART on nRF51

Hi

We are using the nRF51822 with the SoftDevice S130 V2.0.1.

The nRF51 communicates with another controller via UART with a special handshake-mechanism directly on the TX and RX signals. Therefore, it was not possible to use the UART driver from the nRF5 SDK and we have implemented our own UART driver.

The nRF51 signals that it is ready to communicate by pulling its TX signal to HIGH by enabling the UART peripheral.
Directly afterwards, the STARTRX and STARTTX tasks are triggered. Unfortunately, this leads to a small window between the rising edge of the TX signal and enabling the receiver where no frame can be received.

Therefore, my question is if it is allowed to trigger the STARTRX and STARTTX tasks, before the UART peripheral is enabled?

NRF_UART0->TASKS_STARTRX = 1;
NRF_UART0->TASKS_STARTTX = 1;
NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos;


I have tried this workaround and t seems to work so far, but I wanted to ensure that there are no side-effects.

Many thanks in advance.

Best regards,
Remo

Related