pad config for half duplex UART IMXRT1062

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pad config for half duplex UART IMXRT1062

Jump to solution
1,846 Views
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 Kudos
Reply
1 Solution
1,790 Views
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

View solution in original post

3 Replies
1,823 Views
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 Kudos
Reply
1,800 Views
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 Kudos
Reply
1,791 Views
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