The ESP-WROOM32 developed by Espressif is based on the ESP32 microcontroller that boasts Wifi, Bluetooth, Ethernet and Low Power support all in a single chip.
The ESP-WROOM32 module is supported as a Zerynth customizable Virtual Machine, therefore the pinmap must be defined by the user. Please refer to here for more info on creating custom Virtual Machines.
The internal flash of the module is organized in a single flash area with pages of 4096 bytes each. The flash starts at address 0x00000, but many areas are reserved for Esp32 IDF SDK and Zerynth VM. In particular:
|0x00009000||16Kb||Esp32 NVS area|
|0x0000D000||8Kb||Esp32 OTA data|
|0x0000F000||4Kb||Esp32 PHY data|
|0x00110000||1Mb||Zerynth VM (FOTA)|
|0x00290000||512Kb||Zerynth Bytecode (FOTA)|
|0x00310000||512Kb||Free for user storage|
Microcontroller: Tensilica 32-bit Single-/Dual-core CPU Xtensa LX6
Operating Voltage: 3.3V
Input Voltage: 7-12V
Digital I/O Pins (DIO): 28
Analog Input Pins (ADC): 8
Analog Outputs Pins (DAC): 2
Flash Memory: 4 MB
SRAM: 520 KB
Clock Speed: 240 Mhz
Wi-Fi: IEEE 802.11 b/g/n/e/i:
- Integrated TR switch, balun, LNA, power amplifier and matching network
- WEP or WPA/WPA2 authentication, or open networks
Connect, Register, Virtualize and Program¶
The workflow for custom Virtual Machines varies depending on the feature of the PCB hosting the module. Registration, virtualization and programming can be done both through an usb-to-serial converter linked to one of the serial port of the ESP-WROOM32 or through jtag.
Firmware Over the Air update (FOTA)¶
The Firmware Over the Air feature allows to update the device firmware at runtime. Zerynth FOTA in the ESP-WROOM32 device is available for bytecode and VM.
Flash Layout is shown in table below:
|0x00010000||1Mb||Zerynth VM (slot 0)|
|0x00110000||1Mb||Zerynth VM (slot 1)|
|0x00210000||512Kb||Zerynth Bytecode (slot 0)|
|0x00290000||512Kb||Zerynth Bytecode (slot 1)|
For Esp32 based devices, the FOTA process is implemented mostly by using the provided system calls in the IDF framework. The selection of the next VM to be run is therefore a duty of the Espressif bootloader; the bootloader however, does not provide a failsafe mechanism to revert to the previous VM in case the currently selected one fails to start. At the moment this lack of a safety feature can not be circumvented, unless by changing the bootloader. As soon as Espressif relases a new IDF with such feature, we will release updated VMs.
Secure Firmware feature allows to detect and recover from malfunctions and, when supported, to protect the running firmware (e.g. disabling the external access to flash or assigning protected RAM memory to critical parts of the system).
This feature is strongly platform dependent; more information at Secure Firmware - ESP32 section.
Not all IDF features have been included in the Esp32 based VMs. In particular the following are missing but will be added in the near future:
- BLE support
- Touch detection support