Read 16 bits from the Uart

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi !!


I'm working with the BCM43362 and I send to another board 4 Bytes, in the 4th Byte I receive successively 4 Bytes as a response.

The problem is that I can only read the first Byte(because i receive only one IRq) and I don't find a function to access to the Rx Buffer. without checking the IRq
.

I'm actually using the function wiced_result_t wiced_uart_transmit_bytes( wiced_uart_t uart, const void* data, uint32_t size ) to transmits data and wiced_uart_receive_bytes( wiced_uart_t uart, void* data, uint32_t size, uint32_t timeout ).

Thanks for the help ^_^

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

Use a thread to receive data

and in that add

while ( wiced_uart_receive_bytes( WICED_UART_1, &read, 1, WICED_NEVER_TIMEOUT ) == WICED_SUCCESS )

  {

       Buffer[Bufcount++]=(unsigned char)read;
      //add  logic for resetting Bufcount  and other things as per your requirement.

  }


Thanks and Regards,
Sooraj

View solution in original post

0 Likes
3 Replies