对于spi0和spi1的使用,这个链接里的回答非常清楚:https://github.com/espressif/esp-idf/issues/11663
Here're few ways to access the Flash:
By default most of the ESP-IDF program is placed in the Flash. Accessing code placed in Flash is done by hardware (SPI0).
And we provide the ESP FLASH driver for you to access the Flash for other purpose (e.g. storage). This is via SPI1.
We provide SPI FLASH MMAP driver and MMU MMAP driver for you to access (via SPI0, e.g. by a pointer) those you write to the Flash via ESP FLASH driver.