Home arrow Support arrow Forums

Luminary Micro Forums

sgmcclellan

Fresh Boarder
Click here to see the profile of this user

2006/12/13 20:23

sprintf causes FaultISR to execute

I recently tried to use sprintf in a project for the LM3S811 Eval Kit and found that the sprintf function causes a FaultISR to execute (always in a continuous loop).

My project is the standard hello project with the sprintf sample code from Keil help included at the beginning of main{}. Here is the sample code that I pasted at the beginning of the main{} function:

char buf [100];
int n;
int a,b;
float pi;

a = 123;
b = 456;
pi = 3.14159;

n = sprintf (buf, "%fn", 1.1);
n += sprintf (buf+n, "%dn", a);
n += sprintf (buf+n, "%d %s %g", b, "---", pi);

The hello project works fine without the sprintf sample code and when I paste the code in everything compiles and loads OK. Debugging will show that the first sprintf statement causes the FaultISR to run and that's it, stuck in the FaultISR forever.

What would cause this condition?

login or register to reply

      Topics Author Date
    thread link
sprintf causes FaultISR to execute
sgmcclellan 2006/12/13 20:23
    thread link
thread linkthread link Re:sprintf causes FaultISR to execute
Viktor 2006/12/23 10:05
    thread link
thread linkthread link Re:sprintf causes FaultISR to execute
inakiz 2007/01/20 19:03
    thread link
thread linkthread linkthread link Re:sprintf causes FaultISR to execute
jberezin 2007/01/26 14:26
    thread link
thread linkthread linkthread linkthread link Re:sprintf causes FaultISR to execute
tinroofrusty 2007/01/26 17:10
    thread link
thread linkthread linkthread linkthread linkthread link Re:sprintf causes FaultISR to execute
jberezin 2007/01/26 17:19
    thread link
thread linkthread linkthread link Re:sprintf causes FaultISR to execute
rgroleau 2008/09/15 08:47