Single-wire UART on KL26Z ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Single-wire UART on KL26Z ?

ソリューションへジャンプ
1,396件の閲覧回数
geoffs
Contributor I

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 ???

ラベル(2)
0 件の賞賛
返信
1 解決策
1,021件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Geoff,

Please try to use the PE component shown as below:

1.png

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,022件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Geoff,

Please try to use the PE component shown as below:

1.png

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,021件の閲覧回数
geoffs
Contributor I

Thanks Kan.  Am I correct in thinking that using the Init_UART peripheral initialization component means I can not then use a higher-level Processor Expert component (eg Serial_LDD or AsynchroSerial) ?

0 件の賞賛
返信