Hi Vivien Lin
The debug console is implemented with variables of 32 bits, so in a low-level driver, it uses a "float to string" converter, this converter work with int32_t variables (0x7FFF_FFFF or 2147483647), this why the actual value is truncated.
You can go to the ConvertFloatRadixNumToString in the fsl_str.c file and change a,b,c, and uc to be int64_t variables (please note that the casting also has to change).
static int32_t ConvertFloatRadixNumToString(char *numstr, void *nump, int32_t radix, uint32_t precision_width)
{
int64_t a;
int64_t b;
int64_t c;
int64_t i;
uint32_t uc;
.....
.....
a = (int64_t)intpart;
if (a == 0)
{
*nstrp++ = '0';
++nlen;
}
else
{
while (a != 0)
{
b = (int64_t)a / (int32_t)radix;
c = (int64_t)a - ((int64_t)b * (int32_t)radix);
if (c < 0)
{
uc = (uint64_t)c;
c = (int64_t)(~uc) + 1 + '0';
}
else
{
c = c + '0';
}
a = b;
*nstrp++ = (char)c;
++nlen;
}
}
Hope this helps
Regards
Jorge Alcala