Page 1 of 1

flash read err, 1000 ets_main.c 371

Posted: Wed Jul 03, 2019 2:00 pm
by ltmerlin
Hi,

I flashed a brand new ESP32 Thing Plus with a recent MicroPython firmware binary (from https://micropython.org/download/#esp32). (first erased properly and then flashing with the esptool as described below)
  1. esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 --before default_reset --after hard_reset erase_flash
  1. esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash -z --flash_freq 40m --flash_mode dio --flash_size=16MB 0x1000 esp32-20190529-v1.11.bin
Everything works fine except at startup I see the error message "flash read err, 1000
ets_main.c 371
" like you can see below at the first few lines:
  1. ets Jun  8 2016 00:22:57
  2.  
  3. rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
  4. flash read err, 1000
  5. ets_main.c 371
  6. ets Jun  8 2016 00:22:57
  7.  
  8. rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
  9. configsip: 0, SPIWP:0xee
  10. clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
  11. mode:DIO, clock div:2
  12. load:0x3fff0018,len:4
  13. load:0x3fff001c,len:4928
  14. ho 0 tail 12 room 4
  15. load:0x40078000,len:9332
  16. load:0x40080400,len:6216
  17. entry 0x400806e8
  18. I (433) cpu_start: Pro cpu up.
  19. I (433) cpu_start: Application information:
  20. I (433) cpu_start: Compile time:     07:44:16
  21. I (435) cpu_start: Compile date:     May 29 2019
  22. I (441) cpu_start: ESP-IDF:          v3.3-beta1-268-g5c88c5996
  23. I (447) cpu_start: Starting app cpu, entry point is 0x4008294c
  24. I (0) cpu_start: App cpu up.
  25. I (458) heap_init: Initializing. RAM available for dynamic allocation:
  26. I (465) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
  27. I (471) heap_init: At 3FFB9B88 len 00026478 (153 KiB): DRAM
  28. I (477) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
  29. I (483) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
  30. I (490) heap_init: At 40093398 len 0000CC68 (51 KiB): IRAM
  31. I (496) cpu_start: Pro cpu start user code
  32. I (67) cpu_start: Starting scheduler on PRO CPU.
  33. I (0) cpu_start: Starting scheduler on APP CPU.
  34. MicroPython v1.11 on 2019-05-29; ESP32 module with ESP32
  35. Type "help()" for more information.
  36. >>>
Using other firmware versions does not help to resolve it.


When I run the following commands to get the filesystem sizes:
  1. import os
  2. fs_stat = os.statvfs('/')
  3. fs_size = fs_stat[0] * fs_stat[2]
  4. fs_free = fs_stat[0] * fs_stat[3]
  5. print("File system size {:,} - Free space {:,}".format(fs_size, fs_free))
  6.  
  7. File system size 2,072,576 - Free space 2,068,480
I only get 2MB of availble or free space while I should get 16MB right?

Running:
  1. import esp
  2. esp.flash_size()
  3. 16777216
I get 16777216, which is the correct 16MB... I would like to write files to the filesystem (which SHOULD have 16MB of space) but I only can write max 2MB to the filesystem.
Any ideas to resolve this flash memory issue?
Or what am I doing wrong?