I am running into a very perplexing issue on my custom board involving use of fStorage and the soft device. When I attempt to write to flash memory using fStorage API (using the soft device), any writes over 444 bytes is seemingly having a cascading effect on other areas of my code using the soft device. For example, I have a ADC sampler going in the background, and once this function below is called, the ADC values are no longer accurate (become zero at all times).
I initially thought it might be a memory overrun, but any write over 444 fails. The test code below is attempting to write a buffer sized 620. Ive tried almost every size above 444, and each have the same cascading failure effect (including the actual size of 620). Anything below writes to memory without issue...
Here is some example test code which has the aformented behavior. I am pretty stumped as to why this is causing an issue elsewhere. Can anyone tell me what is wrong with it? Other than this instance, I have been using fStorage for months without problems.
#define SIZEOF_Configuration_BYTES 620
uint8_t m_dummy[SIZEOF_Configuration_BYTES] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
uint32_t r = nrf_fstorage_write(&fstorage, row_address, (uint8_t *) &m_dummy,444, NULL);
I appreciate any and all help. Thank you!