Hi Folks,
It's taken me a while to zero in on the problem but it looks like my SCI TX routines aren't sending all of the chars.
Here are my two TX char and TX string routines in my SCI.C file:
void SCI_write_char(SCI_Handle sciHandle, char a) { SCI_Obj *sci = (SCI_Obj *)sciHandle; while(SCI_getTxFifoStatus(sci) != SCI_FifoStatus_Empty){ } SCI_write(sci, a); } void SCI_write_str(SCI_Handle sciHandle, char* str) { while(*str != '\0') { SCI_write_char(sciHandle, *str++); } }
In my main() file I'm testing the TX with:
str2 = "0.123456" SCI_write_str(halHandle->sciAHandle, str2);<----breakpoint #1 here
str = "9876543"; SCI_write_str(halHandle->sciAHandle, str);<----breakpoint #2 here
I've placed breakpoints after each write and can see an odd behavior. In the RealTerm output window I get: 0.12345 after it hits breakpoint#2 and then when I let it run to breakpoint#1 the 6 shows up to complete str2 and all but the the last digit of str shows up (987654). When I let it go again to breakpoint#2 the last digit of str shows up (the 3) and again 7 of the 8 digits of str2.
Any ideas on how can I get all of the chars that I'm sending to the TX FIFO?
Thanks,
Richard C.