flow control of USBUART

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

cross mob
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

Hello.

I use the Flow control with a USBUART.

pastedImage_0.png

The option is changed, but the USB data of a PSoC5LP doesn't change.

pastedImage_1.png

Do you know the method to receive the control data?

Thanks and Best regards.

Glenn.

0 Likes
1 Solution

Reading in the comments of the GetLineControl() function.

*  *Note* Some terminal emulation programs do not properly handle these

*  control signals. They update information about DTR and RTS state only

*  when the RTS signal changes the state.

Can you try other tools to see if anything changes?

View solution in original post

0 Likes
9 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

There is no flow control implemented in the USBUART component. It would only make sense to use this if you are bridging from USB to a physical UART port. In this case, you might change the flow control of the UART component.

0 Likes
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

Hello.

I am using follow firmware.

     PSoC 5LP USB Dual COM Port

I wish to receive the flow control data and to set the flow control of the UART components.

Thanks and Best regards.

Glenn.

0 Likes

In this case, you can use the function USB_IsLineChanged() to know when the control settings change and apply it to the UART components.

You will need to enable the Hardware Flow Control in the UART components by default. You can use the following technique to enable/disable hardware control.

pastedImage_0.png

0 Likes
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

I tried to read the state by USB_GetLineControl();

==========================================

state = USB_IsLineChanged();              /* Check for Line settings changed */

        if(state != 0u)

        { 

            if(state & USB_LINE_CODING_CHANGED)   /* Show new settings */

            {

            }

            if(state & USB_LINE_CONTROL_CHANGED)  /* Show new settings */

            {

                /*

                #define USB_bmRequestTypeReg      USB_EP0_DR_BASE.epData[0u]

                #define USB_bRequestReg           USB_EP0_DR_BASE.epData[1u]

                #define USB_wValueLoReg           USB_EP0_DR_BASE.epData[2u]

                #define USB_wValueHiReg           USB_EP0_DR_BASE.epData[3u]

                #define USB_wIndexLoReg           USB_EP0_DR_BASE.epData[4u]

                #define USB_wIndexHiReg           USB_EP0_DR_BASE.epData[5u]

                #define USB_wLengthLoReg          USB_EP0_DR_BASE.epData[6u]

                #define USB_wLengthHiReg          USB_EP0_DR_BASE.epData[7u]

                */

                test.epData[0] = USB_bmRequestTypeReg;

                test.epData[1] = USB_bRequestReg;

                test.epData[2] = USB_wValueLoReg;

                test.epData[3] = USB_wValueHiReg;

                test.epData[4] = USB_wIndexLoReg;

                test.epData[5] = USB_wIndexHiReg;

                test.epData[6] = USB_wLengthLoReg;

                test.epData[7] = USB_wLengthHiReg;

               

                state = USB_GetLineControl();

            }

        }

=========================================

But, the value isn't change from 0x03.

Thanks and Best regards.

Glenn.

0 Likes

Which value is not changing from 0x03?

If you run in debug mode, it never executes the DispatchCDCClassRqst()?

0 Likes
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

The return value of USB_GetLineControl().

I tested the value in debug mode.

I will test it in non-debug mode.

Thanks and Best regards.

Glenn.

0 Likes

Reading in the comments of the GetLineControl() function.

*  *Note* Some terminal emulation programs do not properly handle these

*  control signals. They update information about DTR and RTS state only

*  when the RTS signal changes the state.

Can you try other tools to see if anything changes?

0 Likes
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

I tested it by teraterm and putty.

Are there compatible terminal program?

Glenn.

0 Likes
GlJe_1688511
Level 4
Level 4
Distributor
100 sign-ins 10 likes given 50 questions asked

Hello.

I tested it other terminal program.

The program works well.

I thinks that the problem is a matter of compatibility.

Thanks.

Glenn.

0 Likes