What causes Data Corruption fault in TSS_Library?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What causes Data Corruption fault in TSS_Library?

1,747件の閲覧回数
ViniciusHoff
Contributor II

I am using the TSS_Library to implement some touch buttons. The project was working properly. However, sometimes occurs the fault interruption because of the data corruption fault.

This fault occurs without the program have changed anything in TSS_Library.

What can cause Data Corruption fault in TSS_Library?

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

1,606件の閲覧回数
ViniciusHoff
Contributor II

I realized that the data corruption fault occurs always after that the program calls the sprintf() function.

The code is:

void print_msg(char *title, char *param)

{

    char msg1[17]; 

    sprintf(msg1, "%s %s", title param);

    LCD_writeLine2(msg1);

}

0 件の賞賛
返信

1,606件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Vincius,

sprintf() needs a lot of stack/RAM, so I suspect there is a stack overflow. Try increasing the library heap size and increase the stack size in your application. Glad to hear that xsprintf() solved your problem :-), because this smaller variant uses much less stack/code.

Erich

0 件の賞賛
返信

1,606件の閲覧回数
vicentegomez
NXP TechSupport
NXP TechSupport

Hi Hoff

Can you tell me how to reproduce your problem, or can you please send me your project?

Regards

Vicente

0 件の賞賛
返信

1,606件の閲覧回数
ViniciusHoff
Contributor II

Hi Pedro

I can't send you the project, because I haven't permission of my company.

However, the problem occurs always after that the program calls the sprintf() function.

I solved the problem exchanging the sprintf() function for the XF1_xsprintf() function, provided byBlackNight, in the Processor Expert Components.

After I exchanged all sprintf() functions, this problem does not occurred more.

0 件の賞賛
返信