SDK saves configuration at [end flash] - 0x3000..0x1000 bytes.
Changing size of the flash after boot -> will switch the address config stored SDK.
On the next boot, configs will be read from another area.
The result - not sets configs and setings WiFi
The simplest solution, can use calls() wifi_set + ...setings :
1) Restore the size of the Flash in 512kb
2) Run the calls() settings -> configs on 0x7E000.
3) Change the size of a flash back and work next...
And so every time.
#include "spi_flash.h"
extern SpiFlashChip * flashchip;
if(flashchip->deviceId == 0x00newid) flashchip->chip_size = 0x???00000;
else flashchip->chip_size = 0x0080000;Works with 16MB changing flashchip-> chip_size:
SpiFlashOpResult spi_flash_erase_sector(uint16 sec);
SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size);
SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size);