cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with saving configuration set to flash in SPWF04SС.

AZver.2
Associate II

Configuration settings are changed via AT commands. By command “at + s.wcfg�? they should be saved to flash. The answer - “AT-S.OK�?. But the next time you turn it on, the factory settings are set. What needs to be done to save custom configuration set?

7 REPLIES 7
Elio Cometti
Senior II

Hello,

The command "AT+S.WCFG" actually save the configuration to flash.

The configuration is restored to factory when:

  • AT+S.FCFG command is used
  • GPIO0 high at start-up, or reset line not stable (you should read "+WIND:65:Factory Reset:0" on serial console)
  • CRC check failure on saved configuration (you should read "+WIND:65:Factory Reset:1" on serial console)

Do you match any of these three cases?

Regards

AZver.2
Associate II

Thanks for the answer. It looks like a third cases. Here's what I get on the serial console when I turn on the power:

+WIND:1:Poweron:170216-fd39c59-SPWF04S

+WIND:13:Copyright (c) 2012-2017 STMicroelectronics, Inc. All rights Reserved:SPWF04SC

+WIND:65:Factory Reset:1

+WIND:0:Console active

+WIND:3:Watchdog Running:20

+WIND:32:WiFi Hardware Started

How can you restore the CRC of the configuration set? I tried to issue the command "at + s.fcfg" and then save to flash again. Nothing changed.

Elio Cometti
Senior II

Hello,

A CRC check failure may occur if something goes wrong in saving the configuration into the internal memory. This may also happen if the device resets during the boot phase for example because of a drop on power supply. My suggestion is to check the integrity of the power supply especially at boot time.

Furthermore, it looks the FW on your device is quite old (dated 2017.02.16). I kindly suggest to upgrade the SPWF04S to a more recent release that fixes several bugs.

Regards

AZver.2
Associate II

Where can I get a more recent firmware? Can you post it here? And how can it be updated by UART?

Regards.

AZver.2
Associate II

Hello.

The save issue has been resolved. I controlled the reset pin of the SPWF04 module from my controller (STM32L151RDT6) and the message “+ WIND: 65�? appeared. I pulled up this pin to power through a resistor, and turned off the control from the controller. In this regard, I have a question: what are the requirements for the "RESET" signal of the SPWF04 module?

Regards.

Elio Cometti
Senior II

Hello,

not sure I got your point, I'll try to answer anyway...

The reset requirements are the same as per STM32F4 which is the main controller on the SPWF04.

There is already a weak pull-up on the reset line. An internal circuitry in the STM32 keeps the reset line low until the power reaches the required value (and pulls the line down if the power drops). Furthermore, you can connect a 100nF capacitor between reset and ground to filter the reset line against external noise.

If you want to control the reset by your controller then I see two options:

  • keep the reset line low until the controller is able to reliably drive the line (the SPWF04S will then boot as soon as the controller releases the line), or
  • leave the SPWF04S complete the boot sequence and then keep control of the reset line (i.e. do not pull the reset down until the boot sequence is completed)

Hope it answer,

Regards

AZver.2
Associate II

Hello.

Elio, thanks for the work you did. My problem has been resolved. The problem turned out to be an incorrect reset of the module. The reset pin of the SPWF04 module was connected to the controller pin and, apparently, I carried out the reset until the end of the boot sequence. I disconnected the reset control of the SPWF04 module from the controller and pulled this pin to power through a resistor.

Thanks again for your help.

Regards, Zverev Andrey.