Jump to content
43oh

ultra low power mcu, is it a narrow segment?


Recommended Posts

 

Yep..wow.  I think the only thing the MSP430 does better is faster wakeup times of under 1usec.  

 

STM32L needs 8usec, but EFM needs 2usec. 

I'm curious at what point this difference actually matters, if we assume the ARM devices are twice as fast as the MSP (at the same power consumption) than the startup difference would be erased after a handful of instructions. On the other side of things the STM devices have an RTC and can be set to periodically wake up every X seconds/minutes/hours vs only seconds on the MSP.

 

 

Cost for the ARM chips is of course much higher (6x, 18x respectively, but they have a lot more functionality than MSP430 valueline parts).

Actually its not that bad the 151C8 (64KB flash) is $2.67 in hobbyist quantities and unless I'm shopping at the wrong places the MSPs I've looked at start at $0.8/0.9 each for a part with a lot of compromises (< 8KB flash, no hardware UART, etc...). A more capable part like the new 2955 I'm guessing will go for > $2 in the small quantities I'd be looking for.

Link to post
Share on other sites

 STM32L will not have much advantage -- certainly not enough to justify the flogging necessary to get it running ULP.

Can you expand on this? I haven't gotten into the low power mode of the STM32L yet but according to what I read on the data sheet, you should be able to stick it in Stop mode with the RTC running from the LSI at ~1.4uA. Is there some reason the RTC can't be enabled that I'm totally missing and will bite me in the a** when I actually try it in a couple weeks?

Link to post
Share on other sites

Can you expand on this? I haven't gotten into the low power mode of the STM32L yet but according to what I read on the data sheet, you should be able to stick it in Stop mode with the RTC running from the LSI at ~1.4uA. Is there some reason the RTC can't be enabled that I'm totally missing and will bite me in the a** when I actually try it in a couple weeks?

The RTC is annoying on STM32L.  The BCD hardware makes it less useful as a kernel timer than it would be if it were just a normal, binary hardware.  If you want your hardware to wakeup at 1-second intervals (or some constant interval), then RTC is easy enough to use -- you will actually use the wakeup timer subcomponent and not the RTC alarms themselves.  If you want to schedule variable wakeup times in the future, it is possible to do, but it is not easy.

Link to post
Share on other sites
  • 3 weeks later...

 

I'm curious at what point this difference actually matters, if we assume the ARM devices are twice as fast as the MSP (at the same power consumption) than the startup difference would be erased after a handful of instructions. On the other side of things the STM devices have an RTC and can be set to periodically wake up every X seconds/minutes/hours vs only seconds on the MSP.

 

Mostly interrupt handlers.  Get an interrupt, do something as fast as possible (e.g., set a pin high).  I found out the Atmel Cortex M4 also has 1.5usec interrupt response (faster than the EFM) as well, but I'm not sure if that's after the clock goes stable.  On youtube, TI put up a comparison w/ the Microchip controllers (their main competitors in their opinion at the time) and it turns out the MSP430 stabilizes the clock on wakeup faster than the Microchip controller so that meant the Microchip was slower than the spec.

Link to post
Share on other sites

Something that I missed earlier is interrupt wakeup time of STM32L.  It wakes up from "STOP" mode to 4.2MHz in about 8us, or to 16 MHz is about 10us.  "STOP" mode is the equivalent of LPM3.  I am pretty sure the MSP430 cannot go from LPM3 to active in less time.  In fact, if I am running the SVM unit, the MSP430 requires close to 100us to go from LPM3 to active.  

 

In other words, on STM32L, the power supply monitor can run almost transparently with no added startup lag, but getting a kernel timer to work through STOP mode is quite an exercise.  On MSP430, it is quite an exercise to get supply voltage monitor running efficiently, but it is really easy to get a kernel timer working through LPM3.  On the EFM32, both are easy, of course discounting the somewhat more involved process of setting-up interrupts and peripherals on a Cortex-M device (but once you get used to that it's no big deal).  Also, EFM32 is "hella expensive" so it's not great for a lot of cost-sensitive products.

 

For the record, on my STM32L implementation I need to implement my UTC clock as a software task -- not really a huge deal, since I only need roughly minute resolution (kernel timer fills-in the seconds and millis).  On the MSP430 implementation, I need to implement my supply monitor as a software task that also runs about once per minute.

 

Once again, I think CC430, MSP430 G-series, and F55xx devices with 32KB flash or less are pretty great.  If your app can happily fit on one of these chips, MSP430 is probably the way to go.  If your app is too big for 32KB, it seems to be outside the sweet-spot for MSP430, and I would recommend Cortex-M such as STM32L.  Furthermore, there is a new value-line STM32L part coming out, which should lower the price even further.

Link to post
Share on other sites

On the EFM32, both are easy, of course discounting the somewhat more involved process of setting-up interrupts and peripherals on a Cortex-M device (but once you get used to that it's no big deal).

Are you saying interrupts and peripherals on the EFM32 are harder to setup than on the STM32? The STM32 is pretty brutal, would hate to think it gets worse.

 

Also how do you measure exact times of going from LMP3->active on the MSP430 when waking up from the timer?

Link to post
Share on other sites

Are you saying interrupts and peripherals on the EFM32 are harder to setup than on the STM32? The STM32 is pretty brutal, would hate to think it gets worse.

 

Also how do you measure exact times of going from LMP3->active on the MSP430 when waking up from the timer?

EFM32 architecturally almost identical to STM32L, since they both use Cortex-M3.  There are certain universal attributes of Cortex-M, such as the NVIC and APB systems.  In any case, it isn't so bad once you get used to it (it's just turning-on interrupts and clocks in two places instead of one place), but certainly I would estimate about one extra day for driver debugging with Cortex-M than I would with MSP430.  That said, for a system with two or more I/O streams, Cortex-M is actually easier to get right than MSP is, because the NVIC does a lot of work for you.

 

I don't measure with a timer, I measure with a button.  The first thing in the ISR is a line of code that brings the button pin to ground, and I measure the pulse on a logic analyzer or oscilloscope.  Once I have the number, I can subtract the number of clocks due to the line of code and get the interval.  The interrupt hardware treats a timer event or an external interrupt the same, or at least the difference is negligible.  You can get to that conclusion by looking at the schematics in the users' guide.  On the STM32L in particular, RTC interrupts are handled through the same hardware as the external interrupts.  On MSP430, they are different, but even if there is some synchronous logic in the interrupt hardware (there isn't for external line-in interrupts), I care less about losing half an ACLK period than I do about the amount of power expended during wakeup.

Link to post
Share on other sites

Something that I missed earlier is interrupt wakeup time of STM32L.  It wakes up from "STOP" mode to 4.2MHz in about 8us, or to 16 MHz is about 10us.  "STOP" mode is the equivalent of LPM3.  I am pretty sure the MSP430 cannot go from LPM3 to active in less time.  In fact, if I am running the SVM unit, the MSP430 requires close to 100us to go from LPM3 to active.  

 

Wait, so is this paper flawed?

 

http://www.ti.com/lit/wp/slay015/slay015.pdf

 

From what's described, I thought it mean 1us to start running because the clock stabilizes quicker than the PIC equivalent?  No comparison w/ the Cortex chips, but they probably don't think it's their main competition (at least not until now when the Cortex M0+ are so low power :-)

Link to post
Share on other sites

Wait, so is this paper flawed?

 

http://www.ti.com/lit/wp/slay015/slay015.pdf

I am using MSP430F550x / 5510 as reference, since these have somewhat comparable RAM, peripherals, and performance to Cortex-M devices -- although typically not as good.

 

I just looked at the datasheet again.  it says ~5us from LPM3/4 to active when SVM is off, and 150us when it is on.

 

2-series and value line chips have less RAM, fewer features, and slightly different architecture, so the paper isn't wrong, it just isn't helpful in comparing to Cortex-M.  IMHO, TI's next MSP would be better to use a low power Cortex-M architecture, or they should just abdicate from the upper-end MCU market and focus on competing against the likes of Microchip & Atmel with the current architecture in value-line trim.

Link to post
Share on other sites

I don't measure with a timer, I measure with a button.  The first thing in the ISR is a line of code that brings the button pin to ground, and I measure the pulse on a logic analyzer or oscilloscope.  Once I have the number, I can subtract the number of clocks due to the line of code and get the interval.  The interrupt hardware treats a timer event or an external interrupt the same, or at least the difference is negligible.  You can get to that conclusion by looking at the schematics in the users' guide.  On the STM32L in particular, RTC interrupts are handled through the same hardware as the external interrupts.  On MSP430, they are different, but even if there is some synchronous logic in the interrupt hardware (there isn't for external line-in interrupts), I care less about losing half an ACLK period than I do about the amount of power expended during wakeup.

Yeah I figured I'd try measuring with a button and a separate line, though I like your single channel technique better. I was mostly asking about measuring from a timer interrupt because I didn't know if there was some hidden delay of that vs an external IO interrupt. But sounds like even if there is a difference its very small and likely just would get lost in the noise.

Link to post
Share on other sites
I just looked at the datasheet again.  it says ~5us from LPM3/4 to active when SVM is off, and 150us when it is on.

 

Ahh...I'm using the value line stuff which has no SVM.

You might want to try this workaround if your battery voltage is high enough...basically turn off SVM if your voltage is high enough to keep power low and wakeup response speed high:

  http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/19047.aspx

 

150usec is snail slow...if the Atmel or NXP Cortex chips don't need a SVM, they're obvious choices :-P

Link to post
Share on other sites

You might want to try this workaround if your battery voltage is high enough...

I just check the battery voltage every hour or so.  SVM seems to be mostly useful if you have a capacitor buffer between a battery and a secondary source and the primary needs to be opened if the secondary is failing.  Kind of niche.  The 150us is for the regulator to stabilize.  If I turn off the regulator on STM32L, the startup is also slower.  BUT, the downside of leaving-on the regulator is much less on STM32L than on MSP430F55xx.  Pretty nice.

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...