How to disable Rx / Tx Interrupts on 52259 UARTs?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to disable Rx / Tx Interrupts on 52259 UARTs?

605件の閲覧回数
ZaphyB
Contributor I

I was wondering if MQX supplies any method of disabling/enabling Rx and Tx interrupts on any of its UARTS?  Or do I have to write my own enable and disable routines to access the UART register directly (UIMR)?

 

We have a circuit that transmits out UART1 to a number of devices that hang off that port (only addressing one device at a time).  We expect a response back from the device being addressed.  The physical Tx and Rx wires that go from UART1 to the devices loop back into UART2.  If a wire breaks between devices, we can detect that and begin to transmit out UART1 to the devices before the wire break.  Then we can transmit out UART2 to the devices after the break.  This ensures we don't lose communication to all devices after the wire break.

 

The problem is that we cannot allow the transmitting to go out both UARTS at the same time because they are both connected to the same devices.  So we must put UART2 in "receive" mode (with other hardware circuits - thus preventing it from transmitting).  But then if we transmit out UART1, we end up receiving that transmission in UART2, which we want to AVOID.

 

The simplest way to avoid receiving this data echo is turn OFF the RX Interrupt for UART2 when transmitting out UART1. 

 

Any simple way to do this?

 

Thank you,

 

Bryan

ラベル(1)
0 件の賞賛
返信
1 返信

346件の閲覧回数
TomE
Specialist II

Ask in the MQX forums for questions on that OS.

 

The answer from this (hardware) forum would be "write to the UART register", but that could break the OS.

 

Tom

 

0 件の賞賛
返信