2017-05-16 02:48 AM
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
#spwf04sa2017-05-16 03:19 AM
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
2017-05-16 08:51 AM
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
2017-05-16 10:53 AM
Probably that module was not included inside FW1.0.0. Thanks to you for the feedback.