ESP32-S2 Samples Show Up

The ESP8266 is about six years old now and the ESP32 is getting more mainstream every day. Unsurprisingly, Espressif is developing even newer product and the ESP32-S2 was in the hands of some beta testers last year. Now it is finally landing as “final silicon” samples in people’s hands. [Unexpected Maker] got a few and a prototype development board for the chip and shared his findings in a recent video.

The ESP32-S2 has a single core LX7 running at 240 MHz along with a RISC-V-based coprocessor. Onboard is 320K of RAM and 128K of ROM. You might notice this is less than the ESP32. However, the device can support up to 128MB of external RAM and up to 1GB of external flash. It also supports USB, although the prototype module appears to have an external USB chip on it.

There are no extras like Bluetooth, Ethernet or CAN, but there are 43 GPIO and 14 touch sensors. There are other differences, some plus and some minus. There are two UARTs, down from the ESP32’s three. However, there’s also a camera interface and more crypto hardware. There is a way to use time of flight measurements with WiFi to estimate position, which could be interesting if it works well.

The big news, though, is automatic power management that claims 5uA in idle mode and 24uA [while running the ULP coprocessor] at 1% duty cycle. Honestly, it almost seems like the -S2 is really meant to be a secure ESP8266 more than a next-generation ESP32. That’s not totally fair since the new board has lots more processing power than an ESP8266, but still.

We looked at the -S2 when Espressif announced it. The ESP-32 could operate on relatively low power with effort, but the -S2 should make even lower power operation easier.

