i.MX93 RS485 half duplex without Rx enable gpio

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

i.MX93 RS485 half duplex without Rx enable gpio

432 Views
phil331
Contributor II

Hi,

I'm using the i.MX93 with RS485 on Linux, but the hardware doesn't have a separate gpio for controlling the transceiver's receive enable pin, so the hardware echos anything that is transmitted.

On a Raspberry Pi, the pl011 driver handles this by disabling the uart's receive enable when transmitting and the SER_RS485_RX_DURING_TX flag is not set.

I tried to implement the same for the lpuart, but it looks like lpuart32_tx_empty() returns non-zero whilst there is still data in the fifo.

Any ideas?

Thanks, Phil

0 Kudos
Reply
1 Reply

410 Views
joanxie
NXP TechSupport
NXP TechSupport

I've mailed to you pls check

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2336399%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX93%20RS485%20half%20duplex%20without%20Rx%20enable%20gpio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336399%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI'm%20using%20the%20i.MX93%20with%20RS485%20on%20Linux%2C%20but%20the%20hardware%20doesn't%20have%20a%20separate%20gpio%20for%20controlling%20the%20transceiver's%20receive%20enable%20pin%2C%20so%20the%20hardware%20echos%20anything%20that%20is%20transmitted.%3C%2FP%3E%3CP%3EOn%20a%20Raspberry%20Pi%2C%20the%20pl011%20driver%20handles%20this%20by%20disabling%20the%20uart's%20receive%20enable%20when%20transmitting%20and%20the%20SER_RS485_RX_DURING_TX%20flag%20is%20not%20set.%3C%2FP%3E%3CP%3EI%20tried%20to%20implement%20the%20same%20for%20the%20lpuart%2C%20but%20it%20looks%20like%20lpuart32_tx_empty()%20returns%20non-zero%20whilst%20there%20is%20still%20data%20in%20the%20fifo.%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3CP%3EThanks%2C%20Phil%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX93%20RS485%20half%20duplex%20without%20Rx%20enable%20gpio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI've%20mailed%20to%20you%20pls%20check%3C%2FP%3E%3C%2FLINGO-BODY%3E