There is a new version of Espressif ESP32The ESP32-S31 and the same ESP32 come with a Gigabit Ethernet MAC, a USB 2.0 Hi-Speed host controller, a dual-slot SD card interface, and a camera input. It’s a fairly standard set of features for a Linux single-board computer, but it’s a very strange list of things you can find on a microcontroller.
I’ve spent a lot of time with microcontrollers, and it’s common to find multiple cores, a small amount of RAM, GPIO pins, and maybe Wi-Fi on one. An advanced one usually uses a Raspberry Pihowever, the ESP32-S31 comes with much more than a typical microcontroller setup. Espressif has also made a big change to the processor, making it even more SBC-like than before.
Peripherals have already changed its appearance
It can do more than that
The biggest news about the ESP32-S31 is its networking capabilities, a 1000 Mbps Ethernet MAC and the slower 100 Mbps hop found on the ESP32-P4. It uses an 8P8C connector (commonly called RJ45) and has a PHY that uses the chip’s RGMII interface. RGMII is something special that allows gigabit; otherwise it uses standard RMII.
Also, there is a USB, but it is not a “standard” USB. The S31 has a USB 2.0 Hi-Speed OTG controller, and it’s a full-size Type-A socket that can supply 500mA in host OTG mode. It also has a dual-slot SDIO host controller, an 8- to 16-bit DVP camera interface, and a parallel LCD controller that supports 24-bit RGB and I8080 and MOTO6800 panels. There are two I2S controllers with hardware Bluetooth audio sync, fourteen capacitive touch channels, a CAN FD controller and four MCPWM units.
From this listing alone, it’s clear that this is a new type of ESP32 and not something we’ve seen before. A wired network? USB host? Camera, display, audio? Everything here looks more like an SBC than a microcontroller, but that’s not all.
On the CPU side, there are two 32-bit RISC-V cores running at up to 320 MHz and each with a floating-point block, a 128-bit SIMD data line for one, and a separate low-power core at 40 MHz. Each core gets a 32 KB L1 instruction cache and they share a 64 KB data cache. Memory gets even more interesting: the S31 supports 64MB of PSRAM via a 250MHz 8-bit DDR interface and also supports flash up to 256MB. In the ESP32-S3, the PSRAM interface was shared with flash, which was a huge step forward.
Espressif put a real MMU inside the ESP32-S31
It is completely different from the old “MSU”.
Espressif has been using the term “MMU” for a long time, including in the ESP32-S3 and ESP32-P4. However, in this case, the MMU was a unit that mapped external flash and PSRAM to address space, nowhere near the complexity of a modern MMU, but could also do things like process isolation and page tables. As a result, when Espressif said the S31 had MMU support, it appeared to be the same.
However, this time there is a big difference. The S31 datasheet states that the Espressif cores implement “Sv32 two-level page-table address translation” and “Machine, controller, and user privilege modes.” Sv32 is a real RISC-V paging scheme, and having all three privilege modes allows a regular kernel to run in supervisor mode with firmware underneath it in machine mode. This is how RISC-V based Linux machines work.
Unlike previous botched attempts to run Linux on previous ESP32 microcontrollers, the S31 is much more out of the box to support it natively. Already posted by Espressif for starters Linux BSP was built in August based on Buildroot and U-Boot and includes a kernel, device tree, and root filesystem. Espressif says it’s “not yet recommended for production,” but here’s the thing works.
That didn’t stop the community from rapidly replicating, either. One port Linux 6.18 with working drivers for almost all hardware will see you running in supervisor mode. There is otherbased on Linux 7.1 supporting an attached 800×480 LCD panel that can display the console. Connecting the display, using the wired Ethernet network, and using the mouse and keyboard sound more like SBC sound than a microcontroller.
Memory is the biggest downfall
Much less than SBC competitors
The S31 starts to fall behind when we look at the RAM it carries: the chip has 512KB of SRAM, and two versions come in 16MB or 32MB of PSRAM. The maximum the memory it can carry is 64 MB and there is no DRAM controller anywhere. Compared to the likes of the Milk-V Duo S with 512MB of RAM, the competition will quickly remind you that it’s the ESP32-S31. is microcontroller.
It is for this reason that Linux builds execute the kernel from flash to avoid wasting precious PSRAM. There’s also no onboard GPU or NPU, either ESP32-P4 with video encoding and MIPI interfaces, which are sold on the S31 for additional radios. You still get the JPEG codec, 2D pixel processing accelerator, and 2D DMA, but it’s not enough to render a full Linux desktop.
The clock speed raises some questions about gigabit Ethernet NICs. At 320 MHz, you get about 3900 CPU cycles per maximum size Ethernet frame and about 215 cycles per minimum size frame. With a theoretical PSRAM max of 500 MB/s, you can approach those gigabit speeds for bulk transfers, but I’d be skeptical when it comes to the saturation associated with many small packet transfers.
These radios are a big deal because comparable SBCs for the price skip the on-board wireless stack. You get 2.4GHz Wi-Fi 6, Bluetooth 5.4 with LE and Classic BR/EDR, and an 802.15.4 radio for Thread and Zigbee, along with gigabit MAC. Matter works over Wi-Fi and Thread, and going back to Bluetooth Classic for a moment, it’s very special to have it on the ESP32. But this means that the old audio device will work perfectly.
Power consumption is pretty good even for these radios, with Wi-Fi consuming 110mA to 117mA depending on receive mode, 802.11b peaking at 265mA at 15dBm and both cores in the modem being peripheral at 320MHz or 91mA4mA off. This is the power profile of the microcontroller regardless of the set of SBC peripherals.
The name “S31” is a bit messy
But the rest is very good
It’s strange that this is called an “S31” board; “S31” refers to the S3 version, although it is completely unrelated to the regular S3. Espressif defines the S-series as “high-performance feature-rich SoCs,” with no relation to the instruction sets, but the big difference between the two groups was the RISC-V cores used in the C-series and the Xtensa LX7 cores used in the S-series.
In the comment section HackadayJeroen Domburg, technical marketing manager at Espressif, said: “We never intended the processor architecture to be part of the name.” It also claims that the core is derived from the P4, putting the S31 at almost twice the speed of the S3.
Unfortunately, the S31 datasheet is still out of date, version #0.5, and the big “COMING” watermark is stuck on the first page. it’s very detailed and mostly consistent, but one example of its early status is listed as having a maximum clock speed of 80 MHz for PSRAM; Directly contradicts Espressif’s published 250MHz PSRAM speed. To be fair, the slightly messy documentation is not unusual for Espressif, but it’s a testament to how early we entered the ESP32-S31 life cycle. The Linux side is just a toy to play with and will be for a while.
The S31 is not an SBC, but it is is The first ESP32, where many of its features, peripherals, bandwidth and processor advantages are modeled close to modern SBCs. The gap between a microcontroller with decent I/O and an SBC has closed in the last couple of years, and while you still can’t run a desktop on 16MB of PSRAM, you can run a Linux terminal without too much trouble. And this is the first step.