Hi everyone!
Long time! Finally some time for projects now that I am in vacation from University! Let's see how my coding is (and also how my english is too).
So I am now trying to finally use SD cards (I am probably saying for the past 2 years that I should do that).
Been successful using the FATFS with the port that comes with tivaware.But I am not liking the write times so I want to optimize that for data logging. This might be a bit more related to the third party software so it's probably more directed to the forum users and their experience rather than TI employees.
Been reading up in the best ways to log data into the sd card, but there's still an issue. A write will always take a couple milliseconds (sometimes a bunch of milliseconds). Basically f_write will block the code while that happens. Could implement DMA on the SPI or something similar but it seems f_write tries to read/write more stuff from/to the sd card. This means that f_write will still block the code for some milliseconds. Am I correct? This seems a bit weird because it seems the FATFS functions shouldn't be touched, only the port functions - so even when using an OS this seems unsolvable! (if I don't edit the FATFS functions and actually use them).
Before going and implementing DMA on the SPI I of course want to know if this will actually help.
I've seen suggestions to when actually logging data to avoid FATFS and write directly into the sectors (and previously having a file with pre-allocated size). Here DMA on the SPI would help avoid blocking the code for a long time.
I hope some of you can give me a boost and/or point if any of my line of thought is wrong.
I hope you have a continuation of a good day!
Luís