Peabody 15 Posted March 25, 2019 Share Posted March 25, 2019 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. Quote Link to post Share on other sites
NurseBob 111 Posted March 26, 2019 Share Posted March 26, 2019 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). Quote Link to post Share on other sites
NurseBob 111 Posted March 26, 2019 Share Posted March 26, 2019 Also, though for a different chip, you might find the discussion and code for "Simple MSP430F5529 bootloader" useful too. Quote Link to post Share on other sites
Peabody 15 Posted March 27, 2019 Author Share Posted March 27, 2019 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.