rs485 on imx28

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

rs485 on imx28

1,704 Views
jellesels
Contributor I

I' m trying to get a rs485 bus working on a custom imx28 design. The problem that I' m facing is where to release the rs-485 bus in the linux code. How do I know that the uart is done sending its data? Is there a specific functions that gets called?

I don't find any function in mxs-auart.c which gets called after the device is done writing when using the 'screen' command in usermode.

Is there a possibility to set the irq, to trigger when the tx-buffer is empty?

Tags (3)
0 Kudos
4 Replies

844 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jelle

i.MX28 does not support natively RS485, so in hardware it is not

possible to know when last bit was transmitted. In general, you can do

this in software checking bit TXFE register HW_UARTAPP_STAT

(Transmit FIFO empty), then wait for confidence time equal one symbol.

After that one can be sure that all bits are transmitted.

Probably you can try to realize this algorithm in mxs-auart.c,

currently there are no specific functions for this purpose.

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

844 Views
jellesels
Contributor I

Is there a posibility to trigger an irq (mxs_auart_irq_handle) when the tx buffer of the uart is empty? Or do I need to wait at the end of mxs_auart_tx_chars until TXFE?

844 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jelle,

I think better wait at the end of mxs_auart_tx_chars.

Best regards

chip

0 Kudos

844 Views
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. i.MX Community ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 Kudos