Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Microcontroller Current Consumption when different internal and external clock modules are used simultaneously

FreshmanNewbie

Member level 2
Joined
May 10, 2020
Messages
50
Helped
0
Reputation
0
Reaction score
1
Trophy points
8
Activity points
604
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 :

  1. What is the maximum core clock frequency that the microcontroller SPLL can provide? Is it the 112MHz from the SPLL?
  2. 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?
 

danadakk

Full Member level 4
Joined
Mar 26, 2018
Messages
217
Helped
31
Reputation
61
Reaction score
30
Trophy points
28
Activity points
1,113
You could always write a simple routine to try the different clock sources
and measure Idd on the part. A fast way of getting answers.

Regards, Dana.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,469
Helped
3,946
Reputation
7,890
Reaction score
3,815
Trophy points
113
Activity points
115,806
Hi,

I assume (but to be honest I didn't go deeply through the datasheet) the values in the table 13 us the total current consumption.
You just need to use the "uA/MHz" value when your frequency differs from the given frequency.

Klaus
 

FreshmanNewbie

Member level 2
Joined
May 10, 2020
Messages
50
Helped
0
Reputation
0
Reaction score
1
Trophy points
8
Activity points
604
Hi,

I assume (but to be honest I didn't go deeply through the datasheet) the values in the table 13 us the total current consumption.
You just need to use the "uA/MHz" value when your frequency differs from the given frequency.

Klaus
Thank you for the answer. If I use FIRC, SIRC and the SPLL Clock sources, does each clock sources consume current? If so, how to calculate them?
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,469
Helped
3,946
Reputation
7,890
Reaction score
3,815
Trophy points
113
Activity points
115,806
Hi,

I'm a bit confused. Please tell me. You use all this three clock sources at the same time.
But only one can be used to run the microcontroler. Or am I wrong here?

Or what is each clock source used for?

Klaus
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,987
Helped
13,938
Reputation
28,124
Reaction score
12,576
Trophy points
1,393
Location
Bochum, Germany
Activity points
273,971
Most of the power consumption is caused by running controller resources (core, memory and peripherals) at a certain clock speed. In addition each activated clock source is consuming some power on its own. Not sure if it makes sense to run multiple clock sources simultaneously with this controller. If so, the power consumption will more depend on the actual clocking speed of each resources than the clock source.

I presume that the manufacturer documents allow to calculate expectable power consumption in advance, but you probably want to check it in real hardware.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,469
Helped
3,946
Reputation
7,890
Reaction score
3,815
Trophy points
113
Activity points
115,806
Hi,

And usually the actual consumption depends on code.
I assume a NOP consumes the least power.

Klaus
 

FreshmanNewbie

Member level 2
Joined
May 10, 2020
Messages
50
Helped
0
Reputation
0
Reaction score
1
Trophy points
8
Activity points
604
Hi,

I'm a bit confused. Please tell me. You use all this three clock sources at the same time.
But only one can be used to run the microcontroler. Or am I wrong here?

Or what is each clock source used for?

Klaus
I am thinking like, let's assume the Microcontroller core is operating at a speed of 80MHz. I am using the SPLL for this

And I am using a SPI peripheral which requires a speed of 8MHz. For this, I am using the FIRC Clock which is 48MHz and dividing it. (Yes, I know I could SIRC for this. But let's us assume I am assuming the FIRC only for this)

And also, I am using a I2C peripheral which requires a speed of 400kHz. For this, I am using the SIRC Clock which is 8MHz and dividing it.

So, in the above scenario, I am using the SPLL, FIRC and SIRC clock sources for different functions. In this case, does each clock source consume individual current and all are operating simultaneously.

So, in this case, how to calculate the current consumption due to the different internal clock sources which are running simultaneously?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,987
Helped
13,938
Reputation
28,124
Reaction score
12,576
Trophy points
1,393
Location
Bochum, Germany
Activity points
273,971
For the many processors, the information is in the reference manual and datasheet. If not, make a measurement.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,469
Helped
3,946
Reputation
7,890
Reaction score
3,815
Trophy points
113
Activity points
115,806
Hi

I don't know the details about your microcontroller.
But all microcontrollers I know are happy with just one clock source and all periferals can be driven from it.

Isn't this possible with your microcontroller, or why are you using multiple clock sources?

Klaus
 

Carry for cents bazar

Junior Member level 1
Joined
Aug 2, 2020
Messages
16
Helped
3
Reputation
6
Reaction score
3
Trophy points
3
Location
CZ
Activity points
130
There is a possibility to switch between clock sources, but its not necessary in all cases. As for the current consumption, if its not written in the datasheet, you can only measure it.
 

FreshmanNewbie

Member level 2
Joined
May 10, 2020
Messages
50
Helped
0
Reputation
0
Reaction score
1
Trophy points
8
Activity points
604
Hi

I don't know the details about your microcontroller.
But all microcontrollers I know are happy with just one clock source and all periferals can be driven from it.

Isn't this possible with your microcontroller, or why are you using multiple clock sources?

Klaus
I am not going to actually use multiple clock sources. Just want to understand theoretical concepts like what would happen in such cases
 

danadakk

Full Member level 4
Joined
Mar 26, 2018
Messages
217
Helped
31
Reputation
61
Reaction score
30
Trophy points
28
Activity points
1,113
This is the clock domain overview for one series of ARM cores (M3). As you can see it consists
of multiple sources derived from oscillator and PLL sources.

1596448314129.png
Regards, Dana.
 

Carry for cents bazar

Junior Member level 1
Joined
Aug 2, 2020
Messages
16
Helped
3
Reputation
6
Reaction score
3
Trophy points
3
Location
CZ
Activity points
130
In other words, it depends on the internal or external hardware/ circuit/ module that is used. Processors may look like 1 chip, but inside there are many transistors, memories, modules and others.
 

Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top