SerialSendComplete

Discussion to talk about software related topics only.
Post Reply
zealott
Posts: 40
Joined: Thu Oct 30, 2008 1:15 am

SerialSendComplete

Post by zealott »

Hi,
Tried the use the SerialSendComplete function but receive only FALSE. Any hints? (MOD5282 and MOD54415)

int ser1 = SimpleOpenSerial(1, 115200);

char buf[512];
// fill buffer
for (unsigned int i=0;i<sizeof(buf)-1;i++)
{
buf=0x41; // fill buffer with 'A'
}
buf[509] = '\13';
buf[510] = '\10';
buf[511] = '\0';

iprintf("Application started\n");

int ticks=0;
while (1)
{
ticks = TimeTick;
writeall(ser1, buf, sizeof(buf) );
ticks = TimeTick-ticks;
while(SerialSendComplete(ser1)==FALSE) // <-- this never gets TRUE
{
OSTimeDly(0);
}
iprintf("ticks=%u\r\n", ticks, SerialSendComplete(ser1));
OSTimeDly(TICKS_PER_SECOND * 3);
}
User avatar
pbreed
Posts: 1081
Joined: Thu Apr 24, 2008 3:58 pm

Re: SerialSendComplete

Post by pbreed »

OSTimeDelay(0) hangs FOREVER....

We did have an issue with serial send complete...

What NNDK revision are you using?
zealott
Posts: 40
Joined: Thu Oct 30, 2008 1:15 am

Re: SerialSendComplete

Post by zealott »

Hi Paul,

Using the latest one 2.6.7 with ticks set to 200...

Thanks,
John
Post Reply