Live data from Hacker News

ESP32-P4: High-performance MCU with IO-connectivity and security features

espressif.com

81–90 of 95 posts

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#81

Earlier quoted context omitted.

I use it at work, and while it’s quite good, I find some of the ESP libraries on top of FreeRTOS to actually be a step backwards. As soon as esp adds their event loop, you’re pushed towards using that architecture, and while I’ve found that good for single use devices, for devices that are doing multiple things at the same time, fitting in memory has been a chore. I also would love some higher performance networking…

Yes its easy to use but a bit wasteful. I suspect that the innovative stuff will come from the Rust side of things, with zero copy, shared stack etc. They are actively funding efforts here [0]. The RTIC [1] project looks really neat, but only supports Cortex-M afaik. [0] https://github.com/esp-rs [1] https://github.com/rtic-rs/

I’m really really pumped about the rust stack, for two big reasons.

1. The innovation and performance you’re talking about.

2. Hiring. We’re going to be able to be on a flashy language, doing something cool which isn’t always the case with embedded. We’ve had a hell of a time getting candidates in that could write low level code competently. Rust should make that easier and hopefully using it will make us more attractive to the small pool of devs we’re courting.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#82
post #74
post #63

Earlier quoted context omitted.

There are 2 flavors of the ESP, depending on model. The Xtensa cores and RISCV, go with the RISCV variant. The Xtensa variant requires you to use their compilers, which are derived from he ones provided by Cadence. There's a better path long-term for the RISCV cores to get tooling on par to what's available for ARM.

The Xtensa based ESP32 chips have upstream support in GCC, do they not?

Espressif has compilers you can download. GCC may work fine, but I’d use their compilers.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#83
post #20

Earlier quoted context omitted.

I use a wide mix of ESP-WROOM-32, Lolin ESP-32-OLED (when I want on-board display), and all sorts of other random ones. For all my home automation I use ESPHome and Home Assistant (20+ custom devices, plus however many light bulbs and Sonoffs and stuff). For tool chain I personally use Platform.IO in VSCode but I’ve done a fair few with Arduino IDE and it works in a pinch.

Would you mind sharing some of the Home Assistant projects you’ve built? I have some ESP32-CAMs coming and plan to setup a cat box monitor.

Not the person you’re replying to, but I’ve built a battery voltage monitor (to alert if my home generator battery is discharging) and am working on temperature monitors for my BBQ and oven! Those have been left on accidentally in the past

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#84
post #74

Earlier quoted context omitted.

The Xtensa based ESP32 chips have upstream support in GCC, do they not?

Yes, but not llvm support. Which makes rust a no go.

Upstream support landed a couple of weeks ago: https://github.com/llvm/llvm-project/search?o=desc&p=1&q=Xte...

Rust support landed before that, https://github.com/esp-rs

This is all being done by Xtensa themselves, including the Rust.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#85

Earlier quoted context omitted.

Yes its easy to use but a bit wasteful. I suspect that the innovative stuff will come from the Rust side of things, with zero copy, shared stack etc. They are actively funding efforts here [0]. The RTIC [1] project looks really neat, but only supports Cortex-M afaik. [0] https://github.com/esp-rs [1] https://github.com/rtic-rs/

I’m really really pumped about the rust stack, for two big reasons. 1. The innovation and performance you’re talking about. 2. Hiring. We’re going to be able to be on a flashy language, doing something cool which isn’t always the case with embedded. We’ve had a hell of a time getting candidates in that could write low level code competently. Rust should make that easier and hopefully using it will make us more attrac…

My impression is that a certain kind of people find the challenges of embedded work attractive, but leave it sooner or later since the pay is not competitive with generic (but more boring) webdev. I guess this is due to the nature of thin margins in manufacturing hardware?

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#86

Earlier quoted context omitted.

I use it at work, and while it’s quite good, I find some of the ESP libraries on top of FreeRTOS to actually be a step backwards. As soon as esp adds their event loop, you’re pushed towards using that architecture, and while I’ve found that good for single use devices, for devices that are doing multiple things at the same time, fitting in memory has been a chore. I also would love some higher performance networking…

