This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Simple BLE example crash when using floats

Hi Nordic Devzone,

I am using the simple BLE blink peripheral example that simply advertises and blinks an LED. I am using the ble_app_blinky_pca10040_s132 example found in the SDK

I have added the following lines of code in the infinite loop in main

float a = 1.0f;
float b = 2.0f;

float c = a / b;
NRF_LOG_INFO("c = %f", c); 

When I run the code, I get c = ----blank----- printing out over and over very fast.

Why does this issue occur?

Any help would be appreciated.

Parents Reply Children
Related