Firmware for ESP-01S on flash ZP25WQ80 is not loaded

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Alex P
Normal user
Posts: 45
Joined: 20 Apr 2022, 05:27
Location: RU

Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#1 Post by Alex P » 26 May 2023, 10:06

Firmware for ESP-01S on flash ZP25WQ80 is not loaded. get flash id : 0x001460ba manufacturer_id: 0xba device_id: 0x6014

INIT : Booting version: ESP_Easy_mega_20230306_normal_ESP8266_1M_VCC, (GitHub Actions) mega-20230306 (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
5308 : Info : INIT : Free RAM:30072
5310 : Info : INIT : Soft Reboot #3 - Restart Reason: Software/System restart
5311 : Info : FS : Mounting...
5317 : Info : FS : Mount successful, used 1506 bytes of 113201
5323 : Error : FS : Error while reading/writing config.dat in 16498
5325 : Info : INIT : I2C
5326 : Info : INIT : SPI not enabled
5431 : Info : WIFI : Set WiFi to STA
10006 : Info : WIFI : Set WiFi to AP+STA
10117 : Info : WIFI : AP Mode ssid will be ESPEasy- with address 192.168.4.1
12405 : Info : WIFI : Disconnected! Reason: '(1)'
12506 : Info : Reset WiFi.
14793 : Info : WIFI : Set WiFi to OFF

PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults... using default settings
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (0):
epc1=0x4000e25d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3fff25c0 end: 3fff2850 offset: 0190
3fff2750: 00000001 3fff0eb0 3fff0a08 00000000
3fff2760: 402759ee 00000000 3fff46cc 40275af5
3fff2770: 0000001c 00000000 00000000 00000000
3fff2780: 00000003 00000000 3fff46cc 40275d2a
3fff2790: 3fff1710 00000001 3fff1710 00000000
3fff27a0: 00000000 00000001 3fff1710 4026fe28
3fff27b0: 00000000 3fff1710 0000000a 4027588e
3fff27c0: 00000000 0000001c 00000000 4026fda0
3fff27d0: 3fff1710 3fff0468 00000000 40238b8c
3fff27e0: 3fff0868 3fff0468 3fff0eb0 40238968
3fff27f0: 3fff0000 0036003f 80efeffe 3fff3700
3fff2800: 0000003f 80efeffe feefeffe feefeffe
3fff2810: feefeffe feefeffe feefeffe 3fff289c
3fff2820: 3fffdad0 00000000 3fff2858 4020a3dc
3fff2830: feefeffe feefeffe feefeffe 40272d77
3fff2840: feefeffe feefeffe 3ffe8694 401004dd
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#2 Post by TD-er » 26 May 2023, 15:08

Can you try to power-cycle?
The unit has the flash protection active and this protection will be kept active in RTC memory, so a crash/reboot will not reset this protection.

User avatar
Alex P
Normal user
Posts: 45
Joined: 20 Apr 2022, 05:27
Location: RU

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#3 Post by Alex P » 29 May 2023, 08:04

I flashed Wled, Tasmota, they work fine.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#4 Post by TD-er » 29 May 2023, 11:17

Alex P wrote: 29 May 2023, 08:04 I flashed Wled, Tasmota, they work fine.
But did you power cycle that unit after the failed attempts of ESPEasy to create a settings file?

User avatar
Alex P
Normal user
Posts: 45
Joined: 20 Apr 2022, 05:27
Location: RU

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#5 Post by Alex P » 29 May 2023, 11:40

Yes, ESPEasy cannot write the settings file.
It seems to me that the problem here is the same as with PUYA, ESPEasy does not know this type of flash, and cannot apply the appropriate algorithm.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#6 Post by TD-er » 29 May 2023, 11:59

I can add the vendor ID (0xBA) to the PUYA check:

Code: Select all

bool flashChipVendorPuya() {
  const uint8_t vendorId = getFlashChipVendorId();

  return vendorId == 0x85 || // 0x146085 PUYA
        vendorId == 0xBA; // ZP25WQ80 0x001460BA
}
Can you make your own build, or should I make a PR for it including a GH Actions build for you to test?

Edit:
Made a PR for it:
https://github.com/letscontrolit/ESPEasy/pull/4683
Actions build: https://github.com/letscontrolit/ESPEas ... 5110807164

User avatar
Alex P
Normal user
Posts: 45
Joined: 20 Apr 2022, 05:27
Location: RU

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#7 Post by Alex P » 29 May 2023, 12:05

An error has crept into the chip name correct ZD25WQ80
Attachments
ZD25WQ80B.zip
(1.25 MiB) Downloaded 103 times
Last edited by Alex P on 29 May 2023, 12:12, edited 1 time in total.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#8 Post by TD-er » 29 May 2023, 12:07

I already made a PR for it, see edits in my previous post.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#9 Post by TD-er » 29 May 2023, 12:10

Hmm I just realized this is only in the ESPEasy code, not yet in the Arduino code... That might need a bit more tweaking :(
So the build will probably not work

User avatar
Alex P
Normal user
Posts: 45
Joined: 20 Apr 2022, 05:27
Location: RU

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#10 Post by Alex P » 29 May 2023, 12:18

I have not yet learned how to make my own builds, I download the finished *.BIN

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Firmware for ESP-01S on flash ZP25WQ80 is not loaded

#11 Post by TD-er » 29 May 2023, 12:19

That build will not work, as it should be fixed in the Arduino code:

in flashWriteUnalignedMemory:

Code: Select all

#if PUYA_SUPPORT
        if (getFlashChipVendorId() == SPI_FLASH_VENDOR_PUYA) {
            for (size_t i = 0; i < wlen ; ++i) {
                buf[offset + i] &= data[i];
            }
        } else {
#endif
            memcpy(&buf[offset], data, wlen);
#if PUYA_SUPPORT
        }
#endif

Code: Select all

bool EspClass::flashWrite(uint32_t address, const uint32_t *data, size_t size) {
    SpiFlashOpResult result;
#if PUYA_SUPPORT
    if (getFlashChipVendorId() == SPI_FLASH_VENDOR_PUYA) {
        result = spi_flash_write_puya(address, const_cast<uint32_t *>(data), size);
    }
    else
#endif
    {
        result = spi_flash_write_page_break(address, const_cast<uint32_t *>(data), size);
    }
    return result == SPI_FLASH_RESULT_OK;
}

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests