Hello ALL,
I have been using UART module and fstorage module in an application. I've been sending a bin file from PC to NRF52 using UART but when I tried to save it using fstorage the module event handler cause the UART error. In uart error I am just setting a flag. In the main loop, I am counting the number of bytes and after 1kB of data, I am calling fstorage fstore function. but as soon as I call the function the uart module gives the error. The solution that I have done is that I am calling fstore, and after that I wait for a flag to set(blocking the code) that I am setting in the fstorage event handler and once that is completed then I continue the uart communication but obviously, this is not a clean solution. One more thing to add here is that after doing this way I cannot increase the baud rate above 38400. If I go beyond this baud rate I got the uart error immediately even I don't run the fstoarge module at all. The error mask is NRF_UART_ERROR_PARITY_MASK. Note that easydma is true for UART and hardware flow control is also true. I want that initiate the fstorge erase process, get the uart data in the mean time, then call the fstore function to store the received data in the background while continue receiving uart communication. Can you help me with that?
Thank you to the whole community.