Hi,
Maybe someone can point me into the right direction, I'm on S110 and SDK10 for hardware/legacy reason.
I have a pstorage function using init, load, clear and write functions to write default data to flash at device startup in case a reference byte is not detected (clean start), this all works nicely and occurs after initialising all the BLE functions (incl. starting & stopping advertising), I confirmed all OK by reading out the flash values in debug or doing specific flash writes and reads after that - so far so good.
My problem now is that when I'm in a connection and getting new config data via BLE_GATTS_EVT_WRITE and its handler, the databytes come in nicely (validated) but I can't seem to find a good way (or timing) to write them to flash. I tried stopping all timers, stopping the connection and advertising but each time I do the clean (same function to write as validate after startup) it seems to hang - I'm having trouble to debug properly with BLE active where exactly it goes wrong but the functions themself seem to work fine as long not in connection.
Anyone recognizing this problem or some suggestions what to try next ?
Didn't want to dump code just yet but if needed let me know.
thanks