11 Replies Latest reply on Jul 12, 2019 12:09 AM by AnkitaS_51

    USBUART can not receive data from HOST(PC)

    muto_1207481

      Like a Hyper Terminal terminal as COM test software on HOST.

       

      Data receve from the USBUART is work well.(check with terminal software)

        ・The sample code is as follows

       if(CHP.TUACHON != CHP.TUACH_BK) 

       {

        CHP.TUACH_BK = CHP.TUACHON;

        if(CHP.TUACHON)

          USB_TxData("T-ON");

        else

          USB_TxData("T-OFF");

        }

       }

       

      void USB_TxData(char *Str)

      {

      while(USBUART_CDCIsReady() == 0);

       

      USBUART_PutString(Str);

      }

      ---------------------------------------------------------

      Received data  chack routine is as follows

      ---------------------------------------------------------

      while(1) {

         if(USBUART_DataIsReady() > 0)

              {

            USB_TxData("Get data=");

            USBUART_GetAll(&buff[0]);

            }

      }

       

      The problem is that this USBUART_DataIsReady () functionIt does not return a value of greater than 0.

       

      I look forward to good advice.  Thank you