Forum: µC & Digital Electronics SDHC "allocation unit" vs. 64KB for write efficiency?

von Bill B. (auldreekie)

Rate this post
0 useful
not useful
Hello all,

My SD card driver works great with both SD and SDHC cards except I need 
it to be as energy efficient as possible when writing.  So, I am 
carefully aligning my storage format to match the erase/write boundaries 
associated with the NAND flash built into the cards.

The SD and Toshiba specification say to use the card's "allocation unit" 
(typically 4 MB) for erase efficiency in SDHC cards.  Further, they say 
that for SDHC cards the "sector size" field in the CSD is always set to 
127 (64KB) regardless and is meaningless for erase-boundary 

BUT!!!  Later the same Toshiba specification says, oh by the way, notice 
that the "sector size" field says 64KB and your efficiency will be much 
better if you start writing on 64KB boundaries.



1.  Does the SDHC 4 MB "allocation unit" really mean anything at all to 
normal card operation?  Is there any reason to pay the slightest 
attention to it?

2.  OK, for certain Toshiba cards the Toshiba documentation tells us 
that 64KB is a magic number for write boundaries.  Can one depend on 
64KB being the magic number for all SDHC cards from all manufacturers? 
It is not provided in any of the card information fields, unless you 
count "sector size", which the SD documentation expressly says one 
should ignore!

Thanks for any wisdom out there!


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.