UART receive delayed 1 char

cancel
Showing results for 
Search instead for 
Did you mean: 

UART receive delayed 1 char

278 Views
erikmalund
Contributor I

In processing with the below I see that a character received does not trigger the calls till the next character is received.

another way of explaining if only one character is received from start no calls are made.  then when another character is received either (both) links are called and pointing to the first character

     Settings    :

**         Serial channel              : UART1

**       Protocol

** Width : 8 bits

**             Stop bits               : 1

**             Parity                  : none

**             Breaks                  : Disabled

**             Input buffer size       : 1

**             Output buffer size      : 64

**         Registers

**         Input interrupt

** Vector name : INT_UART1

**             Priority                : 2

**         Output interrupt

**             Vector name             : INT_UART1

**             Priority                 2

Code transfer from events to
particular module

void BT_UART_OnRxChar(void)

{

  /* Write your code here ... */

  BtProcessUARTrxChar();

}

void BT_UART_OnFullRxBuf(void)

{

  /* Write your code here ... */

  BtProcessUARTrxBufFull();

}

Processed here

byte blah;

void BtProcessUARTrxBufFull(void)

{

  BT_UART_RecvBlock(&BtRecvByt, 1, &BtRecvCount);

  if (BtRecvByt == 3) // the last character in the record is 0x03 a breakpoint will click when it comes

  {

    blah = 0;

  } 

  if (BtRecvByt != 0)

  {

    blah = 0; // a means of seeing that other characters are processed HERE

  }  

}

void BtProcessUARTrxChar(void)

{

  if (BtRecvByt == 3)

  {

    blah = 0; // the last character in the record is 0x03 a breakpoint will click when it comes

  }

  if (BtRecvByt != 0)

  {

    blah = 0;  // a means of seeing that other characters are processed HERE

  }   

}

Tags (1)
0 Kudos
0 Replies