Writing data to a sector of MMC card

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
I'm collecting and saving small amount of data (about 64 bytes) once per
5 minutes on MMC sector. I put my data into increment pointer in SRAM
memory, but I can't wait to fill 512B buffer. I have to save my data
(512B buffer) on each collected data due to power lost. If I fill 512B
SRAM buffer - I use next MMC sector.
I use SPI mode and sector data is set to 512 bytes.
I need to investigate - how the MMC card internal controler writes my
data to MMC NAND memory. Does it erase 512B NAND sector on each my write
? or just in case ?... hmmm. Every information will be priceless :)

--
Best regards
Pelos

Re: Writing data to a sector of MMC card
Quoted text here. Click to load it

An alternative solution may be to use an electrolytic cap with enough
charge to quickly write the data to the card. Use an interrupt pin to
detect power failure, and then flush the sector.


Re: Writing data to a sector of MMC card
On 3 Sep 2006 11:34:50 -0700, the renowned "Arlet"

Quoted text here. Click to load it

Or a super-cap or a rechargable battery, or even a simple lithium
primary cell. If the circuit design is done right, the lithium cell
could last for a decade.


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Writing data to a sector of MMC card

Quoted text here. Click to load it

In agreement with that.  We have used this method on our 7-Seg display
boards.  We have an interrupt pin monitoring the main supply +5v line.  When
it goes, we shut the display down and have LOADS of time to write data, in
safe mS terms anyway.



Re: Writing data to a sector of MMC card


Quoted text here. Click to load it

Actually your situation is even worse than this. Internally the NAND
flash write block size is 528 bytes (usually), but the *erase* block
size is larger than that by at least 4x, more likely 16x or even more
on a large card.

If the data you are writing is truly critical, you need to have a
strategy for protecting against power loss during write. And DO NOT
issue multiple writes to a single sector every time you have one more
byte to store.


Site Timeline