AnsweredAssumed Answered

S908QG16 w/Serial Bean dropping TX data using _SendBlock / _SendChar

Question asked by James Armstrong on Dec 4, 2007
Latest reply on Dec 4, 2007 by CompilerGuru
I am fighting a problem with my serial transmit. The bean seems to be dropping data during transmits. If I put a delay between each call to SendChar the data goes out. If I use SendBlock immediately followed by some SendChar's I only get the data put in the buffer by the SendChar function. I have an output buffer defined by the bean and can see the data going into the buffer. The OutIndxW and OutIndxR keep up with each other. I have tried all baudrates from 300 to 9600 and they all have the same problem. Here is my test example: It is almost like the tx interrupt is sending the data too fast.

//I don't usually get this one even though I see it in the buffer.
AS1_SendBlock("HELLO THERE", 11, &grc);
Delay250ms(2);
 
//These all go out
for (ch=0; ch<20; ch++) {
      if (AS1_SendChar(ch+'0') != ERR_OK) {
        BlinkRedLED();
      }
      Delay250ms(1);
  }

CW 6.1
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : AS1.C
**     Project   :
**     Processor : MC9S08QG8CDT
**     Beantype  : AsynchroSerial
**     Version   : Bean 02.433, Driver 01.23, CPU db: 2.87.119
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 12/4/2007, 10:01 AM

Outcomes