This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Missing first 3 chars using sciSend

Other Parts Discussed in Thread: HALCOGEN

I'm using the LIN/SCI2 UART/USB interface on the 570ls1227 hdk.  CCS  Version: 5.5.0.00077 and HALCoGen 3.08. 

Attached is the test code and halcogen files. When ever i send my welcome message (just trying to test the interrupt method of sending data out the UART) it doesn't output the first 3 chars, but the 3rd is placed at the end.  If you step through the code the first letter gets put into TD but nothing comes out the terminal, but all the other chars are displayed correctly, except I get an extra letter at the end (and its the 3rd missing char. ). 

Any thoughts will be very welcomed. 

http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/312/7774.I2C.7z

  • The more I debug this the more frustrated I get.  I step through the send function and  linHighLevelInterrupt and it seems to be ignoring logic.  The variable is pointing to a memory address and looks like its storing the value of the address 3 bytes away.  But its stopping where it should and the end of the string. 

    I've tried changing the length of the string, the contents of the string, even the way I initialize the string = "xxxx"; vs = {'x', 'x', 'x'};  

    Nothing seems to change the fact that it goes 3 bytes away from what is (should) being stored. 

  • Dear Dustin, sorry for the inconvenience. We have found the bug and in HalCoGen. There is a bug in the typecasting sending to TD. I'm working on it with the engineering team now, but in the mean time, I can only suggest going back to HalCoGen 03.06. 

    Thank you,

    -Caleb

  • Hello again Dustin, we fixed the problem.

    Under the "source" folder in the file "sci.c", the line 269 ("sci->TD     = *(uint32 *)g_sciTransfer_t[index].tx_data;") should be "sci->TD  = (uint32)(*g_sciTransfer_t[index].tx_data);". Under the same file, the line 662 "scilinREG->TD = *(uint32 *)g_sciTransfer_t[1U].tx_data;") should be "scilinREG->TD = (uint32)(*g_sciTransfer_t[1U].tx_data);".
    The issue was that the typecast was being done before the read when it should have done it after the read. It read 4 bytes and only sent the last one to be captured by the sci. 
  • That's the fix.  Thanks.  

    Any thoughts on when HalCoGen will get updated with this fix?  The 3.08 just came out last week.  

  • I'm not sure as to when it will be updated, but I have posted a ticket with the development team (#SDOCM00106518). They'll analyze the problem further and can speak to the update.