[riot-users] Linker | printf | accuracy problems
oliver.koepp at yahoo.de
Wed Jul 31 15:02:27 CEST 2019
Hello RIOT Team,
I try to calculate some floating point digits on the SAMR21-xpro Board.
When I print the floating point digit it shows me nothing.
uint32_t time_diff = 554;
double distance = (33./2000.) * time_diff;
printf("distance = %f cm\n",distance);
2019-07-31 14:36:58,631 - INFO # distance = cm
Stack Overflow  tells me that floating point are disabled by default
Whats the trick ??
What should I add to the Makefile ?
If I try to print (using printf) uint64_t variables I have the some
problem as above.
How precise is the current system time on RIOT ??
I set a GPIO HIGH and LOW with a time difference of 100 and less
microseconds. Before I set the GPIO HIGH and LOW, I call function .
If I compare the time with an oscilloscope I get horrible deviations.
What is the best way to measure microseconds and on RIOT with the
 static uint32_t xtimer_now_usec()
More information about the users