2 Replies Latest reply on Aug 12, 2019 3:44 AM by ViMD_4181096

    UART Receive




      May I know the syntax or get the cypress documentation for receiving using UART cable. I am using UART for transmitting and receiving the character. I have tried using this syntax Cy_SCB_UART_GetArray(UART_HW,SerialBuffer,1); but failed to receive the data. Am able to read the output of the task but not able to write it to the PSOC6. Trying to send data from PC to PSOC6 using UART cable. May I get a suggestion as which syntax to be used to receive the data in PSOC which is sent by the PC. 


      Thank you in advance,


      Warm regards,
      Vivekraj MD

        • 1. Re: UART Receive

          If you are using PSoC Creator, the Peripheral Driver Library (PDL) document can be accessed from the "Help" menu item as follows.


          The the "Serial Communication Block (SCB)" at the "API Reference" chapter contains the description about the Cy_SCB_UART_GetArray() function.


          The function returns the number of received bytes without waiting for a character received.  This means that you must wait for the API function returns 1 instead of 0 to get a character in a loop like while() statement.


          Please consider to use the API function Cy_SCB_UART_GetArrayBlocking() not to make a loop.

          1 of 1 people found this helpful
          • 2. Re: UART Receive

            Thank you so much! I was stuck with Cy_SCB_UART_GetArray() since a few days and I wasn't receiving the exact output which I was sending. Your suggestion of while() loop helped me out and establish the connection. Am grateful for your help.


            Warm regards,

            Vivekraj MD