cancel
Showing results for 
Search instead for 
Did you mean: 

fsupdate using Micropython on SPWFF04SA

Shep Smith
Associate II
Posted on June 11, 2018 at 15:58

I'm trying to implement a fsupdate through the micropython module machine on my NUCLEO-IDW04A1 (currently MicroPython v1.8.7-149-g476c672 on 2017-02-22; SPWF04Sx with STM32F439). I have successfully updated through the AT command set, but for my application I need to do it within my main python loop.

I can't find documentation anywhere for that function. By querying it I found out it takes 3 parameters, but what those are, I have no idea.

Has this function actually been implemented yet, and if so, does anyone have access to the documentation?

#fsupdate #micropython #spwf04sa
1 REPLY 1
Shep Smith
Associate II
Posted on June 11, 2018 at 16:49

Through guess and check I have figured out that the parameters are....

fsupdate( (ip_addr, port) , file_name.img, mem_id)

where mem_id can be 'i' for application flash, 'e' for user flash, and 'x' for external volume.

So this code worked for me.

from machine import fsupdate

ap = ('123.456.789.212',80)   # ip address changed for security

fsupdate(ap,'FatVolume.img','i')

Now my updated question is, if I want to do a secure update with TLS, is there another function for that or do I just add some parameters to this one?