Search code examples
loggingembeddedsd-cardfat32msp430

microSD card FAT module


I have recently been using a uALFAT microSD board by GHI Electronics for data logging, but I have been having problems with its reliability; some of its function calls, at times, take far longer than I can handle. I am currently using an MSP430 microcontroller to talk to the uALFAT.

What similar boards are out there that I could possibly use instead of the uALFAT that would hopefully be more reliable?

OR

What would be the most favorable OEM solution if I needed to design my own interface board to work with an MSP430?


Solution

  • I would think about this a bit differently. Any flash based storage device is likely to have variable timing on writes. Especially one with a file system and wear leveling and features like that. It tends to be the nature of flash since you have to erase whole blocks and move things around. If you can't live with the variable timing, what I've done in the past is to move this piece out of the time critical portion of the code.

    Typically I add a queue which the time critical code writes to, and then in the background pull from the queue and write to the SD card. In a RTOS, this would be a lower priority task. In a polling loop, it would be a function called when the system is Idle.

    This changes the constraint from being the worst case timing for a function call to simply being able to meet the average throughput requirements for logging. The worst case latency and throughput determine how big the queue must be; typically this can be small.