ROM, RAM and flash difference and usage

abrakada
Posts: 4
Joined: Thu Jul 12, 2018 10:46 am

ROM, RAM and flash difference and usage

Postby abrakada » Thu Jul 12, 2018 11:09 am

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?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ROM, RAM and flash difference and usage

Postby WiFive » Sat Jul 14, 2018 3:51 pm

ROM stands for Read Only Memory so yes you need flash. D0WD uses external flash.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: ROM, RAM and flash difference and usage

Postby fly135 » Sat Jul 14, 2018 5:09 pm

Your code is burned into flash. When the code runs it is pulled from the flash and run from internal ram cache.

John A

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

Re: ROM, RAM and flash difference and usage

Postby ESP_Sprite » Sun Jul 15, 2018 3:35 am

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.

Franco
Posts: 104
Joined: Thu Dec 10, 2015 1:11 pm

Re: ROM, RAM and flash difference and usage

Postby Franco » Sun Jul 15, 2018 3:00 pm

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.

abrakada
Posts: 4
Joined: Thu Jul 12, 2018 10:46 am

Re: ROM, RAM and flash difference and usage

Postby abrakada » Thu Nov 01, 2018 8:07 am

Hello, thanks all. Unfortunately i noticed answers only now. Seems forum doesn't send notifications about replies. Anyway big thanks

Who is online

Users browsing this forum: aygh4266, Google [Bot] and 119 guests