Jump to content
Sign in to follow this  
Peabody

Using microSD card to update firmware

Recommended Posts

I've been working on alternatives to updating firmware in the field, and wondered if a good alternative might be to embed a microSD card socket in a project, and use that to update firmware.  It would require no cables or interface devices.  Just copy the update file to the card, insert it into the slot, and power up the device, which would then detect the card, and use the file contents to flash new firmware, then (possibly) erase the file.

I've downloaded the PFatFs.zip library from about 2016:

https://forum.43oh.com/applications/core/interface/file/attachment.php?id=9251

Is that the latest version?  Anyway, I don't have a feel for how much memory this would use, and perhaps more important, how much RAM is needed.  Would something like the G2553 or FR2311 work?  For this use, it would only be necessary to initiate the card, open the file and read the data, and optionally delete the file, but there's no need to write data to a file.  So perhaps the code size might be a bit less than what the example ino produces.

Does anyone here have experience using SD cards with MSP430 parts?  Is this idea worth pursuing?  Do you think it would be possible to write the file data to flash or FR in real time byte-by-byte, perhaps by bit-banging the SPI?  Are there any hardware issues (I assume 3.3V is ok), large current requirements?

Thanks for any insights and opinions.

 

Share this post


Link to post
Share on other sites

I popped "microSD" into the search box on your question's page, and among many finds, this one may answer some of your questions.

https://forum.43oh.com/topic/3946-msp430g2553-microsd-wav-music-player/?tab=comments#comment-35782

You may also want to look at E2E; I've found that to be a great resource as well, both in terms of searching previously asked questions as well as responding to my own queries.

Not sure about current demands, but most of those types of operations have voltage limitations (many require >2.7V or more to function reliably).

Share this post


Link to post
Share on other sites

Thanks.  I finally found a tutorial that may help:

http://codeandlife.com/2012/04/02/simple-fat-and-sd-tutorial-part-1/

By the way, when I first compiled the example code from the PFatFs library, I got a strange warning that appears to be related to the IDE.  Should I report it somewhere?

C:\energia-1.8.7E21\hardware\energia\msp430\cores\msp430\atof.c: In function 'atof':

C:\energia-1.8.7E21\hardware\energia\msp430\cores\msp430\atof.c:71:9: warning: floating constant exceeds range of 'double' [-Woverflow]

Sketch uses 8236 bytes (50%) of program storage space. Maximum is 16384 bytes.
Global variables use 344 bytes (67%) of dynamic memory, leaving 168 bytes for local variables. Maximum is 512 bytes.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×