Solved
printf fail to print float type
Software tool: IAR Workbench 9.60
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <intrinsics.h>
int putchar( int ch ){
while(!(USART2->ISR&0X0080));
USART2->TDR = (unsigned char)ch;
return ch;
}
test code:
printf("%d\n",ADC_array[0]);
printf("%f\n",1.234567);
printf("%f\n",1.234567);
Output on computer:
62615 ----correct
%f ----incorrect(should output 1.234567)
%f ----incorrect(should output 1.234567)

