pad config for half duplex UART IMXRT1062

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

pad config for half duplex UART IMXRT1062

ソリューションへジャンプ
424件の閲覧回数
Hellspread41
Contributor II

hi everyone,

I'd like to initialise an half duplex UART communication for a project. I know we can do it with the LPUART  the LPUARTx_CTRL_Register (LOOPS, RSRC, TXDIR).

My question is which pad configuration (IOMUXc) should i take for the Tx PIN ? open drain with internal pull up (such as standard RS485 com)?

thx for answer.

0 件の賞賛
1 解決策
368件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Hellspread41 ,

   TXDIR bit is the direction, it just change the 1 wire TX and RX wire, it won't influence the bus load line.

   If you  set to the TX, then the pin is used as the UART_TX, you can send the UART data, you also can use the logic analyzer to test the bus, whether the data is sendout.

    When you set it to the RX, then external side send data to the bus, and the RT uart can receive it, you need to make sure the bus has the UART data, then check the receive code, whether it receives the data or not.

   You mention it can't work, do you check the register, whether the configuration is correct, and the bus data wave.

 

Wish it helps you!

Best Regards,

kerry

元の投稿で解決策を見る

3 返答(返信)
401件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Hellspread41 ,

  Do you need this function:

kerryzhou_0-1656293307991.png

It is the single-wire operation, for the TX pin, you should still use the TXD pin from the above description.

kerryzhou_1-1656293396774.png

The configuration should the normal TX configuration:

IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0U);

IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0x10B0U);

Wish it helps you!

Best Regards,

kerry

 

 

0 件の賞賛
378件の閲覧回数
Hellspread41
Contributor II

hi thx for the answer i try what you said to me but still doesn't work. My goal is to perform a communication with dynamixel servomotor which uses a half duplex uart protocol to communicate without any external hardware.

what is strange is when i set or reset the TXDIR bit i don't see the load line changing state so i don't really understand how work this single wire functionnality ?

0 件の賞賛
369件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Hellspread41 ,

   TXDIR bit is the direction, it just change the 1 wire TX and RX wire, it won't influence the bus load line.

   If you  set to the TX, then the pin is used as the UART_TX, you can send the UART data, you also can use the logic analyzer to test the bus, whether the data is sendout.

    When you set it to the RX, then external side send data to the bus, and the RT uart can receive it, you need to make sure the bus has the UART data, then check the receive code, whether it receives the data or not.

   You mention it can't work, do you check the register, whether the configuration is correct, and the bus data wave.

 

Wish it helps you!

Best Regards,

kerry