How to verify i.mx287 board RS-485 line drivers are turned ON and OFF?

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

How to verify i.mx287 board RS-485 line drivers are turned ON and OFF?

Jump to solution
1,712 Views
kvrivishvilin9
Contributor II

Dear tech support and forum readers,

The i.mx287 board at my behalf features two RS-232/RS485/RS422 ports X16(Port1 COM3) and X17(Port2 COM4) which are moded with means of registry keys: [HKEY_LOCAL_MACHINE\Drivers/BuiltIn\COM3]  "Mode"=dword:0 . Thus 0 - Off, 1 -RS232, 2-RS485,3-RS422. At initial it is 0. Since the app I am on fails to establish serial communication with wired to COM3(X16) (pins 5 - A and 6 B) ICP DAS M7051D module, error code 129.

Since RS485 layer is handled by i.mx287 hardware, could anyone kindly direct me to craft, how to verify RS-485 line drivers are turned ON and OFF? How the i.mx287 board supports the use of RTS signal?

Faithfully,

N. Kv.

 

0 Kudos
1 Solution
1,686 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi  @kvrivishvilin9 

I hope you are doing well.
 
One can refer to 30.4 Programmable Registers in i.MX28 Applications Processor Reference Manual to understand the behavior of rts-cts signals on application uart.
 
Additionally, One can refer to Chapter 17 - Serial Driver in Windows Embedded CE 6.0 Reference Manual at i.MX28 Windows Embedded CE 6.0 Documentation Bundle
 
Thanks & Regards,
Sanket Parekh

View solution in original post

0 Kudos
9 Replies
1,687 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi  @kvrivishvilin9 

I hope you are doing well.
 
One can refer to 30.4 Programmable Registers in i.MX28 Applications Processor Reference Manual to understand the behavior of rts-cts signals on application uart.
 
Additionally, One can refer to Chapter 17 - Serial Driver in Windows Embedded CE 6.0 Reference Manual at i.MX28 Windows Embedded CE 6.0 Documentation Bundle
 
Thanks & Regards,
Sanket Parekh
0 Kudos
1,649 Views
kvrivishvilin9
Contributor II

Dear gentlemen,

My concern is the i.mx287 serial hardware while transmitting the receiver must be gated off. How can I verify, does the serial and the driver interfacing to hardware turn the receiver OFF while transmitting?

The dll I am on, demands serial hardware to accomlish as follows(if not then it is incompatible):

"FieldTalk supports RS-485 hardware which uses RTS to switch between transmit and receive operation of the transceiver. It also support RS-485 which switches automatically between receive and transmit mode, but requires echo cancellation. Which means either transmit or receive. While transmitting, the receiver must be turned off by the hardware."

Among MCIMX28RM page 2112 nor Chapter 17 of the EVK imx28... you kindly directed me, I cannot obtain info on the above mentioned.

Could anyone kindly direct me to the reading or schematic diagram to shed some light onto the problem?

Faithfully,

N. Kv.

0 Kudos
1,635 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @kvrivishvilin9 

I hope you are doing well.
 
One can refer to 30.4.3 UART Control Register (HW_UARTAPP_CTRL2) in i.MX28 Applications Processor Reference Manual.
where,RTS[11],RTSEN[14] and CTSEN[15] bits are used to enable and configure flow control.
 
Please refer to Chapter 17 Serial Driver in Windows Embedded CE 6.0 Reference Manual
17.6 Serial Driver API Reference contains information on various functions related to RTS (HWClearRTS, HWSetRTS, etc..)
 
Thanks &  Regards,
Sanket Parekh

1,626 Views
kvrivishvilin9
Contributor II

Dear Sanketh,

Your kind directives are precise.

On page 2118 of i.mx287 RM I found the table of bits for UART control register.

Since my objective is:

1. FIND OUT which bit of UART control register is responsible for gate off receiver while transmitting;

2. FIND OUT the 'tool' upon which the UART control register bits values could be viewed, and modified;

3. VERIFY with 'tool': While transmitting, the receiver must be turned off by the hardware.

2. If the receiver is not turned off while transmitting MODIFY the value of corresponding bit to ensure 3.

Can you kindly suppose which one of HW_UARTAPP_CTRL2 32 bit register is likely responsible for "the receiver is not turned off while transmitting"?

If so, how(what kind of tool software utility etc) could leverage view of bit value,  and if needed modify the value of bit on the i.mx287 board? 

N. Kv.

 

 

0 Kudos
1,551 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @kvrivishvilin9 

I hope you are doing well.
 
1. FIND OUT which bit of UART control register is responsible for gate off receiver while transmitting;
[Ans]: RTSEN bit is responsible for RTS flow control to gate of the receiver.
          If this bit is set to 1, RTS hardware flow control is enabled. Data is only requested when there is space in the receive FIFO for it to be received. 
         The FIFO space is controlled by RXIFLSEL value.
        
         One can control RTS output using software using RTS[11 bit]
         The software can manually control the nUARTRTS pin through this bit when RTSEN = 0.
         This bit is the complement of the UART request to send (nUARTRTS) modem status output. That is, when the bit is programmed to a 1, the output is 0.

          Please make sure RTS CTS pin connections are correct.
 
2. FIND OUT the 'tool' upon which the UART control register bits values could be viewed, and modified;
[Ans]: Information regarding such tool for windows is not available

3. VERIFY with 'tool': While transmitting, the receiver must be turned off by the hardware.
[Ans]: Information regarding such tool for windows is not available

Can you kindly suppose which one of HW_UARTAPP_CTRL2 32 bit register is likely responsible for "the receiver is not turned off while transmitting"?
[Ans]: RTS output is by default controlled using hardware(RTS signal will be asserted when there is space in the receive FIFO ) when RTSEN is set.

If so, how(what kind of tool software utility etc) could leverage view of bit value,  and if needed modify the value of bit on the i.mx287 board? 
=> One can refer to 17.6.1 Serial PDD Functions in  Windows Embedded CE 6.0 Reference Manual where HWClearRTS and HWSetRTS functions are available.
      Please refer to Serial Port Driver PDD Functions
 
Thanks & Regards,
Sanket Parekh

1,548 Views
kvrivishvilin9
Contributor II
Dear Sanket,
I much appreciate the comprehensive directives you kindly provided!
0 Kudos
1,496 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @kvrivishvilin9 ,

 
I hope you are doing well.
 
Can I mark this case as close if there are not any further questions?
 
Thanks & Regards,
Sanket Parekh
0 Kudos
1,464 Views
kvrivishvilin9
Contributor II

yes, sure

0 Kudos
1,658 Views
kvrivishvilin9
Contributor II

Much appreciate of you dear Sanket!

I'll give it a good shot!

Faithfully,

N. Kv.

0 Kudos