Author Topic: Are there any advantages with slower clock speeds?  (Read 3593 times)

0 Members and 1 Guest are viewing this topic.

Offline lollandsterTopic starter

  • Contributor
  • Posts: 40
  • Country: no
Are there any advantages with slower clock speeds?
« on: January 10, 2019, 11:04:36 am »
Hello forum! (long time listener, first time caller here)
I am finishing up a project I'm working on and doing some robustification and I am wondering if slowing down the system clock will be advantageous.

Background info: I'm using a STM32F4 MCU to do move some data and during the development I turned on the PLL and cranked the MCU to its full 64MHz so I would have some headroom while working. Now that I have everything working, I am trying to make it as robust as possible. Almost everything is handled by externally triggered timers/counters and FIFO registers, there is nothing really time critical or CPU intensive happening in the core. I think using the HSI to drive the system clock directly at 16 MHz would work fine, but it will take a few hours to accomplish so I won't do it there is no benefit.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: Are there any advantages with slower clock speeds?
« Reply #1 on: January 10, 2019, 11:09:00 am »
A slower clock speed will result in lower power consumption.

But in some applications you can get to a point where you're better off running faster so you can wake up, execute quickly and then go back to sleep.

Of course, if you don't have any need for low power it doesn't really matter.

Other advantages for clocking slower are
- Lower voltage is possible
- Ability to run stable at a higher ambient temp
« Last Edit: January 10, 2019, 11:13:58 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline lollandsterTopic starter

  • Contributor
  • Posts: 40
  • Country: no
Re: Are there any advantages with slower clock speeds?
« Reply #2 on: January 10, 2019, 11:32:16 am »
A slower clock speed will result in lower power consumption.

But in some applications you can get to a point where you're better off running faster so you can wake up, execute quickly and then go back to sleep.

Of course, if you don't have any need for low power it doesn't really matter.

Other advantages for clocking slower are
- Lower voltage is possible
- Ability to run stable at a higher ambient temp
Well that's something interesting. I don't care about the power consumption and voltage for the application, but temperature is an issue, so please tell me more. Especially interested if it makes a difference in low temperatures close to the limit of -40°C.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16794
  • Country: lv
Re: Are there any advantages with slower clock speeds?
« Reply #3 on: January 10, 2019, 11:59:36 am »
Well that's something interesting. I don't care about the power consumption and voltage for the application, but temperature is an issue, so please tell me more. Especially interested if it makes a difference in low temperatures close to the limit of -40°C.
At low temperatures you may want higher heat output to heat device from inside.
 

Offline ehughes

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
Re: Are there any advantages with slower clock speeds?
« Reply #4 on: January 10, 2019, 02:39:17 pm »
Lower Power and stability over temperature.

At the higher end of the temperature spectrum, it can be important.       I had a game system for MakerFaire NYC built using a Teensy (A version with an ARM cortex).      For whatever reason, the creator of teensy product decided the default setting in the "teensyduino" software was to overclock the MCU.   (Which is REALLY dumb, especially for the target audience).      In my case I found that I would get periodic crashes.   Turned out to be a temperature + over clocking issue.       After about +40C,   I could reliably make the CPU glitch/reset on demand.

 

In your case, there is no harm in turning the clock down as long the software/peripherals are not dependent on a certain clock rate.


 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Are there any advantages with slower clock speeds?
« Reply #5 on: January 10, 2019, 04:09:31 pm »
A slower clock also often causes less EMI issues.  Some µCs allow running on a lower voltage at lower speed.
If not at it's maximum speed there often is more tolerance to something like supply ripple.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14297
  • Country: fr
Re: Are there any advantages with slower clock speeds?
« Reply #6 on: January 10, 2019, 04:22:38 pm »
Just a detail here, but the slowest STM32F4 (wich is a 401 if I'm not missing one) can run at up to 84MHz, and the fastest ones are rated to 180MHz, so 64MHz is not quite "full speed" (or did I miss a model?)

Other than that, as already said. If you're not using low-power modes and run at full-speed all the time, a slower clock speed will invariably result in lower power draw.
If you're using low-power modes, then it can depend on the "duty cycle", overhead of waking-up, etc.

Unless you have specific reasons to clock the device at a higher frequency than needed, I would suggest lowering it. Just provide some headroom as needed depending on your timing constraints. I don't like wasting energy for no reason.

Look up the "Supply current characteristics" section in the datasheet to get some figures.
 

Offline lollandsterTopic starter

  • Contributor
  • Posts: 40
  • Country: no
Re: Are there any advantages with slower clock speeds?
« Reply #7 on: January 10, 2019, 05:21:01 pm »
Just a detail here, but the slowest STM32F4 (wich is a 401 if I'm not missing one) can run at up to 84MHz, and the fastest ones are rated to 180MHz, so 64MHz is not quite "full speed" (or did I miss a model?)
You're probably correct, the confusion comes from the fact that I used a Nucleo-F303K8 during the majority of the development, the target is a F401 though (I don't want to go into why).

A slower clock also often causes less EMI issues.  Some µCs allow running on a lower voltage at lower speed.
If not at it's maximum speed there often is more tolerance to something like supply ripple.
This is a point I have been thinking about, but I'm much more afraid of external sources affecting the MCU than vice versa. I will not pretend to understand power, but I know that the supply will be good (I'm not the one laying out the board).

