How i can use OTA and SPI flash together

amalamal
Posts: 23
Joined: Mon Dec 12, 2016 7:07 am

How i can use OTA and SPI flash together

Postby amalamal » Tue Nov 14, 2017 10:57 am

Hi

I tried the example "wear_levelling" in esp32 to store some data in the SPI flash, for working with this example we changed the partition type to csv and made a partition "partitions_example.csv" and it is working, writing and reading in spi flash happening. But i need to work with OTA also same time, but for OTA the partition type is different, if i change to it the spi flash write wont work, How i can fix it, Any suggestion please.


Thanks

NateBowen
Posts: 1
Joined: Thu Nov 16, 2017 8:26 pm

Re: How i can use OTA and SPI flash together

Postby NateBowen » Thu Nov 16, 2017 9:18 pm

I'm also interested in this. I'd like to update a SPIFFS partition with OTA. However, the documentation is clear that the OTA partition must of the app type with ota_x subtype. I tried to mount a SPIFFS partition with those settings in the partition table. Not surprisingly, it failed:

Code: Select all

E (272) SPIFFS: spiffs partition could not be found
Are there any known workarounds for this? Any future plans for extending OTA beyond the app partitions?
Last edited by NateBowen on Wed Nov 22, 2017 3:16 pm, edited 1 time in total.

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: How i can use OTA and SPI flash together

Postby ESP_Sprite » Sat Nov 18, 2017 1:42 pm

If you need to update a non-OTA partition, you should be able to just use the SPI flash partition read/write/erase API. Just make sure the spiffs is unmounted first.

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: How i can use OTA and SPI flash together

Postby Gfast2 » Sun Nov 19, 2017 3:27 pm

ESP_Sprite wrote:If you need to update a non-OTA partition, you should be able to just use the SPI flash partition read/write/erase API. Just make sure the spiffs is unmounted first.
I think we just need some idiomatic way to handle files upload for file update in spiffs. I believe kolban's book has some secret recipe for this.

Dose ESP-IDF has a webserver as a stock component? I can image how to get new "app.bin" and all files that need to be updated in spiffs from SD card through the right now APIs from ESP-IDF. But how to update these files wirelessly?

Cheers

Gfast2

Who is online

Users browsing this forum: Bing [Bot] and 363 guests