Arm Cortex-M vs ESP32: Which is More Efficient?

preview_player
Показать описание
Arm's Cortex-M microcontrollers are 32-bit RISC CPUs and are available at a range of performance levels with different features. The Raspberry Pi Pico use the Cortex-M0+ in the RP2040, the BluePill has a M3, and the BlackPill uses a Cortex-M4. One rival to Arm's MCUs is the ESP32 from Espressif Systems. The ESP32 uses a Tensilica Xtensa LX6 microprocessor at up to 240 MHz. The question is which MCU offers the best performance? Which one uses the least power? Which one is the most efficient? Let's find out!

---



#garyexplains
Рекомендации по теме
Комментарии
Автор

Current consumption in different sleep modes is also very interesting. A lot of applications uses sleep mode to cut power usage.

JorgenHenningsen
Автор

Definitely interested in more tests, especially involving risk-V. I would love a glimpse of the asm output (just the inner loop) to be sure the differences are not down to the compilers being less clever with some of the cpus. Gary, you are such a resource, there is no way you are getting enough paid for this. 😊

letMeSayThatInIrish
Автор

A related question is how much power they use when doing nothing. That is, if the fastest boards are put into a reasonable (wake-able, say by timer interrupt) power save mode when they complete the task, what are the total maH used over the period of time that the slowest takes to complete the task? And over ten times that long?

The energy cost of other operations, for example, I/O operations, is a whole other interesting kettle of fish when choosing a board for best battery efficiency in it's given application.

But thanks for this data. It gives one a leg up.

KeepEveryGuessing
Автор

Very nice comparison, Gary! Much appreciated. ST has very low and ultra low power microcontrollers designed for battery applications. These are the L series and the U series. They also have the H7 series that can run up to 550MHz (I LOVE these faster boards, btw).

For the Nucleo or Discovery boards, looking at the power consumption is a bit tricky, as these boards come with ST-LINK which if active, will draw power too (ST used to use an STM32F103 for their ST-LINK, which is the same uC as the bluepill). So you'll need to use an external serial programmer with these while disabling ST-LINK. Furthermore, using Arduino IDE is a bit tricky, as you never know how the uC is set (which peripherals are turned on). This is one instance where using CubeIDE offers so much more control and optimization features compared to Arduino IDE.

lukeearthcrawler
Автор

THANK YOU! A really well made clip, explaining the efficiency and how it was computed, all the steps required to asses a particular chip when figuring out your particular case.

Rarely there's a mention that other things on the board need power too, so if you care about that, you should think about that. So very nice to see, also with numbers, the difference between the same microcontroller, but in different boards, how much different it can be in both performance and power consumption and performance/watt too!

Rarely there's a mention in the quality of the benchmark and the relevance of it (in this case that it basically uses just the CPU/compute intensive, and doesn't stresses the RAM bandwidth or latency or the SD card/SSD. Because in the end, when basing a decision on this efficiency, the task(s) that will/would be run should be taken into consideration.

And of course, it's nice to see relevant adjusted numbers so they can be compared easily. Like performance / MHz and total energy required to run a task, in mWh.

While, conceptually I didn't really saw something new, that I didn't knew before, this is a video (or style of presentation for this topic) that I wanted to see for a looong time. Others usually rush a bit and only present the benchmark numbers and 1-2 calculations based on that. They don't focus on providing the full picture, to point to all things that can vary. For someone who has no idea how these things work, it's really good to know what to look for/at, not focus on one single thing.

I have to say, I didn't knew that the Pi Pico is so efficient. Very nice to see that! Also didn't knew about that Magma Splash and that it's made in Romania. That's where I'm from! :D Though to fair, I didn't got to play with microcontrollers and SBCs yet, though I planned for a long time to, just never been forced to and never felt like having proper time and space to play with one.

Winnetou
Автор

Its a great concept to benchmark MCUs please carry on doing it, thanks alot

JohnKhalil
Автор

It might not be so important for most applications, but I think it'll be very interesting to test floating point performance on this boards, since some of them don't include a floating point unit. Pure floating point workloads might not be very realistic, but at least some mixed workloads could be relevant. I can think of a applications, like a PID controller, that could easily apply to this microcontrollers

miguelagueda
Автор

That's a lot of hard work, Gary. Thanks for doing this!

markwarburton
Автор

Could you re-run the tests of the ESP32 using both of its cores? And maybe add the cost variable in the mix.

stephenremillard
Автор

Great video! Thank you for doing all the work. I’m sure this took a considerable about a time.

wbwarren
Автор

Since you used the arduino ide sketch for both the esp and the arm m, wouldn't the underlying arduino core also affect performance? I wrote a simple program for the blackpill using the arduino stm core and also the stm HAL library(stm cube ide), the difference in code loop time is very big. Arduino core 300kHz, HAL library >1MHz.

ianlee
Автор

Very informative, thank you! The flexibility of these microcontrollers is pretty amazing, allowing them to fit a wide range of use-cases.

virtuallifeform
Автор

Awesome video Gary.
More of these please.

mandelbro
Автор

At these numbers the regulator on the boards play a measurable role in power consumption as well.
The ESP32 devkits especially the stock chinese ones have a big but not very efficient linear regulator.

XdewGaming
Автор

Great video, and explanation. Thanks! Subscribed I'm going to stick with the LOLIN ESP32 boards. I have many Wemos D-1 minis at work 24/7 for a few years without fail. Just started playing around with other boards. I have a LOLIN ESP32 Pico and Pico W. ESP32wins in my book.

marinehm
Автор

i loved it when you hosted back then at android authority and now I love your own content more

hatdog
Автор

Great review video
Great to see good compered chips video
Thanks for sharing your expirence with all of us 👍 😀

avejst
Автор

Really great video. We've used the cortex M4 in an embedded railway application to great success in the past for control. I think there is forward compatibility with cortex M4/M7 as well.

Buzz
Автор

Thank you, Gary, for your most Appreciated, Articulated Interesting Hard Work.

angeldominguez
Автор

Nice video on a difficult topic. A 8-Bit AVR as bottom anchor would be nice. And of course the ESP32-S3 should be included.

deterdamel
welcome to shbcf.ru