Are there any advantages with slower clock speeds? - Page 1
Forum section: electronics / general

author: lollandster
author_rank: Contributor
timestamp: January 10, 2019, 11:04:36 am
content: 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.

author: Psi
author_rank: Super Contributor
timestamp: January 10, 2019, 11:09:00 am
content: 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

author: lollandster
author_rank: Contributor
timestamp: January 10, 2019, 11:32:16 am
content: Quote from: Psi on January 10, 2019, 11:09:00 amWell 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.

author: wraper
author_rank: Unknown
timestamp: January 10, 2019, 11:59:36 am
content: Quote from: lollandster on January 10, 2019, 11:32:16 amAt low temperatures you may want higher heat output to heat device from inside.

author: ehughes
author_rank: Frequent Contributor
timestamp: January 10, 2019, 02:39:17 pm
content: 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.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 10, 2019, 04:09:31 pm
content: 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 10, 2019, 04:22:38 pm
content: 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.

author: lollandster
author_rank: Contributor
timestamp: January 10, 2019, 05:21:01 pm
content: Quote from: SiliconWizard on January 10, 2019, 04:22:38 pmYou'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).Quote from: Kleinstein on January 10, 2019, 04:09:31 pmThis 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).Quote from: ehughes on January 10, 2019, 02:39:17 pmGood reasonsYou have all convinced me to go for the lower clock speed. Thanks.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 10, 2019, 05:52:40 pm
content: 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

author: a59d1
author_rank: Regular Contributor
timestamp: January 10, 2019, 11:17:01 pm
content: 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.

author: IconicPCB
author_rank: Super Contributor
timestamp: January 10, 2019, 11:41:37 pm
content: 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.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 11, 2019, 02:44:57 pm
content: Quote from: a59d1 on January 10, 2019, 11:17:01 pmThe 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.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 17, 2019, 02:24:39 am
content: 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.

author: Rerouter
author_rank: Super Contributor
timestamp: January 17, 2019, 03:25:23 am
content: 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.

author: coppice
author_rank: Super Contributor
timestamp: January 17, 2019, 03:33:47 am
content: 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.

author: hans
author_rank: Super Contributor
timestamp: January 17, 2019, 11:21:52 am
content: 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 lowenergyto "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.