- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A binary data reception interrupt program is being created using CY8CKIT - 059.
The communication conditions are 19,200 bps DataBit = 8 Parity = non stop = 1 Rx buffersizu = 100 and actual reception is about 30 characters.
The interrupt module was connected to the rx_interrupu terminal of the UART.
I created the code as follows, but sometimes the data dropout occurs.
I would appreciate it if you could give me advice on what is the cause and how I can solve it.
Below is the receive interrupt part
if ( UART_ReadRxStatus() == UART_RX_STS_FIFO_NOTEMPTY ){
bufsize = UART_GetRxBufferSize();
for(i=0;i<bufsize;i++)
{
data_cnt++;
rev_data[data_cnt]=UART_GetByte();
}
if (data_cnt==22 )whm_rev_end=1;
}
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest to use instead of
if ( UART_ReadRxStatus() == UART_RX_STS_FIFO_NOTEMPTY ){
rather
while ( UART_ReadRxStatus() & UART_RX_STS_FIFO_NOTEMPTY ){
Bob