Difference between SRAM & SPIRAM
-
- Posts: 18
- Joined: Sun Sep 16, 2018 6:33 pm
Difference between SRAM & SPIRAM
I am wondering what is difference between SRAM & SPIRAM. I am asking this because I am trying to flash micropython to ESP32-CAM and I notices there is Firmware with SPIRAM support on https://micropython.org/download/#esp32. But ESP32-CAM specification has mentioned 520 KB of on-chip SRAM
is there any difference ? or I can use Firmware with SPIRAM support on ESP32-CAM ?
Thanks
is there any difference ? or I can use Firmware with SPIRAM support on ESP32-CAM ?
Thanks
- roy
Re: Difference between SRAM & SPIRAM
ESP-IDF Programming Guide:
ESP32-CAM has 4MB external SPI-RAM chip.The ESP32 has a few hundred KiB of internal RAM, residing on the same die as the rest of the ESP32. For some purposes, this is insufficient, and therefore the ESP32 incorporates the ability to also use up to 4MiB of external SPI RAM memory as memory. The external memory is incorporated in the memory map and is, within certain restrictions, usable in the same way internal data RAM is.
The ESP32 supports SPI (P)SRAM connected in parallel with the SPI flash chip.
Re: Difference between SRAM & SPIRAM
SPIRAM is much slower. Waayyyyyyyy slower.
Sent from my iPhone using Tapatalk Pro
Sent from my iPhone using Tapatalk Pro
-
- Posts: 18
- Joined: Sun Sep 16, 2018 6:33 pm
-
- Posts: 18
- Joined: Sun Sep 16, 2018 6:33 pm
Re: Difference between SRAM & SPIRAM
So its not recommended to use Firmware with SPIRAM support ?
- roy
Re: Difference between SRAM & SPIRAM
If you don’t need more ram than the SRAM, it’s unnecessary.
If you need more ram then on this hw platform that’s your best option.
Sent from my iPhone using Tapatalk Pro
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Difference between SRAM & SPIRAM
it is definitely recommended as you will get 4MB of RAM whereas you otherwise just have 190kB. But if you are concerned about speed and 190kB is enough for you, then you could use a non-psram firmware.
[edit: looks like we wrote at the same time..]
[edit: looks like we wrote at the same time..]
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
-
- Posts: 18
- Joined: Sun Sep 16, 2018 6:33 pm
Re: Difference between SRAM & SPIRAM
Ok, so can still flash Firmware with SPIRAM support on ESP32, but it will be up to application to use it or not.
- roy
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Difference between SRAM & SPIRAM
no if you flash spiram-firmware it will automatically use SPIRAM
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Difference between SRAM & SPIRAM
It is slower, but...
Theoretical SPI-RAM access speed is ~40MB/s.
In final application, for example in MicroPython firmware, SPI-RAM access speed is is ~14 MB/sec.
The access is cached in internal RAM buffer (same as Flash access) and practical results shows it is quite usable if it is used in a way it is suposed to be used.
In the typical MicroPython application there is often no difference if the heap is on internal RAM or external SPI-RAM.