9 Replies Latest reply on Jan 7, 2020 3:35 PM by GlJe_1688511

    flow control of USBUART

    GlJe_1688511

      Hello.

       

      I use the Flow control with a USBUART.

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

       

      Do you know the method to receive the control data?

       

      Thanks and Best regards.

      Glenn.

        • 1. Re: flow control of USBUART
          RodolfoG_11

          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.

          • 2. Re: flow control of USBUART
            GlJe_1688511

            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.

            • 3. Re: flow control of USBUART
              RodolfoG_11

              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.

               

              • 4. Re: flow control of USBUART
                GlJe_1688511

                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.

                • 5. Re: flow control of USBUART
                  RodolfoG_11

                  Which value is not changing from 0x03?

                   

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

                  • 6. Re: flow control of USBUART
                    GlJe_1688511

                    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.

                    • 7. Re: flow control of USBUART
                      RodolfoG_11

                      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?

                      • 8. Re: flow control of USBUART
                        GlJe_1688511

                        I tested it by teraterm and putty.

                         

                        Are there compatible terminal program?

                         

                        Glenn.

                        • 9. Re: flow control of USBUART
                          GlJe_1688511

                          Hello.

                           

                          I tested it other terminal program.

                          The program works well.

                           

                          I thinks that the problem is a matter of compatibility.

                           

                          Thanks.

                          Glenn.