Why not use SDFS like it is intended to be used ?
Why not use SDFS like it is intended to be used ?
Dave
Always wear safety glasses while programming.
Hi,
I'm trying to create a fast a system as possible and I'll be streaming bytes of data to the SD card (preformatted FAT16 with a maximum sized .txt file (completely empty with NULLs) on it such that when I write the bytes, they'll fill the space the .txt file occupies. Take the SD card out and into the laptop and hopefully, the .txt file will contain the data.
Cheers
Jimbo
I do not think you will be able to stream to a SD card in FAT format, FAT takes time.
I heard of a guy writing to a FRAM, then when the MCU had some down time the data would be transferred to the SD.
Have you tried SDFS the way it is? How much too slow was it?
Dave
Always wear safety glasses while programming.
Hi Dave,
Not tested speed, but my aim is to get the absolute maximum speed by not actually using the FAT filing system but just writing bytes directly to the card. The FAT is already in existence in the card with the .txt file. I don't need to set file size changes to the .txt file etc as I'm just trying to fill the .txt file with the data. I'm trying to generate a setup that can read I2C data from multiple sensors and up to 200 Hz if possible and stream the data to the SD card (starting a new write_block at each 512 bytes...)
It's main aim is to collect data over a period of days with no interuption so there is no 'down-time'. I read the forum posts you refer to regarding storing data elsewhere until enough was stored etc so it could then be transferred in one block. At the moment, I'm just trying to read from two successive blocks without error and curious as to why the SD card isn't responding. Am I supposed to send another command after the previous read command? Note that the above algorithm happily writes a block of 512 bytes to the card and then immediately reads it back, but when it tries to read the same block, or any other block, the SDC response flags from the SD card don't equal 'zero' (it tries twice in quick succession after an initial fail). I'm also confused as to where the 'HELLO' is on the card if it's not appearing in a hex editor lol.
Bookmarks