Electrical Engineering Asked on October 29, 2021
I am using this Microcontroller – S32K142 64 pin.
From the Figure 4 in this Application Note, We can see there are 4 clock sources for the Microcontroller.
FIRC – 48MHz
SIRC – 8MHz
SOSC – 4-40MHz
LPO – 128kHz
SPLL – 112MHz
From the clocking tree diagram, Figure 4 in the application note attached, I can see that the core clock frequency of the Microcontroller can be derived from any one of the sources like FIRC, SIRC or SOSC and can be upconverted with the help of the SPLL.
My questions :
What is the maximum core clock frequency that the microcontroller SPLL can provide? Is it the 112MHz from the SPLL?
Objective is to calculate the current consumption due to different peripherals (Like I2C, SPI etc) and their clock module sources (like if I am using FIRC, SIRC and SPLL simultaneously)
Regarding current consumption – Suppose I use the 112MHz as the core clock frequency of the microcontroller i.e.HSRUN mode, from Table 13 of the datasheet,I get that, at 25degC, the current due to the oscillator is 112*360uA = 40.32mA? Isn’t this a very high value? Am I correct in calculating the oscillator current, this way?
So, If I enable all the peripherals in HSRUN mode, my total microcontroller current consumption would be 52.2mA+40.32mA = 92.52mA. Is this correct?
But I am confused like, what about the current consumption due to FIRC & SIRC usage(suppose if I use FIRC & SIRC clock source also)? Suppose, I also use the FIRC module for some other peripherals, say like SPI at 48MHz. What would be the current consumption due to the FIRC module usage? Would it be 48*360uA = 17.28mA?
And I use the SIRC for I2C Interface (downconverting the 8MHz SIRC to 400kHz). How to calculate the current consumption due to SIRC source?
(The 40.32mA current was only due to the HSRUN mode which derived its frequency from a external resonator of 8MHz and upconverted to 112MHz by the SPLL). So, should I add the currents as I am using 3 different clock sources (FIRC, SIRC and SPLL)?
Please help to clarify – to calculate the current consumption due to different clock source (FIRC,SIRC and SPLL) module usage and peripheral module usages?
I had a quick look at the datasheet. I'm not familiar with this particular microcontroller, but I've used a lot of other Cortex M0/M3/M4/M7 chips, including low-power and high-speed ones. So I'll answer in slightly more general terms.
This microcontroller is described as an "ultra-reliable, general purpose automotive" device. That doesn't sound like low power to me; automotive comes with huge batteries :) If you're actually concerned about the difference between 40mA and 50mA current draw, this is probably the wrong device for you. Consider two questions: 1. Why do you care about power usage at all? and 2. Why this exact microcontroller?
The best low-power Cortex chips can draw about 10x less power or 5x less current than this while running at the same speed, and only draw a few nA in deep sleep mode (eg: STM32L4). This particular device isn't trying to be power efficient; it is probably optimized for something else. Low power is a tradeoff, it can cost you in other areas (speed, complexity, cost, ...). From your question, I think what you really need to do is go back to the drawing board and consider what is the actual spec: what does the device need to do? number of wakeups per second/amount of time spent running? how much power is available? and then your choice of device/family in light of the spec. Most likely, you either don't need to worry about power usage at all, or you need to make it the primary factor, including selecting a device primarily because of its power efficiency. Design usually starts from the spec, not from the device.
"What is the maximum core clock frequency that the microcontroller SPLL can provide?" - The SPLL can provide 160 MHz, see Table 34. SPLL electrical specifications. However the core can't run above 112 MHz. I'm not sure what happens if the SPLL is clocked too high for the core - it probably runs, but unreliably; that would be overclocking for microcontrollers. It may also be possible to clock some peripherals from 160MHz and clock the core from 160MHz/2.
"Objective is to calculate the current consumption due to different peripherals (Like I2C, SPI etc) and their clock module sources" - In general, the current consumption of different peripherals would just get added together to a total. The datasheet numbers for current may not be entirely accurate though, so if you really need accuracy (or if you need to know the worst-case) it is best to measure a batch of devices in a real-life scenario. Don't forget about current variation over operating temperature (higher at higher temperatures).
"Suppose I use the 112MHz as the core clock frequency of the microcontroller i.e.HSRUN mode, from Table 13 of the datasheet,I get that, at 25degC, the current due to the oscillator is 112*360uA = 40.32mA? Isn't this a very high value? Am I correct in calculating the oscillator current, this way?" - Yes, that's correct. The table says 40.5mA for that scenario, which is probably 40.32mA rounded up. No, it is not very high; it is just kinda mediocre for an ARM chip. Note that this is the current for oscillator and core, you could have the clock running with the core stopped, but it doesn't make sense to do that for very long.
"So, If I enable all the peripherals in HSRUN mode, my total microcontroller current consumption would be 52.2mA+40.32mA = 92.52mA. Is this correct?" - No, it's just 52.2mA total. Check the spreadsheet S32K1xx_Power_Modes _Configuration.xlsx to see which peripherals were measured.
"Suppose, I also use the FIRC module for some other peripherals, say like SPI at 48MHz. What would be the current consumption due to the FIRC module usage? Would it be 48*360uA = 17.28mA?" - No. The current/MHz for FIRC is not specifically listed in the datasheet, but at 48MHz it is probably similar to the STOP1 mode (clocked from FIRC) scenario in Table 13, 6.4mA.
"And I use the SIRC for I2C Interface (downconverting the 8MHz SIRC to 400kHz). How to calculate the current consumption due to SIRC source?" - I don't know; best bet is to measure it. It would probably be low compared to the other clocks since the speed is lower, a few mA.
"So, should I add the currents as I am using 3 different clock sources (FIRC, SIRC and SPLL)?" - Yes.
Answered by Alex I on October 29, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP