Jump to content
jpnorair

STM32L vs. MSP430F5: What's left for MSP430?

Recommended Posts

Recently I've been doing a lot of work with STM32L.  The asynchronous RTOS that I had previous built for MSP430F5/F6 is now working nicely on STM32L.  I'm doing some benchmarking and profiling of STM32L vs. MSP430 -- it is a long process, but the signs aren't looking good for MSP430.  Here are some of the preliminary, qualitative results.

 

Lowest-Power Sleep:

I've used LPM3 for MSP430F5 and STOP-mode for STM32L.  These are the lowest-power modes that allow SRAM retention (and register retention) and a means for the MCU to schedule its own wakeup with a timer.  Both of the devices use roughly 2uA in this mode.  Both devices also come out of lowest power sleep in roughly 10us, however the MSP430 needs more like 100us if you have the supply voltage monitor enabled.  STM32L does not need the extra time, so it wins.

 

Runtime Performance per mA

STM32L is using the Cortex M3, not the M0, so it has a brutish ALU with 32x32 multiplier in addition to single-instruction multiply-accumulate, single-instruction logical comparsion with shift, and a bunch of other neat ALU instruction that make it run very fast.  Additionally, it has a DMA that is independent of the CPU.  I'm using it a 4.2 MHz to achieve 1mA runtime, and my MSP430F5 is running at 5.2 MHz to achieve 1mA.  For doing DSP or software crypto (like RSA), it isn't even close.  The ARM just humiliates the MSP.  For doing protocol processing, RTOS scheduling, and more logical operations, the ARM still is beating the MSP by about 2x, even though the MSP is clocked a bit higher.  So, my verdict is that STM32L uses less than half the runtime power of MSP430F5.  STM32L also has a fast-settling 16MHz clock that outperforms MSP430 at 25MHz, and if you're crazy you can push it to 32 MHz.  It absolute performance, it just dominates.

 

Features and cost

I'm comparing a low-end STM32L (STM32L151C8: 64KB Flash, 4KB EEPROM, 10KB SRAM) and a mid-range MSP430 (MSP430F5510: 32KB Flash, 0.5KB storage Flash, 6KB SRAM).  Otherwise, they have a comparable set of peripherals and they cost about the same.  The difference is that almost every peripheral in the STM32L is just a little bit better than its equivalent on the MSP430.  Plus, having the 4KB EEPROM is really nice.  The storage Flash is still NAND-type Flash and it still needs wear-leveling, which is hardly worth the effort for such a small piece of memory.

 

The sole redeeming factor of MSP430

A major deficiency of STM32L is that there isn't a low-power clock source other than the RTC, so building a low-power asynchronous RTOS is difficult.  But, it is obviously possible.  Moreover, chips like EFM32 are nearly identical to STM32L, except even lower power, and EFM32 has an array of low-power timers.  MSP430 has a much better clocking system for implementing low-power apps, and overall it is a lot easier to work-with than STM32L.  But now that my RTOS is ported, that hurdle is cleared, so the ease-of-use argument is really not a huge deal, in my opinion.

 

What's left for MSP430?

Frankly, I'm not bullish on MSP430 anymore.  I've used it for years, I think the architecture is very elegant, and I love the clocking system.  The competition from Cortex-M is just getting to tough for any mid-range "proprietary" MCU architecture to face.  It's not just TI: everyone making competitors to Cortex-M is getting squeezed.  The Wolverine core is a nice move by TI, but it's too little too late.  For the same price as a Wolverine core MSP430, I can get an EFM32 with superior MCU features apart from the FRAM, and similar or even superior low-power features.  These EFM32s have 16KB of SRAM and a really good supply monitor, so all you are really getting with FRAM is a speed-limiter on your CPU (8 MHz).

 

My conclusion is simple: TI needs to find a way to drop the price on MSP430 so they can compete in the low-end market against AVR8 and PIC, where the MSP430 is faster and lower-power.  Today's mid and high-end MSP430's simply cannot compete against Cortex-M.  TI has always been about beating competition on marketing and fabrication, so I know they can do it, and I'm surprised they haven't.  Clearly, the G-series is a step in that direction, but in my opinion it is really it is the 5-series that they need to cost-optimize.

