- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi. Ive initialized my UART Rx Buffer to 24 Bytes in a Project to receive the bytes from a NEC Decoder. What would be the best way to read the data as the Receive on Rx ISR is internally handled (because buffer size is greater than 4).
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using the internal interrupt, you can register an interrupt handler at the UART component. Otherwise, you can do a busy wait by checking the size of the RX buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using the internal interrupt, you can register an interrupt handler at the UART component. Otherwise, you can do a busy wait by checking the size of the RX buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
How could I make sure that it wont read any unwanted values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is an API UART_GetRxBufferSize() which returns the number of bytes in the Rx buffer (not the total size). While this returns non-zero you may read using UART_GetByte() from buffer. Mask off the status-byte with 0x00ff and convert to an uint8.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok Bob.Thank you.