Hi All,
I've integrated the flash routines from this example: github.com/.../nRF52-fds-example into my project, and am having problems figuring out the architecture.
I'm using: Keil uVision v5.22.0.0, SDK 12.1.0.0, Softdevice 3.0, and nRF52832.
The problem happens when writing to flash.
The first step in the write process happens properly. It's this function: record_header_write_begin()
However, that's the only thing that gets written.
If I understand correctly, the write operation is added to the queue, and it's executed when the queue_process() function calls write_execute(). The switch statement in that function stops on the case FDS_OP_WRITE_HEADER_BEGIN, and record_header_write_begin() is called. In that function, fs_store() is called and the correct data is written to the correct location in flash. Upon returning from fs_store(), p_op->write.step is updated to the next write operation, which would be FDS_OP_WRITE_RECORD_ID.
That's where the code derails, and my understanding along with it. Nothing more is written to flash, and I don't see how it would be. My understanding of the queue architecture is weak, so I don't know how to troubleshoot that. The program goes along its merry way without crashing or issuing any errors that I can see.
As I step through the code using the debugger, the processor encounters a fatal error any time an fs_store() is executed. So, I can't really see what has happened. I'm sending some data out through the UART, but it's pretty limited.
I'm happy to supply more information, including code, but thought this would be enough for someone who knows the FDS architecture to reach out with a helping hand.
Thanks, robin