cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF04S User Flash & Micropython

Matteo Pezzoli
Associate II
Posted on May 16, 2017 at 11:48

Hi,

I finally got my hands on the SPWF04S module; it works great, but i have some questions about the user flash and the micropython functionalities:

First of all, how can i write on the user flash? Is the AT+S.FSUPDATE command the only way to create files on the user flash, or is there any other way?

Following up on that question, let's say i manage to put a python script on the user flash (using FSUPDATE command or any other method); can that script be launched with the usual AT+S.PYTHON command?

Thank you

#spwf04sa
3 REPLIES 3
Posted on May 16, 2017 at 12:19

Ciao Matteo,

yes to all of your questions

STM32 flash cannot be written by AT+S.FSC command, since this device has no pages, and typical sector size is 128KB. Difficult to manage by FAT without a huge RAM. Use FSUPDATE (wireless) or FLASHER/ST-LINK (wired UART/SWD).

You can use FSC command with RAM files and SDCard files.

About Python, it performs a search within all volumes, from 0 (SPI flash or SDCard) to 3 (APP disk). It executes the first found file. Example: 0:/example.py has 'higher priority' than 3:/example.py

Posted on May 16, 2017 at 15:51

Thank you Gerardo, i will try to upload a firmware image with my script already in it using one of the two methods. Not quite on topic, but i'll ask another question: i was trying out some micropython scripts, but i get an error on 'import uio', saying that there is no module named uio (i also tried 'import io'). Any insight on this?

Thank you again

Matteo

Posted on May 16, 2017 at 17:53

Probably that module was not included inside FW1.0.0. Thanks to you for the feedback.