Share this post


Link to post
Share on other sites

When you say MSP430F5 are you specifically referring to the FR57xx or FR59xx chips, or the older 5xx chips like the 5438A?   I was disappointed with power performance on the FRAM-based chips, though if your application allows use of LPMX.5 I believe they do still use less power than the EFM32s.

 

Otherwise, I'm personally much more impressed with the Energy Micro (EFM32) chips than anything I'm seeing from TI.  The TinyGecko and GiantGecko evaluation platforms at $80 each blow away the TI evaluation boards, and having an upgrade path to as much as 1MiB flash and 128kiB RAM enables whole new application domains.  Even better, I don't have to fix the compiler ;-).

Share this post


Link to post
Share on other sites

A colleague of mine stated over a year back, that the ARM cores are getting so cheap and so low power, there is almost no need for the MSP anymore.

I think the MSP430 currently only fills a small niche in the very very low end of processors. A remote control for example, could benefit from the LPM4 mode, if it's a rarely used kind of remote.

I still love the elegance of the clocking system and the peripheral centric design of the MSP, but I must admit; I once did a MSP430F5xx design, but I'd defenitely go for an ARM core nowadays. Only for the very low power and very tiny devices the choice for an MSP430 is justified these days.

Share this post


Link to post
Share on other sites

When you say MSP430F5 are you specifically referring to the FR57xx or FR59xx chips, or the older 5xx chips like the 5438A?   I was disappointed with power performance on the FRAM-based chips, though if your application allows use of LPMX.5 I believe they do still use less power than the EFM32s.

 

Otherwise, I'm personally much more impressed with the Energy Micro (EFM32) chips than anything I'm seeing from TI.  The TinyGecko and GiantGecko evaluation platforms at $80 each blow away the TI evaluation boards, and having an upgrade path to as much as 1MiB flash and 128kiB RAM enables whole new application domains.  Even better, I don't have to fix the compiler ;-).

No, I'm talking about the flash-based F5 series.  I use "Wolverine" to describe the new FR models, i suppose FR8/9.  In the F5 series, I specifically use only F55 and CC430, so these are the newest, best F5 series devices using Flash.

 

EFM32 is great, but expensive.  It gives me slightly better low-power for 3x the price of STM32L.

 

The problem with anything below LPM3 is that the registers get lost.  So unless you have some extreme-low-duty cycle application, the energy cost of the startup routine far, far, *FAR* outweighs the gains from going below LPM3.  Wolverine does LPM3 at 0.7uA, which is about the same as EFM32.  Fail.

Share this post


Link to post
Share on other sites

Do you have any experience with STM8L and STM8S? I have one project where STM8S00 is a much better fit than MSP430G, so I have decided to give it a try.

STM8 has many of the same peripherals as the STM32, so if you are familiar with the STM32 and you might be thinking about using AVR, then go with STM8.  It's an easier port.  That said, the low-range STM32 devices give more bang for the buck than STM8 does.

Share this post


Link to post
Share on other sites

 

The problem with anything below LPM3 is that the registers get lost.

To be clear, LPM4 retains registers and RAM as well.  It just doesn't meet your other requirement of independent timed wakeup.  The MSP430G2553 is still pretty capable and will do 0.4uA in LPM3 and below 0.1uA in LPM4, which beats anything Energy Micro has at least until their M0 chips come out later this year.

 

Based on the data sheets, the FR5969 does LPM3 at 0.7uA with 7us wakeup.  At LPM3.5 you use 0.5uA and get RTC timed wakeup but spend 250us for wakeup, plus a little time to reprogram the peripheral registers.  Active mode is 100uA/MHz.

 

The EFM32 (TG230) needs 1uA to keep the RTC running (EM2), but wakes in 2us, with active mode at 150uA/MHz.  Lower power at EM3 and EM4, but you lose the clock so would have to compare with LPM4.5.

 

I don't agree it's immediately obvious the MSP430 warrants a "fail".  Whether one mode FAR^3 exceeds another in energy use really requires analysis in the context of specific use cases.

