I have a function which writes data to the external flash which is using a FAT file-system further using block device implementation of the SDK. Whenever I am calling the function in the Application timer timeout handler, the total crashes after 10 to 60 seconds of operation. I also saw an error log as "Softdevice assertion failed". I understand there is timing issues because of which this might be happening. I want to know the right way to synchronize all the small tasks i have in my App. What is the correct way to run all the different peripherals with synchronization and call functions inside the timer handler?
And how can i program the nrf52840 correctly to do all the tasks when the program in running in the while(1) loop.