Only 2 MB of 16 MB available?

jlou88
Posts: 2
Joined: Mon Apr 04, 2022 5:42 pm

Only 2 MB of 16 MB available?

Postby jlou88 » Mon Apr 04, 2022 6:24 pm

I created a esp32-c3 board with a 16 MB of flash, w25q16jvzpm. I get an error when running hello_world and esptool only finds 2 MB.

Do I need to use a different flash chip? Or am I missing something in Menu config?

esptool and hello_world output below

Code: Select all

PS C:\Espressif\frameworks\esp-idf-v4.4\workspace\hello_world> esptool.py flash_id
esptool.py v3.2-dev
Found 6 serial ports
Serial port COM8
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: a0:76:4e:ad:bc:48
Uploading stub...
Running stub...
Stub running...
Manufacturer: ef
Device: 7015
Detected flash size: 2MB
Hard resetting via RTS pin...
PS C:\Espressif\frameworks\esp-idf-v4.4\workspace\hello_world> idf.py -p COM8 -b 115200 monitor
Executing action: monitor
Running idf_monitor in directory c:\espressif\frameworks\esp-idf-v4.4\workspace\hello_world
Executing "C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v4.4\tools/idf_monitor.py -p COM8 -b 115200 --toolchain-prefix riscv32-esp-elf- --target esp32c3 --decode-panic backtrace c:\espressif\frameworks\esp-idf-v4.4\workspace\hello_world\build\hello_world.elf -m 'C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe' 'C:\Espressif\frameworks\esp-idf-v4.4\tools\idf.py' '-p' 'COM8' '-b' '115200'"...
←[0;33m--- WARNING: GDB cannot open serial ports accessed as COMx←[0m
←[0;33m--- Using \\.\COM8 instead...←[0m
←[0;33m--- idf_monitor on \\.\COM8 115200 ---←[0m
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (200) esp_image: segment 4: paddr=000a4cf8 vaddr=4038a1ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42000c44
0x42000c44: uart_ll_get_txfifo_len at c:\espressif\frameworks\esp-idf-v4.4\workspace\hello_world\build/../../../components/hal/esp32c3/include/hal/uart_ll.h:329 (discriminator 1)
 (inlined by) panic_print_char at C:/Espressif/frameworks/esp-idf-v4.4/components/esp_system/panic.c:79 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x1810
load:0x403ce000,len:0xbfc
load:0x403d0000,len:0x2d40
entry 0x403ce000
I (24) boot: ESP-IDF v4.4 2nd stage bootloader
I (24) boot: compile time 08:16:21
I (24) boot: chip revision: 3
I (26) qio_mode: Enabling default flash chip QIO
I (31) boot.esp32c3: SPI Speed      : 80MHz
I (36) boot.esp32c3: SPI Mode       : QIO
I (41) boot.esp32c3: SPI Flash Size : 16MB
I (45) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (69) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (77) boot:  2 factory          factory app      00 00 00010000 00100000
I (84) boot: End of partition table
I (88) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=132b8h ( 78520) map
I (108) esp_image: segment 1: paddr=000232e0 vaddr=3fc8e000 size=02b6ch ( 11116) load
I (110) esp_image: segment 2: paddr=00025e54 vaddr=40380000 size=0a1c4h ( 41412) load
I (121) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=74cd0h (478416) map
I (189) esp_image: segment 4: paddr=000a4cf8 vaddr=4038a1c4 size=03d84h ( 15748) load
I (192) esp_image: segment 5: paddr=000a8a84 vaddr=50000010 size=00010h (    16) load
I (199) boot: Loaded app from partition at offset 0x10000
I (201) boot: Disabling RNG early entropy source...
I (218) cpu_start: Pro cpu up.
I (226) cpu_start: Pro cpu start user code
I (226) cpu_start: cpu freq: 160000000
I (226) cpu_start: Application information:
I (229) cpu_start: Project name:     hello_world
I (234) cpu_start: App version:      v4.4
I (239) cpu_start: Compile time:     Apr  3 2022 08:16:01
I (245) cpu_start: ELF file SHA256:  055cb5510991048f...
I (251) cpu_start: ESP-IDF:          v4.4
I (256) heap_init: Initializing. RAM available for dynamic allocation:
I (263) heap_init: At 3FC94AE0 len 0002B520 (173 KiB): DRAM
I (269) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (276) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (282) spi_flash: detected chip: winbond
I (287) spi_flash: flash io: qio
E (291) spi_flash: Detected size(2048k) smaller than the size in the binary image header(16384k). Probe failed.

ESP_Sprite
Posts: 9749
Joined: Thu Nov 26, 2015 4:08 am

Re: Only 2 MB of 16 MB available?

Postby ESP_Sprite » Tue Apr 05, 2022 2:41 am

No, that's correct. Your chips datasheet indicates the size as 16Mb, or 16 mega-bits (note the lower-case b) which translates to 2MB (mega-bytes). In general, for various reasons, most flash chips have capacity indicated in bits rather than bytes.

jlou88
Posts: 2
Joined: Mon Apr 04, 2022 5:42 pm

Re: Only 2 MB of 16 MB available?

Postby jlou88 » Fri Apr 08, 2022 2:18 am

ESP_Sprite wrote: No, that's correct. Your chips datasheet indicates the size as 16Mb, or 16 mega-bits (note the lower-case b) which translates to 2MB (mega-bytes). In general, for various reasons, most flash chips have capacity indicated in bits rather than bytes.
It's funny I took care not to make that mistake in my post but completely bombed it with the component, thank you! :o

evevlo
Posts: 1
Joined: Sat Dec 17, 2022 5:33 pm

Re: Only 2 MB of 16 MB available?

Postby evevlo » Sat Dec 17, 2022 5:34 pm

Unrelated question, but I'm facing isues with uart on esp32-c3
Did you solved the other issue?

Code: Select all

WARNING Decoded 0x420296a6: uart_ll_get_txfifo_len at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/hal/esp32c3/include/hal/uart_ll.h:329 (discriminator 1)

Who is online

Users browsing this forum: stvlaa and 142 guests