Yes its easy to use but a bit wasteful. I suspect that the innovative stuff will come from the Rust side of things, with zero copy, shared stack etc. They are actively funding efforts here [0]. The RTIC [1] project looks really neat, but only supports Cortex-M afaik. [0] https://github.com/esp-rs [1] https://github.com/rtic-rs/

That wouldn't be entirely surprising!

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#87

Earlier quoted context omitted.

> use less power, I was about to go off on a rant about how power hungry the ESP32 is. But having a look its not as bad as I remembered (or perhaps I was thinking about the 8266) https://diyi0t.com/reduce-the-esp32-power-consumption/ depending on the board you can get it to as low as 15ma in "normal" use(light sleep microprocessor only, modems off). But when the wifi is on it chows down powers.

The chips various Arduino-like chips are 5mA active, 500uA when light sleeping, 5uA in deeper sleep, and hundreds-nanoamps in deepest sleep. 15mA "light sleep" is really heavy actually compared to most things IMO. Hell, the Nordic Semiconductor nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_. https://www.nordicsemi.com/Products/nRF5340 ----------- ESP32 is in that zone between the low-power (and ultra-low power) uC…

> nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_.

I mean that is bluetooth radio, so its cheating just a little :)

No, I get your point. the ESP stuff I do spends most of its time in deepsleep, so yeah the 15ma is not great, but its not _that_ much of an issue because I can just wake up less often. Not having to use C is even better though.

10 year previous me would be screaming at my attitude. I remember when the pyboard came out and I was very much "pfftt, amateurs. 35mA to do nothing very fast"

However having lots of connectivity really makes up for the not great consumption. I don't have to slap on an RF solution, or like I did 12 years ago, use a horrific ethernet->rs232 bridge.

However if I need online low power consumption, I'll need to use STM32, and cry at how bad the documentation is(or was, I've not tried to use it for years).

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#88

Earlier quoted context omitted.

I concur that's strange; the homepage code examples are standard imperative things. Clean IO, peripheral APIs, scheduling/code structure, and resource sharing is what I'd expect as priorities from an embedded-dedicated lang.

I think they mostly try to introduce the new language itself. But surely quick "How to do Esp32 things" mirroring this http://docs.micropython.org/en/latest/esp32/quickref.html would be very nice. Without it you need to look for tutorials and documentation tree or even documentation for specific packages providing embedded functionalities.

It's on our (my) Todo list.

The next best thing is currently probably this tutorial: https://docs.google.com/document/d/1K-TYea7jbYfj2ecMUmr0T0zd...

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#89

Earlier quoted context omitted.

The chips various Arduino-like chips are 5mA active, 500uA when light sleeping, 5uA in deeper sleep, and hundreds-nanoamps in deepest sleep. 15mA "light sleep" is really heavy actually compared to most things IMO. Hell, the Nordic Semiconductor nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_. https://www.nordicsemi.com/Products/nRF5340 ----------- ESP32 is in that zone between the low-power (and ultra-low power) uC…

> nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_. I mean that is bluetooth radio, so its cheating just a little :) No, I get your point. the ESP stuff I do spends most of its time in deepsleep, so yeah the 15ma is not great, but its not _that_ much of an issue because I can just wake up less often. Not having to use C is even better though. 10 year previous me would be screaming at my attitude. I remember when the…

The Cortex M23 and Cortex M33 chips seem to be the lowest power I can find.

That's Microchip's SAM L10/L11, STM32U5, and the Nordic Semiconductor chip I mentioned earlier. Probably a few more out there (ARM sells their core to many different companies after all).

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#90

Earlier quoted context omitted.

I’m really really pumped about the rust stack, for two big reasons. 1. The innovation and performance you’re talking about. 2. Hiring. We’re going to be able to be on a flashy language, doing something cool which isn’t always the case with embedded. We’ve had a hell of a time getting candidates in that could write low level code competently. Rust should make that easier and hopefully using it will make us more attrac…

My impression is that a certain kind of people find the challenges of embedded work attractive, but leave it sooner or later since the pay is not competitive with generic (but more boring) webdev. I guess this is due to the nature of thin margins in manufacturing hardware?

Depends what you’re building and where I guess. I didn’t get a pay cut moving from BE distributed services to embedded.
Post reply on HN