Jump to content

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:


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.


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.


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).

Link to post
Share on other sites

Thanks.  I finally found a tutorial that may help:


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.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...