56 thoughts on “ESP32-S2 Samples Show Up

  1. But since it is an esp32 we all expect ble+classic Bluetooth along with the wifi. But that is disappointing ☹️. Also single core is again disappointing. I am too much addicted to existing esp32 due to it’s dual core and ble+classic+wifi and even the simultaneous bt+wifi combination. But USB is a drawback in esp32.

    And I am wondering who want 128MB ram and 1GB flash interface for such a humble single core processor? Will get any Linux port in it?

    Power optimization seems impressive. But they could have named it something like esp8270 :)

    1. It’s not supposed to be the next ESP32, it’s just addressing a different part of the market. Low power devices with more GPIO that can also communicate over USB. Opens up a few more areas where the original wasn’t really good.
      What would be the point in making another identical ESP32?

      1. BT or LE on esp32 is very useful especially when we want to do wifi configuration from mobile phone. Also it can be used to control the esp32 while it is still connected to WIFI.
        So I believe Bluetooth is very important and I am working on a product using esp32 by using all the 3 wireless protocols (le+classic+wifi) and I selected it just because it is having a powerful dual core cpu, DMA and bt+wifi combination.

        1. I want to see on without wifi and just LE. I really do not have a problem with the name or removing the BT+LE for this version it is just a different version for a different market.

    2. The three most important characteristics of an IoT device:
      1) Power management
      2) Security
      3) Connectivity

      The first two have been improved in this chiṕ. I don’t need Linux to read a sensor, transmit and save information for 2+ years on batteries.

    3. “And I am wondering who want 128MB ram and 1GB flash interface for such a humble single core processor?”

      Start doing things with audio and you will see the need for ram. Have the device act as a AP and serve up its own web pages and you will see why large flash size is important.

  2. Lower power-consumption with some of the less-used peripherals removed and with the ability to have a humongous amount of RAM? Sounds good to me! This will make for excellent remote-sensors and the likes with ESP NOW and I could certainly come up with ways of using even the whole 128MB RAM.

    I’ll be eagerly awaiting for boards based on this to start appearing on eBay!

  3. Fix the existing underlying buggy, crappy firmware and libraries instead of keep pumping out more useless models.

    Those who run ESP* s over couple of month are know what I talking about. They are full of segfaults, buffer overflows the libraries are half reverse engineered hodge podges by amateurs. You cannot expect to run these devices for years and who want to keep rebooting a device we aint in the windows 95 era anymore. Fix the god damn libraries not to crash.

    Right now you can run Arduinos for many years no problem but these only if you reboot them every day or so, it is GARBAGE.

    In the current state it’s good to breadboard and show off something but that’s about it.

    That’s also a reason why I actually going backwards and do more and more with Arduinos ditching all ESPs.

    1. Hm. Curiously, I have a bunch of ESP8266’s and ESP32’s running for ages without any segfaults or anything like that… Perhaps the issue in your case is actually sitting between the chair and the keyboard.

    2. To an extent I agree with you. Facing a lot of unexpected reboot in esp with stable esp-idf.
      Lot of strange errors are happening which doesn’t have any justification. Say a static buffer works but a malloc buffer of same memory size sometimes crashers even if malloc is successful. Lot of uncertainty is there which gives pain to developers especially if the application is complicated with a lot of tasks and modules. The forum is also not very helpful
      Coz I posted few issues recently but no comments.

        1. People also don’t check the return from malloc, and/or don’t realise that the RAM for malloc isn’t necessarily available for static arrays, and vice versa. This causes problems when people just blindly include a bunch of random libs that all allocate memory at startup, then they wonder why it crashes when RTOS runs out of RAM…

    3. We have several products running 24/7 for over a year now. Not one issue or hiccup with them what so ever.
      Sadly, the ESP32 gets a bad rap from people who don’t know how to code. Even worse yet, problems from those who have no concept of how to code in a RTOS environment. Instead of taking the time to learn something they just google things and try snippets with no comprehension of how it works, and when there is a problem they blame the platform.

      1. It’s worse with the ESP8266, because you need to let the WiFi-stack do its stuff every now and then, in order not to crash it. Many beginners don’t understand to e.g. call delay() or yield() with the Arduino-core for the ESP8266 in any long-running sections of their code, then fly off the handle when the code keeps crashing.

        I’d say there are a lot caveats like that, but they’re not really bugs per se, and one just has to have the patience to dig for such caveats and learn how to avoid them.

        1. That is not “crashing it” It is built specifically to function that way. There is a watchdog in the ESP. If the wifi stack doesn’t get serviced periodically the chipset assumes the code has hung and reboots itself. If you are consistently running into this issue then you’ve got bad code or you’re trying to do too much with it keeping the wifi stack from being serviced.

          Would you rather have a remote iot platform potentially battery powered hang and just suck the batteries dry or to have a watchdog to rescue it and reboot it without you having to intervene?

          1. You really need to re-read what I said, mate. I was not complaining, I presented it as one of those things that newcomers tend to hit and get frustrated by. I even specifically said “Many beginners” there — it can’t be that hard to understand.

    4. You shouldn’t have to “keep rebooting” ESP devices. They have watchdogs in them that will reboot them automatically if they hang. That said I still have seen impressive uptimes with these things. on the order of a month or more. I have an ESP8266 that works as a GPS receiver/ntp server. Basically gives me my own stratum 1 ntp server right at home Attached to this is an oled display that among a bunch of other stats also displays it’s uptime. It does occasionally reboot itself. Personally i couldn’t give a flying f to spend any more time on it to troubleshoot it. These things reboot themselves in a manner of seconds.

      If you have issues with them rebooting more frequently perhaps you just have bad code.

    5. Sounds like the problem is you, dude. I too have them running 24/7 with some pretty large and complicated firmware loaded. I also tend to modify libraries for my own use as a lot of the Arduino libs made by third parties are not really optimised, or tested thoroughly.

  4. Why this are stil microcontroler no MMU?
    240Mhz is good for unix and rtos.
    but writing good program, safe program for microcontroler in 21 age?
    this are not safe, no update etc…

  5. How long this esp can run on 1W solar panel (3h per day)?
    For example, I would make a email serwer. How big I must have a solar panel for working 24h x 365 day ? Complete offgrid?

    1. Can’t really calculate that without knowing the region. Plan on 1 or 2 Wh per day, per W of solar panel, then multiply all the inefficiencies together.

      Using cheap eBay stuff, you probably lose 20% charging the battery and another 20 percent regulating to the voltage you need.

      Without MPPT, you could lose another 20%, and another 20 to 50% depending on how it’s physically placed to gather light, if you don’t have mechanical tracking.

      All in all, an ESP is going to use around 0.3-0.5 watts, so in a Seattle winter, I’d probably want at least 15-25W of solar. Of course in an Arizona summer with an efficient setup a 5W panel might even work.

      The actual solar cells are cheap enough it might make more sense to just add more, rather than try to get them lined up just right with big ugly mounts.

  6. Esp32 -cam user here. The board is shit . I managed to get it to work with my xiaomi thermometer , but it segfaults and restarts every minute or so . The bug is well documented, and old, but it was never fixed. In the end, I just use it as a co-processor with and esp8266 , talking via serial with eachother. Sure, it restarts every minute or so, spitting out a error debug message, but the esp8266 just ignores that. Works for 2 months or so, without any problem, as a temporary solution.
    The 4mb esp32, programmed with Arduino IDE, also complains that the binary is too big when i get about 1000+ lines of code, while the 8266 works like a charm ( can`t blame the esp32 here, maybe just bad arduino ide support).

    So, from my point of view, the esp32 is an unfinished product. Hope that the S2 will be better.

    Regards

    1. 4mb esp32 programmed with Arduino IDE binary too big? sorry, but last year we made 4000+ code lines into esp32 (started with arduino ide then using vs code/plataformIO with same arduino ide compiler) and always got space free on esp32 , and also included in some point filesystem+sqlite3 + BT + Wifi + some crypto func …. see github lochamesh

      esp32/esp32s2 mayor issue is troubleshooting during programming

      1. He’s probably got 1000 lines of plumbing between 5 dozen libraries. Guess what dude those libraries count as code too. this is exactly why even a simple hello world program in some of the shitty high level languages these days can take up to a fucking megabyte. Where as a lowerlevel language the 11 bytes in the string hello world is larger than the actual code to display it.

      1. Absolutely right. I am a professional software engineer in automotive embedded programming for more than 20 years and I know all these Windows programmers: They have infinite RAM, ROM and swap files on their PCs and do not know that malloc may fail. BTW: malloc on embedded systems is bad programming either.

      1. Why should Idle be 5uA and Deep Sleep with running ULP coprocessor almost 5 times the power consumption? Why use the ULP for anything if Idle is much better? There must be an error somewhere.

  7. Then you are working inefficiently. An ESP32 can do a webradio. Also I2S exists, no not I2C. MP3 is fully integrated in 50cent chips. Go with the times… 128MB? No way! I do that in kilobytes, not mega.

  8. I think it is good that they left off bluetooth – the more I use it in the esp32 the more I think I want it completely off chip…
    The software stack for it is enormous, it hogs an entire core, and would be much better on a dedicated chip that we could talk to via uart…

    So I think this chip is good – though next :-) I’d like a quad core esp32 :-)

  9. Possibly also licensing and/or development cost.

    If you’re not using VM, there’s no real need for an MMU. It’s great, but not necessary.

    Many ARM Cortex parts have an MPU, which is probably a good compromise.

  10. Hi guys, I apologize in advance for the OT: however, I am experiencing a problem with ESP32 and maybe you could help.

    In particular, the microcontroller gets stuck after a few hours/days of up-time.

    Unfortunately, I cannot be more precise about the precise moment when it stops: I have tried to connect the ESP to my computer, but I was not able to reproduce the issue in this controlled conditions.

    The code is very simple: the ESP wakes up, reads data from a I2C sensor and then it starts sleeping: it is then awaken by the timer, and the cycle restarts.

    Both with deep sleep and light sleep, the problem shows up: the only way to make it work again is by manually resetting it.

    Do you have any hints on the reasons behind this behavior? Thanks for your help :)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.