pad config for half duplex UART IMXRT1062

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

pad config for half duplex UART IMXRT1062

跳至解决方案
1,849 次查看
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 解答
1,793 次查看
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 回复数
1,826 次查看
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 项奖励
回复
1,803 次查看
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 项奖励
回复
1,794 次查看
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