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.

TMS320F28335 - Problem with creating and sending strings over SCI

Hi,

I created a function to send data over SCI. However it does not work properly.  Here is the code:

char *msg1;

msg1[0] = 'T';
msg1[1] = 'I';
msg1[2] = 'M';
msg1[3] = ' ';
msg1[4] = Num2Char(H1);
msg1[5] = Num2Char(H2);
msg1[6] = ':';
msg1[7] = Num2Char(M1);
msg1[8] = Num2Char(M2);
msg1[9] = ':';
msg1[10] = Num2Char(S1);
msg1[11] = Num2Char(S2);
msg1[12] = ':';
msg1[13] = Num2Char(MS1);
msg1[14] = Num2Char(MS2);
msg1[15] = Num2Char(MS3);
msg1[16] = '\n';
msg1[17] = 0;*/

scia_msg(msg1);

msg1[0] = 'P';

msg1[1] = 'O';
msg1[2] = 'S';
msg1[3] = ' ';
msg1[4] = Num2Char(D1);
msg1[5] = Num2Char(D2);
msg1[6] = Num2Char(D3);
msg1[7] = Num2Char(D4);
msg1[8] = '.';
msg1[9] = Num2Char(D5);
msg1[10] = Num2Char(D6);
msg1[11] = Num2Char(D7);
msg1[12] = Num2Char(D8);
msg1[13] = '0';
msg1[14] = '0';
msg1[15] = '\n';
msg1[16] = '\n';
msg1[17] = 0;


scia_msg(msg1);

I am pretty sure that the problem is not related to the SCI as when I change the code to 

char *msg1;

msg1 = "This is a test !";

scia_msg(msg1);

everything works well and I see the message on Termite (computer).

I debuged my code and found out that the msg1 does not have a value to send and there is an error message: "Error: Memory map prevented reading ..." for msg1 on the line of "scia_msg(msg1);"

I increased the stack to 0XC00 but it is still the same.

Anybody has any idea?

Thank you,