Page 1 of 1
OTA on ESP32-WROVER Module
Posted: Sun Aug 06, 2017 2:10 pm
by llewellyn
While performing an OTA update on ESP32-WROVER module does the data for OTA need to be in internal RAM?
Re: OTA on ESP32-WROVER Module
Posted: Sun Aug 06, 2017 8:49 pm
by ESP_Sprite
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
Posted: Sun Aug 06, 2017 10:28 pm
by WiFive
But the buffer needs to be in internal ram since cache will be disabled during flash write, right?
Re: OTA on ESP32-WROVER Module
Posted: Mon Aug 07, 2017 8:41 am
by llewellyn
WiFive wrote:But the buffer needs to be in internal ram since cache will be disabled during flash write, right?
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.
How do allocate the buffer to internal RAM?
Re: OTA on ESP32-WROVER Module
Posted: Fri Aug 11, 2017 11:34 pm
by kolban
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:
Code: Select all
uint8_t* pMyRam = heap_caps_malloc(4*1024, MALLOC_CAP_DMA);
You can release the storage with either free() or heap_caps_free().
Re: OTA on ESP32-WROVER Module
Posted: Sat Aug 12, 2017 7:14 am
by f.h-f.s.
or like the ota example:
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};
As a array in global.