I am working on some project with TM4C123 microcontroller. I have problem with sprintf function, when i use this function, my program is going to hard fault. I am using sprintf with floating numbers. I am using FPU unit. And for this function i already gave a heap memory, and it still doesnt look like works.
In the below, u can see how i used sprintf function.
sprintf(WiData, "$TLM,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f*%c%c", Accel.x, Accel.y, Accel.z, Gyro.x, Gyro.y, Gyro.z, Compass.x, Compass.y, Compass.z, Angle.x, Angle.y, Angle.z,0x0A,0x0D);
And this is how many heap memory i gave
; <h> Heap Configuration ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; </h> Heap_Size EQU 0x00000200 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base Heap_Mem SPACE Heap_Size __heap_limit
I dont know what i am missing?
Thanks