Maker Pro
Maker Pro

SD card

Arne Staessen

Jul 10, 2015
2
Joined
Jul 10, 2015
Messages
2
For a project I need to save data on a SD card, but I never have worked with SD cards.
I do find a lot of information on the internet but not everything is clear to me. I found that if you write or read the SD card, it works per blocks of 512Bytes. But In the datasheet of SanDisk they say that the SD card is erased per sector which exists out of a 32 blocks. Does that mean that you can't erase per block of 512Bytes?

Best regards,

Arne Staessen
 
Last edited by a moderator:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Hi Arne

welcome to EP :)

can you please link to the datasheet you are referring to, just so we all can get on the same page :)

Dave
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Have a look at page 123 (7) of the document. It states there.
The NAND architecture used by SanDisk and other card vendors currently has Erase Block sizes of (32) or (64) 512 byte blocks, depending on card capacity. In order to re-write a single 512 byte block, all other blocks belonging to the same Erase Block will be simultaneously erased and need to be rewritten.
It also states in chapter 1.5 that a sector consists of 512 Bytes. I do not find a reference to a sector consisting of 32 blocks.
 
Top