inv_sqrt() function will increases power

1.SDK:SDK17.1

2.IAR V9.2

3.

static float inv_sqrt(float x)
{
float xhalf = 0.5f * x;

int i = *(int *)&x;

i = 0x5f375a86 - (i >> 1); // this is magic.
x = *(float *)&i;
x = x * (1.5f - xhalf * x * x); // 1st newton iteration.
x = x * (1.5f - xhalf * x * x); // repeating increases accuracy, this can be remove.
return 1 / x;
}

volatile float vf_value = 0.0;

int main(void)
{

...

vf_value= inv_sqrt(1.1);

...

}

 ble_app_hrs_freertos demo will alway  5mA.

but ble_app_beacon is normal.

Related