SD card multiple read blocks giving error


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: SD card multiple read blocks giving error

    Why not use SDFS like it is intended to be used ?
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Re: SD card multiple read blocks giving error

    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

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: SD card multiple read blocks giving error

    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.

  4. #4
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Re: SD card multiple read blocks giving error

    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...)

  5. #5
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Re: SD card multiple read blocks giving error

    Quote Originally Posted by jimbostlawrence View Post
    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.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts