I developped a custom board based on NINA-W102 which embeds an ESP32-D0WQ6-V3. This board is connected through HSPI to an external Flash chip 16MB W25Q128 from Winbond.
When I flash a test code to the 2MB internal Flash, W25Q128 is well recognized with ID: EF 40 18, but SPI frequency needs to be reduced to 20MHz instead of 40MHz or 80 MHz (otherwise flash chip ID is wrong).
The final firmware will exceed the 2MB internal flash so I would like to use W25Q128 as main flash memory for firmware. I currently succeeded in flashing the board through HSPI but I can't find the way to boot from this external flash.
For flash, here is the command:
Code: Select all
python -m esptool --no-stub --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash -sc HSPI --flash_mode dout --flash_size detect --flash_freq 20m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello_world.bin
However when I monitor the output, the board is booting from internal flash (boot:0x33 (SPI_FAST_FLASH_BOOT)) and resetting all the time since there is no firmware inside.
The result of monitor: Ideally if the boot is through HSPI, I should see boot:0xb (HSPI_FLASH_BOOT) at the beginning. Does anyone know how can I achieve that ?