PIC32MX vs STM32F205RFT6 power consumption - Page 1
Forum section: electronics / general

author: Karel
author_rank: Super Contributor
timestamp: April 01, 2018, 06:07:16 pm
content: I thought that ARM based MCU's consumed less power compared to their MIPS equivalents,however, according to the datasheets, it doesn't look like...

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 01, 2018, 06:37:03 pm
content: Temperature is not given in your PIC32 graph (we may assume room temperature) and shows current draw vsMIPS.For the STM32F2xx, the graph shows current draw vs CPU clockfrequency. This is not the same thing.The common-ground, datasheet-claimed, current draw per MHz are respectively around 500 µA/MHz for the PIC32MX and 175 µA/Mhz for the STM32F2. Significant difference. Of course the difference in real-world applications for similar performance is not as drastic, due to differences in CPU architectures.The Cortex-M3 architecture (which the STM32F2 line is based on) has a rated DMIPS vs clock freq of 1.25 DMIPS/MHz. The "MIPS" indicator is much less representative of performance than DMIPS, IMO.But even if we make them match, you can see that the STM32F2xxx actually draws less power, maybe in the order of 20 to 25% less. But only a real benchmark would make sense, so it's just an indication.The STM32L4 line, more recent, based on the Cortex-M4 and aimed at low power, will draw drastically MUCH less power than the PIC32MX line for similar performance.

author: Karel
author_rank: Super Contributor
timestamp: April 01, 2018, 07:04:16 pm
content: You are right. I expressed myself wrong. I should have written that I expected a much lesser power consumption.Specially because of all the hype around ARM. I guess that, at least for us, it doesn't make sense to switch from PIC32 toSTM32 if the difference is only 25%. Also because the MCU is not the only power consuming component in the applicationso the total power saving will be less than 25%

author: andersm
author_rank: Super Contributor
timestamp: April 01, 2018, 07:04:35 pm
content: "PIC32MX" also covers a wide range of devices.

author: Karel
author_rank: Super Contributor
timestamp: April 01, 2018, 07:07:30 pm
content: I was comparing the PIC32MX370F512 with the STM32F205RFT6.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 01, 2018, 07:14:58 pm
content: Quote from: Karel on April 01, 2018, 07:04:16 pmWell, the ARM architectures were actually not that good power-wise before the Cortex line.Again, the STM32F2 may not give you a significant enough cut in the power draw. But I can assure you that it will be the case if you switch to the STM32L4 or (if you need more horsepower/RAM) the STM32L4+.As an example in real projects: a PIC32MX-based design (PIC32MX570 as I recall): the CPU was drawing almost 50 mA @80 MHz. In another project, using a STM32L496: the CPU was drawing 10 mA @80 MHz. Similar performance. To me that's a big cut. It may not matter much if your overall power draw is 500 mA or over, of course.And those figures are for CPUs constantly running. If you can use idle or sleep periods in your design, the power cut will be even more drastic. The low-power modes of the PIC32MX draw A LOT more power than the low-power modes of the STM32L4 (and even F2) processors.

author: Karel
author_rank: Super Contributor
timestamp: April 01, 2018, 07:41:17 pm
content: Thanks, I'll have a look at the STM32L496 series.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 01, 2018, 07:47:05 pm
content: You can even buy a dev board for like $20 (ST Nucleo boards are cheap and great for electronics engineers) and give it a test drive. Worth a shot.Of course we would need more info on your project for a really informed decision. Is the design at its early stage? Is it nearly finished? Is it even already a product? The investment to switch to a completely different MCU target can be significant, so I understand it has to be fully justified.

author: Karel
author_rank: Super Contributor
timestamp: April 02, 2018, 09:15:35 am
content: I'm thinking about to do some tests with an STM32L476RC in the nearby future when I have more time.Does one of you have any thoughts about the "best" or "preferred" tool chain or IDE?A hard requirement is that everything must run on Linux, including the programmer. Also, I program in C only.C++ is not an option and it's not open for discussion.I don't care much about debugging facilities. As long as I can code and use the programmer, it will be fine, at least for the moment.I don't have any experience with STM32 or any other ARM based MCU's.What's the state of System Workbench for STM32? Is it usable for a production environment / professional use?

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 02, 2018, 12:29:36 pm
content: The reference compiler for ARM targets is:https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloadsIt's basically GCC for ARM. Available on Windows, MacOS and Linux. This is what I use, along with Makefiles, both on Windows and on Linux. This is really all you need. You will also need the support files from ST:http://www.st.com/en/embedded-software/stm32cubel4.html?dl=j7a78KzRIF38LlBU2T4khQ%253D%253D%252Co8te7AgDkPItyvj1EUeG8AFjqGRHGPR0QaFGOBadLWpBjGOC8UIExozWoVepDWBzThe latter contains all the headers and libraries you need and quite a few example projects to get you started. You may or may not use the provided HAL libraries, they are kinda bloated but can get you started quicky and then you can move on to more bare-metal access to the MCU. It's all plain C.As for programming and debugging, OpenOCD works fairly well along with GDB.I don't use System Workbench but I've heard it's decent. It still uses GCC for ARM and will probably get you started faster.http://www.st.com/en/development-tools/sw4stm32.html

