OTA on ESP32-WROVER Module
OTA on ESP32-WROVER Module
While performing an OTA update on ESP32-WROVER module does the data for OTA need to be in internal RAM?
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: OTA on ESP32-WROVER Module
Not entirely; you can 'stream' an OTA. (Essentially read a few K, write a few K to flash, read a few K, etc.)
Re: OTA on ESP32-WROVER Module
But the buffer needs to be in internal ram since cache will be disabled during flash write, right?
Re: OTA on ESP32-WROVER Module
That's what I wanted to know . since the cache is disabled I need to have the buffer for OTA data to be on the internal ram.WiFive wrote:But the buffer needs to be in internal ram since cache will be disabled during flash write, right?
How do allocate the buffer to internal RAM?
Re: OTA on ESP32-WROVER Module
Howdy @llewellyn,
My understanding is that you can force a memory allocation into ESP32 internal RAM using:
void* heap_caps_malloc(size_t size, uint32_t caps)
for example:
You can release the storage with either free() or heap_caps_free().
My understanding is that you can force a memory allocation into ESP32 internal RAM using:
void* heap_caps_malloc(size_t size, uint32_t caps)
for example:
Code: Select all
uint8_t* pMyRam = heap_caps_malloc(4*1024, MALLOC_CAP_DMA);
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: OTA on ESP32-WROVER Module
or like the ota example:
As a array in global.
Code: Select all
/*an ota data write buffer ready to write to the flash*/
static unsigned char ota_write_data[BUFFSIZE + 1] = {0};
/*an packet receive buffer*/
static unsigned char text[BUFFSIZE + 1] = {0};
Who is online
Users browsing this forum: Bing [Bot] and 128 guests