Anonymous
Not applicable
May 14, 2013
04:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 14, 2013
04:18 AM
[WICED-SDK-2.2.1]
Hi,
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.
Best Regards,
Erol
Labels
- Labels:
-
UART
- Tags:
- application
- block
- buffer
- byte
- bytes
- create
- daemon
- data
- inout
- main
- message
- notify
- number
- occurs
- poll
- pulling
- pushing
- queue
- receive
- received
- registers
- responsible
- ring
- semaphore
- size
- small
- snipuart.c
- stack
- thread
- timeout
- uart
- wait
- waits
- wiced_uart_receive_bytes
3 Replies
Anonymous
Not applicable
May 14, 2013
04:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 14, 2013
04:37 PM
Please look at the Apps/snip/uart application.This provides an example of how to interface with the UART
Anonymous
Not applicable
May 15, 2013
11:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 15, 2013
11:54 PM
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.
Anonymous
Not applicable
May 16, 2013
12:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 16, 2013
12:47 AM
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.