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

Softdevice delay conflict

Hi.

I am developing application with mpu6050 gyro on  nRF52832, swd S132 V6.1.1., sdk 15.2. My code is based on ble_app_uart. In main, I add my custom function that calculates offset value, by taking readings from gyro for 5sec and then takes average from it and makes offset value. I call this function just before advertising start. When I run this code, it gets stucked on my function and does not execute advertising start, but when delay is lower, for example 1s, advertising starts. I thing the problem is caused by long delay withing my custom function which affects softdevice routine. Is there some better way to calculate offset value ? And how softdevice behaves when delay is used? 

Thanks

Related