Hello,
i can't use float-Variables in my uVision programm.
If I only use integer-variables, the timer works without problems,as below.
#define STRINGBUF_LEN 21 char StringBuf[STRINGBUF_LEN]; void Timer_Callback (void const *arg) { int adcVal[3]; adcVal[0] = ADC_GetValue(); sprintf(StringBuf, "%d", adcVal[0]); GLCD_DrawString (0, 2*24, (char*)StringBuf); }
But if I want to use a float-variable for example float x, the timer stops.
#define STRINGBUF_LEN 21 char StringBuf[STRINGBUF_LEN]; void Timer_Callback (void const *arg) { int adcVal[3]; float x; adcVal[0] = ADC_GetValue(); x = (adcVal[0] * 0.5) / 1024; sprintf(StringBuf, "%d", adcVal[0]); GLCD_DrawString (0, 2*24, (char*)StringBuf); }