Hi,
can we do the mathematical operations (like math.sqrt) using nRF51822? Since, our project requires many simple mathematical operations, we need to decide whether the selected nordic chip is valid one or not.
With Regards, Balaji
Hi,
can we do the mathematical operations (like math.sqrt) using nRF51822? Since, our project requires many simple mathematical operations, we need to decide whether the selected nordic chip is valid one or not.
With Regards, Balaji
Hi there,
Yes, the ARM toolchain comes bundled with a math library that allows you to perform such operations. The execution speed will be limited by the hardware support though.
Simply use the following and you're good to go:
#include "math.h"
Carles
You also need to link against the math lib (ex on gcc tool chain, add -lm on LIB makefile variable)
If you do floating-point operations which consumes lots of time, nrf52 may be better solution - it has FPU which will make calculations faster.
edit. Now i see, golden shovel award for us.
That's also a great point thanks !
how can i do it with keil ?