ESP32-S3 External Flash MD5

RAJPUS3
Posts: 7
Joined: Mon Mar 11, 2024 7:16 am

ESP32-S3 External Flash MD5

Postby RAJPUS3 » Mon Mar 11, 2024 11:06 am

We are able to build and flash "external flash demo example" (esp-idf\examples\storage\ext_flash_fatfs) project on our customized esp32s3 (Controller :- ESP32-S3FH4R2) board. It is working perfectly with 8MB(XMC) external flash, but when we test it with 16MB external flash(PN# MX25V16066) application is detecting 2MB flash and FATFS mount is also failed.

Error :-

Wrote 2250592 bytes (1069310 compressed) at 0x00010000 in 39.8 seconds (effective 452.5 kbit/s)...
File md5: 23c2ca618935bce79358f8a79b032b02
Flash md5: e883f3ee8dc5de5406523001e6826930
MD5 of 0xFF is 1889ab1523134acd588243b22d12fc9c

A fatal error occurred: MD5 of file does not match data in flash!
CMake Error at run_serial_tool.cmake:56 (message):
C:/Espressif/python_env/idf4.4_py3.7_env/Scripts/python.exe
C:/Serv/framework_s3/esp-idf/components/esptool_py/esptool/esptool.py
--chip esp32s3 failed

Can you please help us in running demo example with below internal and external flash options?
1. 4MB internal and 16MB external flash
2. Only 16MB external flash
3. Only internal flash
Attachments
16MB_partition_table.png
16MB_partition_table.png (46.96 KiB) Viewed 1923 times

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

Re: ESP32-S3 External Flash MD5

Postby ESP_Sprite » Tue Mar 12, 2024 2:52 am

RAJPUS3 wrote:
Mon Mar 11, 2024 11:06 am
external flash(PN# MX25V16066)

You are getting exactly the result I'd expect. According to the datasheet, that flash chip is 16Mbit, which equals the 2Mbyte esptool.py detects.

RAJPUS3
Posts: 7
Joined: Mon Mar 11, 2024 7:16 am

Re: ESP32-S3 External Flash MD5

Postby RAJPUS3 » Tue Mar 12, 2024 11:25 am

Thank you for your response. I changed the flash memory configuration to include a 16-megabyte external flash and 4 megabytes of internal flash. getting same error

1) I want to use the internal flash, but there is an external flash board attached.
2) I want to utilize both the external and internal flash

can you help how to configure and manage both internal and external flash memory.

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

Re: ESP32-S3 External Flash MD5

Postby ESP_Sprite » Wed Mar 13, 2024 3:24 am

FYI: You cannot connect internal and external flash in parallel and expect it to work. For an ESP32 with internal flash, you can connect flash externally to use as storage (but not to run programs from), but you must connect it to one of the GSPI buses as a 'normal' SPI chip, you cannot hook it up to the same pins as the internal flash.

RAJPUS3
Posts: 7
Joined: Mon Mar 11, 2024 7:16 am

Re: ESP32-S3 External Flash MD5

Postby RAJPUS3 » Wed Mar 13, 2024 5:34 pm

I am working ESP32-S3-WROOM-1-N8R2 module and for project i used custom board use ESP32-S3FH4R2 controller (Internal 4MB and external 8MB flash (XMC IC mounted on the dev kit). set the partitions table for 12MB, it works fine.

However, when switched external Flash 8MB(XMC) to a 2MB Flash from Macronix (MX25V16066), Set partitions for 6MB
(Internal 4MB + external 2MB flash)). but not flash getting error MD5.

Questions :-

1) Is my configuration is right internal and external flash?
2) I have doubts about the actual part number of the XMC IC within the module(ESP32-S3-WROOM-1-N8R2), but I extracted the part number from its IC mark code and attached a PDF. https://www.xmcwh.com/uploads/207/XM25QH64C.pdf
3) Is only XMC manufacture IC supported for external flash? because only XMC IC (8MB) is working with internal flash
4) how disable internal and use external flash?
Attachments
Serial flasher config.txt
(680 Bytes) Downloaded 115 times
6MB.png
6MB.png (15.97 KiB) Viewed 1769 times

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

Re: ESP32-S3 External Flash MD5

Postby ESP_Sprite » Thu Mar 14, 2024 12:24 am

RAJPUS3 wrote:
Wed Mar 13, 2024 5:34 pm
I am working ESP32-S3-WROOM-1-N8R2 module and for project i used custom board use ESP32-S3FH4R2 controller (Internal 4MB and external 8MB flash (XMC IC mounted on the dev kit). set the partitions table for 12MB, it works fine.
There is no way that worked successfully; you likely simply didn't write any data outside of the one flash chip that did work. 1. As I said, you cannot have both internal and external flash accessed by the MSPI controller, and 2. flash doesn't 'add up' like this.
how disable internal and use external flash?
You cannot. You could theoretically re-route the flash pins to different GPIOs using eFuses and boot off external flash that way, but the internal flash will still occupy the original pins. Easiest way to get more flash is to simply exchange your module for one that has it: the ESP32-S3-WROOM-1U-N16R2 has 16 megabytes for instance.

RAJPUS3
Posts: 7
Joined: Mon Mar 11, 2024 7:16 am

Re: ESP32-S3 External Flash MD5

Postby RAJPUS3 » Wed Mar 27, 2024 11:35 am

Thanks for Support,
In the next phase, we are planning to use an external flash instead of an internal one.

Who is online

Users browsing this forum: Baidu [Spider] and 93 guests