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.
Solved! Go to Solution.
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
Hi @Hellspread41 ,
Do you need this function:
It is the single-wire operation, for the TX pin, you should still use the TXD pin from the above description.
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
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 ?
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