spi flash 读写

rwj112358
Posts: 15
Joined: Sat Sep 04, 2021 1:12 pm

spi flash 读写

Postby rwj112358 » Tue Feb 15, 2022 3:34 am

在ESP32中,使用esp_ota_write()来写flash,并将返回值打印出来。却出现了如下结果:
[11:21:07.083] [0;31mE (108967) esp_ota_ops: OTA image has invalid magic byte (expected 0xE9, saw 0x00)[0m
[11:21:07.083]
[11:21:07.083] flash status: 5379


这个5379是啥意思,flash写是出现了什么问题。

使用OTA写函数如下:
write_status=esp_ota_write( update_handle, (const void *)flashWriteBuf, 1024);
printf("\r\n flash status: %d \r\n",write_status);

OTA初始化部分如下:
esp_err_t err = ESP_OK;
esp_ota_handle_t update_handle = 0;
const esp_partition_t *update_partition = NULL;
update_partition = esp_ota_get_next_update_partition(NULL);
err = esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &update_handle);

Who is online

Users browsing this forum: virgil and 79 guests