4 Replies Latest reply on Jun 30, 2016 10:55 PM by chintan

    UART Recive not work

    chintan

      Hello All,

       

      I am working on wiced SDK3.5.2. I  getting the problem with not receive the packet from the terminal. in this i transmit the data from he docklight terminal. in this when i send the data print on the docklight terminal ok.

      my code is:

       

      /*------------------------------------------------------------------------------------------------*/

          ring_buffer_init(&rx_buffer, rx_data, RX_BUFFER_SIZE );

       

       

          /* Initialise UART. A ring buffer is used to hold received characters */

          wiced_uart_init( STDIO_UART, &uart_config, &rx_buffer );

       

       

          /* Send a test string to the terminal */

          wiced_uart_transmit_bytes( STDIO_UART, TEST_STR, sizeof( TEST_STR ) - 1 );

       

       

          /* Wait for user input. If received, echo it back to the terminal */

          while ( wiced_uart_receive_bytes( STDIO_UART, &ch, 1 , WICED_NEVER_TIMEOUT ) == WICED_SUCCESS )

          {

             WPRINT_APP_INFO(("UART Rx\r\n"));

           }

      /*--------------------------------------------------------------------------------------------------------*/

      i execute code it does not enter in the while loop. check from the hardware site it is ok.

      i am stuck here help me...