Can I replace my MCU with an Espressif’s SoC?
In this difficult time for the world semiconductor companies, Espressif maintains healthy lead times – especially for its SoCs, which do not rely on external memory IC supply.
Espressif’s SoC are general purpose MCU with connectivity peripheral, so using them as a general purpose MCU does not involve any kind of hack or misuse and they are fully equipped with standard digital interfaces like UART/SPI/I2C, 64bit timers etc.
What I need to check?
To help you assessing whether Espressif’s SoCs can be a suitable replacement, we prepared the following list of questions:
Espressif libraries (IDF) are based on FreeRTOS (the real time operating system) and hence all your code will be run as a FreeRTOS task. If you need very fast responses, like in a digital control loop (e.g. motor control, dc-dc converter control etc) then Espressif’s SoCs are not a feasible solution for you.
Espressif’s SoC have generally a low pin count. The SoC with the highest GPIO count number available right now is the ESP32-S2, which has 43 GPIO. If you have a 64 or 100 pin MCU, you have to find another way.
The devices by Espressif have the LED_PWM peripheral which is a 8 channel, up to 18 bits @1ms PWM generator. It also lets you set a gradual increase and decrease of the on-time, which is useful for led color gradient, hence the name.
Modern SoCs by Espressif have 2 x 13bit SAR ADC. SAR ADCs are not fast, so – as mentioned in the first question – if you need fast responses you can’t rely on the internal ADC.
The ESP32-S2 has 2x8bit DAC, which should be ok for most applications.
ESP32-S2 has an on-board USB-PHY and while the firmware is only available for device USB application right now, in the next future the ESP32-S2 and the ESP32-C3 will be able to work as host too.
ESP32-S2 and ESP32-C3 have the so called TWAI peripheral which is fully compatible with the ISO 11898-1 protocol (CAN Specification 2.0).
Even without Bluetooth, there are many applications which require audio management. Espressif SoCs have an I2S peripheral which can act as master or slave mode and in both half and full-duplex operations.
The ESP32-S2 has an LCD peripheral which supports both the 8-bit serial RGB, 8080 and 6800 modes but also the 8/16/24-bit parallel interface (8080).
The ESP32-S2 family has 14 capacitive-sensing GPIOs and a quite robust digital filter-based touch peripheral. If you need less than 15 capacitive touch buttons, then the ESP32-S2 can be your solution.
Which Espressif SoC should I select?
If you reached so far, then it’s time to select the best SoC for your application. At this point, there are two main SoCs
The first one has 44 GPIO, the LCD and touch peripheral. If you need more GPIOs or your application has an HMI, then go for the ESP32-S2. If you can fit everything in 22 GPIOs, then the ESP32-C3 is a good choice.
Espressif’s SoCs come in several formats depending on how much embedded flash or PSRAM you need. Originally, Espressif SoCs didn’t have embedded flash, and you needed to add an external flash chip, but now variants with embedded flash and even PSRAM are available. You can refer to the picture below, taken from the ESP32-S2 datasheet.
The same goes for the ESP32-C3
References
Our team will be happy to support you in integrating an Espressif SoC into your existing products as a replacement for hard-to-find microcontrollers or in realizing new ideas – Contact us!