Good presentation and walk-thru. The slides, especially diagrams and use of coloring along with the lecture are much better than reading an article or Comp. Sci. text and help greatly to supplement those.
gaun: yes, since it means more writes to the device it will result in more wear, but with proper wear leveling this shouldn't be a problem (SD cards implement wear leveling).
Diagnostics, if they are run everytime a card is inserted would mean that you'd have to wait several minutes each time, so I wouldn't run them everytime, if at all. With a journaled FAT, you wouldn't have to run diagnostics at all since it wouldn't be possible to corrupt the FAT metadata (which is what diagnostic tools check).
gaun: assuming you don't overwrite existing data and just append to a file, you should be fine if you're using a journaled FAT volume, assuming your backing device cannot replace an existing sector with unrelated garbage.
@gaun, Then I'd use the supercap to buffer the battery. If its critical, then go towards redundancy. If you're writing new data (new file), then I'm thinking you'll have a minimum of three sectors to right out to complete a file closure. All depends (as it so often does! :)
You also have to make sure that you battery-backup can suffice at any time for your application, which might not be easy to prove and may require that you limit the size of your biggest writes.
@mharkins: I too am using SD card. A portable medical device which is worn by the patient can have a lot of failure from vibration to battery falling off. So a super cap is one option.
@Gaun I'd be afraid that a super cap wouldn't have enough storage capacity for a complete file update. My guess is you'd be better off using a battery, but a lot would depend on the file hardware you're interfacing to. I'm interfacing with SD card, and that's a lot of current at times.
gaun: I must admit that I'm not an expert with regards to hardware, but I suppose "a super capacitor or something" could help! The key is you need to be able to have a grace period where you're allowed to finish your ongoing FS operations.
> Does anyone here now know if you need a 32-bit processor for FAT32 or will a 16-bit work?
In theory, any "Turing complete" processor can do anything so yes, as long as you have enough "compute performance" and buffer memory, any processor can be made to process any file system.
gaun: FAT with a journaling module would be relatively safe, but you would have to implement something in your application to provide absolute data safety, if you're using a logical journal. Some other FS exist and provide more reliability than FAT at the cost of compatibility with major OSes, which might or not be a problem, depending on your application. I wouldn't recommend writing your own filesystem unless you have lots of spare time on your hands!
@eric: In your mitigation strategies for preventing corruption you had mentioned that a Brown voltage can be detected and data written to the disk. Should this be done using a backup power like a super capacitor or something?
jcabas: not very much, LFN entries have a checksum against their associated short file name in order to ensure they really belong to following normal directory entry, but there aren't any checksums on the FAT table. Some disk checking utilities will be able to detect some amount of corruption, however.
@eric: Any other FS's for embedded which is at least relatively safe? Also if regulation and compliance need safety without corruption would you recommend writing own filesystems for embedded devices?
caa028: well you shouldn't do that if you have less than 392 bytes, you should restrict the write to the total length you want write and not go into the loop if you don't need to.
[QUESTION] Eric: In the case of FS corruption especially in medical devices I need to take care that the vital signs data is written correctly. In this even a detection of a corrupt filesystem is fine. Can this be ensured?
RMR: At the level of the filesystem, essentially all filesystems just act as though each file is a "bag of bytes". If there's any sort of record-oriented structure imposed on the file, it's imposed from a higher level than that of the filesystem.
Eric I am not currently doing file work but if I were, as you say it would depend on the application. Having said that most work I do involves relatively small data rates so efficiency would be a priority.
Kentj: I mentioned this yesterday but one thing to be careful of is that not all USB sticks actually flush everything out to the underlying Flash Drive in a predictable amount of time. We saw some that didn't flush until another write came along and pushed things through, seemingly no matter how long you waited!
@Atlant, Yes I agree. FOr instance, we have a fixed file name that we respond to. Simplified a lot of code. We don't use long file names. Removed a ton more. Don't need to create a directory, just update, Etc Etc.
mharkins: That's kind-of what I was implying. If you're creating a FAT32 volume (that is to be read by others), then you only need to implement those features you want to support.
But if you want to work with the general case of "All FAT32 volumes using all possible combinations of features", then there's a lot more work to do to get it right.
In my project I want to make as much as possible automatic, but it looks like I will have to have the user push a button and watch an LED change from red to green so they know when to take the flash drive out.
@Atlant I was going for the smallest code size possible. Thus the path I took. I did investigate a whole bunch of different implementations including the linux open source examples. Most were overly complicated for what I needed, or used too much address math instead of simple structures and pointers, for me to wrap my feeble mind around. Chan did a good job on his code.
@Kenj Yes, I've trained assemblers too, and it might be the interest level that helps. Sometimes I'll be talking to an installer. Some of these guys don't realize that you can buy screwdrivers that have blade widths less than a half inch. When it comes to computer literacy to the level of reformating an SD card, it was just an issue. So to make the product as user friendly as possible....
@gaun There's a lot to consider to implement from scratch. That'd be tough IMO. I started with a copy of CHan's system (one of the best written IMO) then stripped out what I didn't need, and added the functions I needed to interface on the level I needed.
gaun: A lot depends on how "high fidelity" you want your implementation to be. Writing (Creating) a valid (readable) FAT32 volume can be a lot easier than being able to read every possible FAT32 volume in the world.
Kentj: There are limits to both aspects (the size of individual files and the size of the overall device). The biggest single factor in both is the "cluster size" for the device. Search the slide deck(s) for that term.
@Atlant: That's what I was wondering. I did see that slide but wasn't sure if it was file size or device size. So I guess even FAT16 might work for my purpose.
@Kentj Well, it could be that your Joe User is smarter than mine! :) THe people I sometimes deal with don't know how to insert the card right. I think of them as sales men! (which come to think about it, must of the one's I have trouble with are! :)
@Kentj Our application uses an SD card for customers to easily configure the product, and copy configurations between product (product is an HVAC thermostat). SD cards 2Gs and under are Fat16. I initially released with Fat16 only, but the smaller SD cards are getting tough to get in the field, thus the Fat 32.
I was trying to get 1M readings per second off of two 24-bit ADCs, and a 32 bit counter. But even after offloading the host communications from the PIC32 it looks like I'm going to have to settle for 500K
@DaveWR: Thank you. I'm using a PIC32 and a PIC24. I wanted to use the PIC24 for USB and Ethernet, downloading firmware updates on a flash drive while using the PIC32 for the rest of the instrument.
The streaming audio player will appear on this web page when the show starts at 2pm eastern today. Note however that some companies block live audio streams. If when the show starts you don't hear any audio, try refreshing your browser.
@erhk: I'm originally from Washington state but have been down here in Richmond, TX for almost a year. I'm still learning where everything is in relation to where I am. I have a grandson living in El Paso though.
Whatever problems existed yesterday for the slide deck link seem to have been fixed. From a quick skim of day 3 topics this looks like some good real world practical stuff.
Actually, Monday was http://downloads.deusm.com/designnews/CEC-March-4-Day-1-File-Systems.ppt . But Tuesday was http://downloads.deusm.com/designnews/CEC-March-5-Day-2-Files-Systems.ppt and apparently Wed picked up Tuesdays link spelling mis-match.
Andrew Morris designed a circuit that could detect a stroke victim's groan and convert the sound into a signal so caregivers would know when help was needed.
New disc magnet motors fit into the design trend of stepping up to closed loop performance while maintaining the cost advantage of stepper motor technology.
At the Design News webinar on June 27, learn all about aluminum extrusion: designing the right shape so it costs the least, is simplest to manufacture, and best fits the application's structural requirements.
On April 21, NASA launched a novel project, putting into orbit three satellites that employ an off-the-shelf commercial smartphone as the control system.
From Dell / Intel® New Paradigms in Design Work Scott Hamilton, vertical market strategist for Dell Precision workstations, 5/2/2013 5
Early in my career, I worked as a draftsman and remember the days of drawing on vellum with numbered pencils and Mylar with plastic lead. This was a fun experience in the sense that I ...
I've been using workstations for more than 10 years and love finding ways to get more performance from my system. With demanding professional applications that require more power each ...
A lasting memory from my first job as an engineer in an auto assembly plant is standing on hard concrete at six in the morning, vending-machine coffee clutched in hand, listening to ...
For industrial control applications, or even a simple assembly line, that machine can go almost 24/7 without a break. But what happens when the task is a little more complex? That’s where the “smart” machine would come in. The smart machine is one that has some simple (or complex in some cases) processing capability to be able to adapt to changing conditions. Such machines are suited for a host of applications, including automotive, aerospace, defense, medical, computers and electronics, telecommunications, consumer goods, and so on. This radio show will show what’s possible with smart machines, and what tradeoffs need to be made to implement such a solution.
To save this item to your list of favorite Design News content so you can find it later in your Profile page, click the "Save It" button next to the item.
If you found this interesting or useful, please use the links to the services below to share it with other readers. You will need a free account with each service to share an item via that service.