Lower Power and stability over temperature.
Good reasons


You have all convinced me to go for the lower clock speed. Thanks.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Are there any advantages with slower clock speeds?
« Reply #8 on: January 10, 2019, 05:52:40 pm »
EMC.  Many regulations, you only need to test to 10 or 20 times the maximum clock frequency in the system.

Not just clock speed, but edge rate as well.  Use the minimum pin drive strength needed, especially when those pins drive cables that can radiate.  Add ferrite beads or RCs as needed (and ESD protection is obligatory!).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline a59d1

  • Regular Contributor
  • *
  • Posts: 102
  • Country: us
Re: Are there any advantages with slower clock speeds?
« Reply #9 on: January 10, 2019, 11:17:01 pm »
Isn't the main problem with running MCUs at low temperatures the casing/leadframe? I've seen pretty generic SMT ICs used in cryogenic environments way colder than -40 C.
 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1527
  • Country: au
Re: Are there any advantages with slower clock speeds?
« Reply #10 on: January 10, 2019, 11:41:37 pm »
EMC yet again.

In Australia it is my understanding that below certain clock rate there is no need to consider the micro.

Ordinarily all micro based product has to be tested .

Combinational logic performing same function does not.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Are there any advantages with slower clock speeds?
« Reply #11 on: January 11, 2019, 02:44:57 pm »
Isn't the main problem with running MCUs at low temperatures the casing/leadframe? I've seen pretty generic SMT ICs used in cryogenic environments way colder than -40 C.

The transistor properties change with temperature. If this too much the chips would no longer work as intended. For the CMOS chips the main problem should be shifting in the gate thresholds. Within bounds it may help to adjust the supply.
 

Offline DBecker

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: Are there any advantages with slower clock speeds?
« Reply #12 on: January 17, 2019, 02:24:39 am »
With CMOS lowering the clock rate alone will generally not result in power savings.
"Rushing to a solution" and sleeping will typically use the same or less power.

What lowering the clock rate does is allowing the core to run at a lower voltage.  This results in a dramatic power savings.

With the STM32 chips there is an added twist.  Higher clock rates often require wait states for reading program flash.  Lowering the clock to avoid wait states can reduce power use without a proportional reduction in performance.

A reasonable approach is to develop and debug with the core and pin drive at the highest speed.  Add measurement code to see your performance margin.  Then reduce the core clock rate and verify that you still have margin.  For the pin drive, set to the lowest drive level / slew rate ("speed") that you can and check that everything still works.

 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Are there any advantages with slower clock speeds?
« Reply #13 on: January 17, 2019, 03:25:23 am »
For my own projects. Selecting a lower clock rate can let me better lock step parts of my program. E.g. recording values from an ADC and piping it out over SPI. Well there is a limit to how fast the ADC can sample. So by getting the 2 matched well there is almost no wasted clock cycles. In this case running faster core clocks still wont let me sleep the micro any faster. So i save power overall.
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: Are there any advantages with slower clock speeds?
« Reply #14 on: January 17, 2019, 03:33:47 am »
If you spend some time supporting MCU products, one of the interesting things you find is that only a small percentage of the chips you sell are operated at the maximum rated speed. There are numerous reasons - reduced EMI, reduced power consumption. etc. - but whatever the motivation, at the end of the day most MCUs are run fairly slow. The main exception is when the MCU is performing some kind of signal processing.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nl
Re: Are there any advantages with slower clock speeds?
« Reply #15 on: January 17, 2019, 11:21:52 am »
If you look at STM32L4 chips, you will find their datasheet specifies the current consumption of the device at 100kHz, 400kHz and 1 or 2MHz. In an upcoming project I plan to use the device at 100kHz or maybe 400kHz.

The obvious advantage is power. Some products may use these higher-end chips for some kind of peripheral or memory requirement.

In some applications it may be more low energy to "race to sleep". For example, a MCU may have an oscillator driver that always consumes a fixed amount of power. The rest of the device typically scales with some uA/MHz slope depending on the selected system clock.
It may save a bit of energy to run the device at full speed and go to a deep sleep mode where the oscillator is turned off, rather than operating at a lower clock with lower efficiency.
« Last Edit: January 17, 2019, 11:43:57 am by hans »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf