AnsweredAssumed Answered

Single-wire UART on KL26Z ?

Question asked by geoffs on Sep 25, 2014
Latest reply on Sep 26, 2014 by geoffs

I'm trying to use single-wire half-duplex UART mode on a FRDM-KL26Z board.  The KL16Z reference manual indicates there are a few relevant fields in the UART control register 1 to enable this functionality:

LOOPS Loop Mode Select
Selects between loop back modes and normal 2-pin full-duplex modes. When LOOPS is set, the transmitter output is internally connected to the receiver input.
0 = Normal operation - UART_RX and UART_TX use separate pins.
1 = Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input. (See RSRC bit.) UART_RX pin is not used by UART.


RSRC Receiver Source Select
This bit has no meaning or effect unless the LOOPS bit is set to 1. When LOOPS is set, the receiver input is internally connected to the UART_TX pin and RSRC determines whether this connection is also
connected to the transmitter output.
0 = Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the UART does not use the UART_RX pins.
1 = Single-wire UART mode where the UART_TX pin is connected to the transmitter output and receiver input.


I'd like to use a single-wire on the TxD pin for both sending and receiving data.  I think this corresponds to LOOPS = 1 and RSRC = 1.


In Processor Expert, I've added a Serial_LDD from the component library to my project.  The only setting which I can see which relates to single-wire mode is "Loop mode" which has four options:

  • Normal
  • Automatic Echo
  • Local loop-back
  • Remote loop-back


Out of these, only Normal and Local Loop-back are available.  If I try to select the other two, PE reports that "The device doesn't support the selected loop mode".


It's not really clear how these Loop Mode options relate to the register settings.  Is "Normal" equivalent to LOOPS = 0 and RSRC = 0, with Local Loop-back equivalent to LOOPS = 1 and RSRC = 0 ?


If so, is there a way (other than writing to registers directly and not using PE) to enable LOOPS = 1 and RSRC = 1 ???