It is currently 23 Feb 2019 13:46

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 15 Jan 2019 09:05 
Offline

Joined: 13 Nov 2016 09:53
Posts: 29
I have PIC32MX795 running on Fusion v7 and communicating with SD card with latest FAT32 Lib. The use of the SD card is is for short term data storage to protect against power loss, I need to store 8 arrays of data every hour, each array is less than 512 bytes so writing to sectors is possible. Every hour the previous data is over written so on power loss previously stored data can be used to rebuild live data being generated by the MCU.

My questions are for sector vs. file write and read, both will work, but which is best for wear leveling and speed?

When using sector write and read, does this write to the same physical memory in the SD Card memory and there by reducing the SD card life span and increase the chances of memory cells failing over a period of time?

Also when wrting to sectors, I have tested writing to sector 590 (used from Mikro example code), is the next free sector 591 or is it 590 + 512 (512 bytes being the sector size)?

I am assuming file write and read would place data at different places on the SD Card and reduce wear but write speed might be slower?


Top
 Profile  
 
PostPosted: 12 Feb 2019 17:01 
Offline
User avatar

Joined: 14 May 2018 08:34
Posts: 354
Hello,

I'm afraid we've never performed such tests, so I can't tell you with certainty.
Quote:
I am assuming file write and read would place data at different places on the SD Card and reduce wear but write speed might be slower?

Most likely.

Kind regards,

_________________
Filip Grujcic


Top
 Profile  
 
PostPosted: 12 Feb 2019 20:50 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3769
Location: Nieuwpoort, Belgium
Files have also a fixed place (used sectors) on an sdmmc card, so the wear will be the same when writing to a file as when writing sectors directly. Of course in the latter case the speed will be much higher (no FAT overlay).

_________________
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: