USBUART RTS/CTS on PSoC 5LP 050

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello everyone,

   

I am new to Cypress world so I don't know whether my question below has been asked somewhere yet though I did search this forum before opening this topic.

   

I am finding a way for a linux host to communicate to a PSoC 5LP 050 development kit via USBUART. When the host sends a RTS (Request To Send) to the development board, it expects a CTS (Clear To Send) signal sent back from the board. From the PSoC board, I am able to know when the line control changes and check whether there is a RTS from the host or not. But I could not find any way to send back to the host a CTS.

   

Any suggestion, sample, idea, etc. from you guys would be highly appreciated.

   

Best
Tony

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the fascinating world of PSoCs!

   

USBUART does not have got CTS and RTS - signals. Instead it needs a (standard) driver which emulates a serial interface using the data coming from the USB. This driver is availlable for windows and for linux, just give google a chance to find it for you.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

Thanks for your reply.

   

Actually, I know the driver and I can get it works with the board under the device names as ttyACM0 or ttyACM1. The board can receive data if the control line state RTS is off. If the RTS is on, the board cannot receive any data from the host. I guess when the host sends an RTS to the board, it waits for a CTS from the board before beginning to send data. I can check if line control changes happen in the for (;;) loop in main() via USBUART_IsLineChanged()

   

Up to now, what I can do is before powering on the host, I need to unplug the USB cable and plug it back on after the BIOS initialization (or during the OS is being loaded.) In this case, the RTS is off and the board can receive data from the host. If I if the USB cable plugged when powering on, the RTS is always on. I don't know what the BIOS do to the USB interface, but this might be another issue.

   

Best Regards,
Tony
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

RTS is used for half duplex only. Can you make sure that your host is defined for full duplex?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Sorry for late response.

   

The host supports both full-duplex and half-duplex modes. It looks like the host tries to switch to half-duplex after it failed with full-duplex.

   

My investigation leads me to somewhere that makes me think that RTS should not be an issue. The issue could rely on USB bus initialized by BIOS because if I plug the USB cable during the OS loading it would be fine. However, I have other devices that communicate well with the host even the USB cable is plugged before the host is powered on. I still don't know what wrong with the PSoC board or what if I did anything wrong.

   

Here are the USBUART configuration:

   

==============================
Device Descriptor:
    Device Class: CDC
    Device Subclass: No subclass
    Device Protocol: 0
    Configuration Descriptor:
        Max Power (mA): 100
        Device Power: Self Powered
        Remote Wakeup: Disabled

   


CDC Descriptor:
    CDC Interface 1:
        Communication Alternate Setting 0
            Header
                bcdACD 272
                Abstract Control Management
                    bmCapabilities 2
                Union
                    bControlInterface 0
                    bSubordinateInterface Byte[] Array
                        [0] 1
                Call Management
                    bmCapabilities 0
                    bDataInterface 1
                Endpoint Descriptor
                    EndpointNum EP1
                    Direction IN
                    TransferType INT
                    Interval 10
                    Max Packet Size 8
    CDC Interface 2:
        Data Alternate Setting 0
            Endpoint Descriptor
                EndpointNum EP2
                Direction IN
                TransferType BULK
                Interval 10
                Max Packet Size 64
            Endpoint Descriptor
                EndpointNum EP3
                Direction OUT
                TransferType BULK
                Interval 10
                Max Packet Size 64
==============================

   

Thanks
Tony
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Consider filing a technical case. To do so, at topof this page Support & Community -> Technical Support -> Create a MyCase

   

 

   

Bob

0 Likes