author: Karel
author_rank: Super Contributor
timestamp: April 02, 2018, 02:18:17 pm
content: May ask you to share a (simple) makefile and a C source file that uses the aforementioned compiler and- sets up the necessary PLL and clock- uses a timer interrupt- toggles a gpio pin (flashing LED example)- if possible, doesn't use HAL(I alwayse uses my own boilerplates for PIC32 and never uses Harmony)If not, maybe you can point me to a place where to find such examples?It's very much appreciated.

author: krho
author_rank: Regular Contributor
timestamp: April 02, 2018, 02:44:28 pm
content: TrueStudio is now free for STM32 if you don't know and it's probably better than SW4STM

author: Karel
author_rank: Super Contributor
timestamp: April 02, 2018, 03:03:14 pm
content: Quote from: krho on April 02, 2018, 02:44:28 pmI checked their website but I can't find the Linux installer...

author: JPortici
author_rank: Super Contributor
timestamp: April 02, 2018, 08:06:39 pm
content: Quote from: Karel on April 02, 2018, 02:18:17 pmAFAIR, one difference between PIC32 and STM32:by default peripherals on STM32 are not clocked, they do not draw any power.by default, peripherals on PIC32 are clocked (but disabled.. in an idle state if you want)so, on a PIC32, disabling peripherals by the PMD registers should give you improvements on power consumption..however i can't tell how much.. it makes a huge difference on dsPICs but i haven't done any extensive tests with PIC32.I shall make some this week though... but i don't expect to save much (I only ran quiclky a very basic test all on vs all of, not much difference but i didn't put much thought in it)I am using a PIC32MX570F512H by the way.@siliconwizard, the PIC32MX570 can run at 50 MHz max but yeah in my application it's consuming around 35-40mA. that 10mA runtime current on the STM32 sounds amazing, unbelievably small...

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 02, 2018, 08:17:48 pm
content: @JPortici, memory did not serve well... had to check. It was a PIC32MX360F512L.As to the STM32L4 power draw... this is pretty impressive but there is even better. You can take a look at Ambiq microcontrollers (Apollo & Apollo 2). They don't run as fast (24 MHz and 48 MHz max) but THEY are unbelievable.Also, with the STM32L4 series, we can do even much better than this by using an SMPS to power their internal core. Some models of the line have this possibility. You can get power draw in the order of 35-40 µA/MHz. And it's not marketing, it works!

author: NorthGuy
author_rank: Super Contributor
timestamp: April 02, 2018, 08:42:46 pm
content: Power consumption depends more on the size of transistors, rather than the CPU peculiarities. So, look up the underlying technology for the CPUs before comparing (not in the datasheet, but the info must be somewhere). Smaller transistors are faster and consume less power.ARM and MIPS are similar in what they're doing, so, giving the underlying technology is the same, I would expect them to draw about the same power.Smaller, 8-bit MCUs do less stuff, so they would consume less if they were made of the same size transistors as their 32-bit counterparts (last time I looked they were ahead in power consumption even as is). You probably will never find such thing as 8-bit MCU made of 14nm gates (perhaps too expensive, or no demand), but if they existed, they would be crazy fast and would consume really low power.

author: JPortici
author_rank: Super Contributor
timestamp: April 02, 2018, 08:46:25 pm
content: uh uh.. in my case it's mostly a matter of using what i know (PICs, but not PIC32), reusing a ton of code (from dsPIC.. at most i had to change a couple of registers in some peripherals) and the fact that the equivalent ATSAM/NXP*/STM32** was at least twice the cose (CANBUS+USB)*haven't found the reason but i hand tons of problems when it came to a custom board.. chips kept failing on me.. so i put them aside for now-**yes i know that there are some low cost STM32 with can+usb but users reported that you couldn't use both peripherals at the same time, and even the datasheet wrote that they shared part of the dedicated RAM, i smelled a lot of potential headaches.actually in this project of mine i don't care about overall power consumption as long as it's less than 50mA, but it's good to have some data other than datasheets and marketing material..

author: iMo
author_rank: Super Contributor
timestamp: April 02, 2018, 08:51:20 pm
content: Mind the different technology (fab) nodes the pic32mx and stm32xx are fabricated on. The pic32mx is ~250nm, the stm32s are 90-180nm. That may have a much bigger impact on the power consumption than the architecture itself.

author: mrm2007
author_rank: Contributor
timestamp: April 03, 2018, 06:14:08 am
content: Quote from: Karel on April 02, 2018, 03:03:14 pmHi,check this:https://atollic.com/resources/download/linux/