Page 1 of 1

ROM, RAM and flash difference and usage

Posted: Thu Jul 12, 2018 11:09 am
by abrakada
Hello, what is the difference between ROM and FLASH memory usage? In my project i expect to use esp32 IC (not module), write some code, compile it, then program hex file using programmer/debugger. Where the hex will be stored, in ROM or in FLASH? So, if i want my program to run from a non volatile memory is it enough to have a chip with zero flash size, say ESP32-D0WD. Or i need use ESP32-D2WD with 2 Mb of flash.

Is it possible to rewrite ROM from code?

Re: ROM, RAM and flash difference and usage

Posted: Sat Jul 14, 2018 3:51 pm
by WiFive
ROM stands for Read Only Memory so yes you need flash. D0WD uses external flash.

Re: ROM, RAM and flash difference and usage

Posted: Sat Jul 14, 2018 5:09 pm
by fly135
Your code is burned into flash. When the code runs it is pulled from the flash and run from internal ram cache.

John A

Re: ROM, RAM and flash difference and usage

Posted: Sun Jul 15, 2018 3:35 am
by ESP_Sprite
Also, the ESP32 does have ROM, but it's true ROM, as in Read-Only Memory, as in it's part of the design of the chip and (unless you are going to decap the chip and physically modify the ROM bits using a FIB station or something), you're not going to be able to change even a single bit of that. It's non-flashable. The attached flash chip, in contrast, is all yours to flash and put your code in.

Re: ROM, RAM and flash difference and usage

Posted: Sun Jul 15, 2018 3:00 pm
by Franco
A module would be a safer approach, if you use an ESP32 chip you will have to design the RF section which is not such an easy job. As far as your specific question, as answered previously, your code will be stored in the SPI flash which is: inside the ESP32-WROOM-32 module, outside if you use an ESP32-D0WD (Q6) or an ESP32-S0WD, inside the chip package if you use an ESP32-D2WD.

Re: ROM, RAM and flash difference and usage

Posted: Thu Nov 01, 2018 8:07 am
by abrakada
Hello, thanks all. Unfortunately i noticed answers only now. Seems forum doesn't send notifications about replies. Anyway big thanks