Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I try to communicate 943362WCD4 with other devices through UART.
Ive seen uart.c application wiced_uart_receive_bytes(...) function is used for receiving data via UART. Its used in a while loop. Does WICED have a structure that generates interrupt if data received by UART ?
Or should I use wiced_uart_receive_bytes(...) as a thread in a while loop ? If you have another suggestion, please inform me.
I had investigated uart app before i opened this thread. It seems OK, I can use the same structure for UART communication. But we are trying to integrate BCM943362 to our devices and our devices already have a communication structure. In this structure interrupt makes our process easier. All my concern is that if there is a structure generates interrupt according to received data via UART.Thanks for support.
wiced_uart_receive_bytes() does not poll. if you set up the UART using ring buffer just like how its done in snip/uart.c, the API waits on a semaphore until the specified number of bytes have been received; otherwise, a timeout occurs. The DMA is responsible for pushing/ pulling data in/out of the UART registers.If you dont want your main application thread to block on wiced_uart_receive_bytes(), you can create a daemon with small stack size to wait on wiced_uart_receive_bytes(). Once the specified number of bytes have been received, you can notify your application thread using a semaphore or a queue message.