3 Replies Latest reply on Aug 4, 2020 10:33 PM by EktaN_26

    Regarding PSoC5LP USBUART.

    YuMa_1534086

      1. USBUARTの受信バッファは

      USBUART receive buffer is,

       

      (a) 何Byte有るでしょうか。

         How many bytes is it?

       

      (b) そのバッファー数は、マクロか何かで知ることか出来るでしょか。

          Is it possible to know the number of buffers with a macro or something?

       

      (c) そのバッファー数を変える事可能でしょうか。

         Is it possible to change the number of buffers?

       

       

      2. USBUARTは受信で割り込みを発生できるでしょうか。

        Can USBUART generate an interrupt on receive?

       

       

      Best Regards.

        • 1. Re: Regarding PSoC5LP USBUART.
          EktaN_26

          Hello YuMa_1534086

           

          1. a) and b) The USBUART is nothing but a USB component behaving as a UART. The USB endpoints are configured as BULK Endpoints with a maximum size of 64 bytes. The Host will be sending the data in the Bulk IN endpoint and the PSoC device can send data to the Host from Bulk Out Endpoint. Can you please confirm if this is what you were asking by number of bytes of USBUART receive buffer.

           

          1 c) Can you please clarify by number of buffers do you mean the USB endpoints or do you mean a software buffer?

           

          2. Yes it is possible to generate interrupt on receive. Each endpoint of the USB has a associated ISR in the USBUART.episr file in the generated code. These interrupt sources trigger whenever the host completes communication over the corresponding data endpoint. They are available only when an endpoint is utilized by the device.

           

          Please refer to the attached document for more details handling the interrupts associated with the USBUART (USBFS) component.

           

          Best Regards

          Ekta

          • 2. Re: Regarding PSoC5LP USBUART.
            YuMa_1534086

            Ekta-san.

             

            Thank you for your response.

             

            1 c) Can you please clarify by number of buffers do you mean the USB endpoints or do you mean a software buffer?

            >>Customer’s question is about a software buffer.

               They would like to know if the buffer size of USBUART software buffer can be changed.

             

            Best Regards.

            Yutaka Matsubara

            • 3. Re: Regarding PSoC5LP USBUART.
              EktaN_26

              Hello Yutaka-San,

               

              I guess by software buffer the customer means the user defined buffer in the application which is used to store the incoming (or outgoing) data to (or from) USB Endpoint. Yes, it is possible to change the the size of the buffer.

               

              As you can see in the image below:

               

               

              In the USBUART configuration box > under the Endpoint descriptor , the Max Packet Size denotes the size of the USBUART receive or transmit buffer and can be set by the user. It is limited to 64 bytes in case of BULK endpoint as mentioned in the previous comment.

               

              The data received in the OUT (receive) Endpoint by the USB device can then be transmitted to the a user defined software buffer using the USBUART_GetAll(uint8* pData)  This function gets all bytes of received data from the input buffer and places them into a specified data array

              Here, pData: Pointer to the data array where data will be placed

               

              The size of this software buffer (data array) is user defined.

               

              Please let me know if you have further queries related to this issue.

               

              Best Regards

              Ekta