sprintf function results in garbage and exception

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable

I am using XMC1300 series MCU for my application.

There are two ISR corresponding to CCU8 and CCU4 and 1 for VADC.

When I am using sprintf function to display string on lcd, it shows garbage and sometimes goes to exception.

I even tried to save the string array without using sprintf like :

str[0] = '9';
str[1] = '2'

Still it doesnt prints the specified result.

LCD routine comes later as the array string it self consist of garbage whether I am using sprintf or not.

I even tried to increase the stack upto 4k but no solution.

Please guide me what needs to be done.

0 Replies