This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UARTE in semi-duplex mode

Hi all,

I would like to have a semi-duplex communication link over one pin (+GND). The nRF will act as a pure slave device which responds to, and acknowledges, commands from a "master".Thus:

1. I set UARTE in RX mode.  PSEL.RXD is set to the (shared) pin.

2. A command is successfully received from the master.

3.  PSEL.RXD = 0xffffffff, PSEL.TXD s set to the (shared) pin.

4. A reply is successfully sent to the master.

5. Back to 1

The problem is that this only works two times. Then I get an "overrun" error. I've tried "EVERYTHING" to prevent this from happening; delays in various places, different sequences of pin role swithing (when the UARTE module is disabled) and trying to run  STOPRX (according to the 35.4 UARTE-Reception section of the device datasheet) in order to properly empty the RX buffer.

Any ideas ? Please help !

Cheers

Eric

Parents
  • A disconnected input pin defaults to '0' if I recall, which means you can't disconnect without generating some sort of framing error. Two options to try:

    • try setting the Tx/Rx pin to always Input Connected with pull-up enabled, even when transmitting
    • try setting the Rx to another (spare) pin which has pull-up enabled which is always an input

    I think the first might work as I seem to remember that the input pull-up applies to the input even when in output mode, assuming the datasheet drawing is correct; but no, I think the drawing is incorrect, the pull-up applies to the physical pin not the input buffer as shown, so the first option won't work.

  • Hi,

    Thanks for reaching out. Yes, using separate pins for RX & TX and connecting them externally is certainly an option. However, I'd rather avoid that, if possible, because I/O is already scarce for my application. 

    Enabling pull-up, in RX and/or TX mode, does affect whether you get a framing error or not. But it does not solve the overrun proplem.

    \Eric

Reply Children
No Data
Related