Share this post


Link to post
Share on other sites

Jpnorair, I'm curious on the numbers you have mentioned. Did you measure them all or compared the datasheets?

I got burned by doing either one in the past. Some datasheet values can be pretty much marketing numbers.

An specifically on MSP430 comparing F2xx and F5xx/6xx it's not that strait forward anymore to get into LPM4 for example.

In F2xx it was just a bis.b #LPM4,SR and you got your LPM4. F5xx/6xx has many more features like keeping the ACLK alive if a module is still requesting the clock, so going to LPM4 will rather get you LPM3 until the clock request is gone.

Those are nice features but require more attention on the code.

 

Pabigot mentioned already below that LPM4 will also retain the registers and RAM. Also some of the devices have special retention memory when going to a LPMx.5

Share this post


Link to post
Share on other sites

I used measurements.  I tried to mention this: getting MSP430 to use 2uA in sleep is easy.  Getting STM32L to use 2uA in sleep required a special driver to abuse the RTC and one of the externally-clockable timers.  So, the RTC is gone, although I can still derive UTC information.  On MSP430, I can set any timer to use ACLK, and then let it become a free-running timebase.  This is a great thing.  

 

BUT... I need to use LPM3 for my application.  The wakeup time for LPM4 is too slow, so if I use a RTC-abusing driver like I did with the STM32L, I still have too-slow wakeup.

 

I will agree that for some kinds of pure-event-driven apps, MSP430F5 will still beat any Cortex-M, and Wolverine MSP430 will beat anything.  But I need to run an asynchronous RTOS (first line of post).  I also assumed Wolverine peripheral registers are in SRAM.  If they are in FRAM, then it gets more interesting.

Share this post


Link to post
Share on other sites

I don't agree it's immediately obvious the MSP430 warrants a "fail".  Whether one mode FAR^3 exceeds another in energy use really requires analysis in the context of specific use cases.

Normally I'm not so dramatic, but considering all the factors, MSP430F5 needs to crush the Cortex-M in order to justify itself.  However, it doesn't even beat the STM32L or EFM32 in the applications I'm looking at.  For push-button stuff, maybe it wins, but I can use cheaper devices for those -- don't forget that MSP430F5 is very expensive.  To me it feels like MSP430F5 is now stuck in a no-man's land.

Share this post


Link to post
Share on other sites

I'm afraid I must agree. The "high end" MSP430 devices usually have such heavy tasks that the low power features don't really kick in. Since the newer ARM devices are so low power as well. Plus they are cheaper and better supported by most frameworks.

I'm considering buying an STM32F ValueLine Discovery dev kit to play with, since the MSP430 is practically deemed to be used in the very very low power tiny niche.

I might very well use them again, maybe in smart dust projects (CC430 probably), or the smallest devices in home control, or stand-by monitor chips. But much more than that doesn't justify using hem anymore. Quite a shame, I love the design of them.

I'll winish my binary watch and TV out library projects, and I might spend an afternoon on some other cute project, but that's it for MSP430 I'm afraid.

Share this post


Link to post
Share on other sites

I might very well use them again, maybe in smart dust projects (CC430 probably), or the smallest devices in home control, or stand-by monitor chips. But much more than that doesn't justify using hem anymore. Quite a shame, I love the design of them.

"Smart Dust" is exactly what I do.  CC430 is a nice chip in this market because it is actually the low-cost leader.  So, I can say it is not as power efficient for WSN as are some other solutions, but it has a great price and it is made as a SINGLE DIE.  I think it's the only sub 1-GHz all-in-one made in a single die apart from the CC111x.  But CC430 is much better value than CC111x.  What led me to type this topic was actually a USB stick using MSP430F5509 + CC1101, versus a similar USB stick using STM32L + SPIRIT1.

Share this post


Link to post
Share on other sites

Nowhere I'm afraid, the stellaris is (AFAIK) an ARM core as well, so it is a direct competitor of the STM32 and EFM32 processors. Since it's a lot more expensive it's hard to justify its purpose.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...