Skip to main content
dbte
Associate
July 14, 2017
Question

STM32F4DIS-BB FatFs

  • July 14, 2017
  • 21 replies
  • 5262 views
Posted on July 14, 2017 at 20:24

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    21 replies

    dbte
    dbteAuthor
    Associate
    March 23, 2018
    Posted on March 24, 2018 at 00:19

    This question is specifically meant for Clive1. With the understanding that you are not using the camera or lcd attachments and just the base board might you offer some suggestions on how you would approach the following? I finally got the STM32F4xx_Camera_Example from ST to work. Unfortunately it is limited to a 2GByte capacity and I would like to increase that capacity up to 64GBytes or more. Thankfully I managed to get your code to work with the base board, and I had hoped that I would be able to transpose it into the examples that ST provided.  Unfortunately this has proven to be extremely difficult. The code that you provided uses a newer library set which is different from the one that I have been using (i.e. older). I have been very frustrated by this and I figured that it would make more sense if I were to build my own and use yours as a reference in my quest to get there. To that end I figured that I need to understand the SD Standards

    https://www.sdcard.org/developers/overview/

    and go from there. Being that you built your own code and scaled it upwards might you offer some suggestions on how to get there? Shall I go from 2GByte and build to 4GBytes then to 8GBytes and 16 to 32 and 64? As I struggle to wrap my head around this what were the reference materials that you used? Are there any example tutorials that you might suggest that would be helpful? Thanks in advance for your assistance.
    Tesla DeLorean
    Guru
    March 24, 2018
    Posted on March 24, 2018 at 01:00

    I think the code I provided was the ST code refactored so it handled blocks properly without a lot of stupid/unnecessary transforms. Earlier ST code was also limited to SD/MMC cards, mostly 2GB and below. They used to ship EVAL kits with 128MB cards, then later with 2GB cards.

    Most of the cards 4GB and greater fall into the SDHC/SDXC category and have different read/write block commands. There are some 4GB card using the older SD/MMC category, these seem to target people using old navigation hardware (car info-tainment system) to hold large map files.

    You want FAT32 for media >2GB, you want EXFAT for media >=32GB.

    I seem to recall FAT32 having a 2GB FILE SIZE issue, at least in some target systems in prevalent use at the time, I used to span things across multiple files (datasets holding 4.7GB or 8.5GB), NTFS supported much larger files, things might have changed in the decade or so since I was deep into that, but things around 4GB are always going to give people used to 32-bit machines headaches, you really need to be 64-bit portable, you need a different mindset and refactor a lot of code.

    The ceiling for the SDHC/XC cards is likely 2TB, I've used 128GB and 200GB cards on most current 0.12c and 0.13 FatFs.

    A 400GB MicroSD card runs about $199

    http://users.ece.utexas.edu/~valvano/EE345M/SD_Physical_Layer_Spec.pdf

     
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    dbte
    dbteAuthor
    Associate
    March 25, 2018
    Posted on March 25, 2018 at 19:01

    Again thanks. I did a download on a few documents and found that they were not that helpful. Half the battle is being pointed in the right direction with the right material. Most of what I found out there was dated, or a bad fit.

    Tesla DeLorean
    Guru
    March 26, 2018
    Posted on March 26, 2018 at 01:30

    The last code build posted should work with cards >=256GB

    Here's a more current manual (v6.0 2017)

    https://www.lijingquan.net/wp-content/uploads/2017/05/Physical-Layer-Simplified-SpecificationV6.0.pdf

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..