Writing to flash without crash...
Posted: Wed Apr 05, 2023 5:14 am
Hi.
I want to add custom wi-fi bootloader functional in my app. I made 2 app partitions for firmware and a small firmware for select a partition for boot. I want to write the firmware to an inactive section of the app. But I don't understand how to do it right. If I call function esp_flash_write() or esp_flash_erase_region(), I receive DoubleExeptionVector exception. I think it's a FLASH access collision. I tried calling esp_flash_api_fun->os_func->start(NULL) or spi_flash_op_block_func() before the firmware operation, but it doesn't work. How to work with the flash correctly?
I want to add custom wi-fi bootloader functional in my app. I made 2 app partitions for firmware and a small firmware for select a partition for boot. I want to write the firmware to an inactive section of the app. But I don't understand how to do it right. If I call function esp_flash_write() or esp_flash_erase_region(), I receive DoubleExeptionVector exception. I think it's a FLASH access collision. I tried calling esp_flash_api_fun->os_func->start(NULL) or spi_flash_op_block_func() before the firmware operation, but it doesn't work. How to work with the flash correctly?