I'm writing an application which updates the ble advert data at run time. I use the radio_notification callback functionality. Inside that function, the code calls the ble_advdata_set function to update the advertisement data. The code runs with no problems.
Inside the same function data is read from the InvenSense driver(gyro and acceleration) using using dmp_read_fifo (inv_mpu_dmp_motion_driver.c) and this is placed in the advertisement data structure. Again no problems.
It works, however being new to this development environment, I'm wandering if I'm breaking any BLE software design principles or best practices.