Multi-flash chips, how to select?

mryboy
Posts: 3
Joined: Thu May 21, 2020 9:56 am

Multi-flash chips, how to select?

Postby mryboy » Thu May 21, 2020 10:17 am

My MCU is ESP32 PICO D4. There are two flash chips on my board(Include the intergrated one). Just the CS# connects with different pins( GPIO16 and GPIO15). Now, the GPIO16 chip is the main chip(download and boot on this chip) . How to make the GPIO15 chip as the main chip? Or, how to map two chips' address to the system partition address?
Thanks!

ESP_Angus
Posts: 2148
Joined: Sun May 08, 2016 4:11 am

Re: Multi-flash chips, how to select?

Postby ESP_Angus » Fri May 22, 2020 3:36 am

Hi,

It's not possible to configure ESP32-PICO-D4 to boot from the external flash, this SPI configuration is programmed into the chip's OTP efuse bits.

It's also not possible for both the SPI flash chips to be mapped into the address space at the same time, unfortunately. It's technically possible in the hardware to switch the flash cache from using the internal to the external flash chip (meaning all instruction & data flash mappings would move to this chip), but this isn't a configuration we support in ESP-IDF.

ESP-IDF includes an example for mounting a filesystem on an external flash chip on a different SPI bus:
https://github.com/espressif/esp-idf/tr ... lash_fatfs

This example uses all different pins for the external SPI bus, so none of the pins from the main SPI flash chip are shared with the second flash chip.

In ESP-IDF v4.2 we have added support for attaching additional SPI devices on the same bus as the main SPI flash (this bus is SPI1), sounds the same as what you have. However please note that the main SPI flash cache needs to be disabled whenever the second device is accessed - this can slow down execution if there is a lot of access to the second device. You can read more about this feature here. However as the documentation notes, this is a feature for advanced developers.

mryboy
Posts: 3
Joined: Thu May 21, 2020 9:56 am

Re: Multi-flash chips, how to select?

Postby mryboy » Fri May 29, 2020 5:38 am

What a pity. Thanks for your answer.

Who is online

Users browsing this forum: Google [Bot] and 13 guests