Hi,
Diana is right, however I would like to add a few more comments I collected from my PC.
The device is CMOS which means current consumption dependence from BUSCLK is linear.
The current consumption does not depend on used voltage within required range because of internal voltage regulator.
It also depends on loads connected to the pins. Let’s take Table A-15. Run and Wait Current Characteristics and consider no load connected to the MCU. We consider only consumption of the MCU. The maximum current consumption presented in the data sheet is 22mA for 25 MHz BUSCLK and PLL on. If we simplify consideration and take stop current to be 0 mA then we can say:
I[mA] = 0.9 * BUSCLK[MHz]
Of course, this approximation isn’t really accurate.
When we use external oscillator, we should add 0.4mA to maximum consumption as worst case.
The MCU is able to work in static mode if clock monitor is disabled (not in case S12G) – you can clock it by push button connected to the EXTAL. However, some BUSCLK dependent peripherals (like SCI, SPI,…) will not be able to be set and work. It is also valid for periodical clock source with frequency lower than minimal defined by the data sheet. This could be used as a solution how to decrease consumption if speed is not required.
The second solution is to use either STOP or PSEUDO STOP mode of the MCU and wake up the MCU only for required time period. Current consumption for STOP and PSEUDO STOP mode is presented in the Table A-12. Full Stop Current Characteristics and Table A-13. Pseudo Stop Current Characteristics.
Note that the current consumption in the data sheet takes into account worst condition together with some safety gap.
Moreover:
Instantaneous current for one I/O pin is +/-25mA. This current is guaranteed for permanent pin load (thermal and dynamical influence of the current is taken into consideration). This value is maximum immediate value and it is not allowed to be calculated as average value in the case of PWM pin. Beyond absolute maximum ratings device might be damaged.
However, this value is valid if and only if maximum value of MCU power consumption does not exceed maximum allowable current and temperature (power losses) of the MCU.
- 25mA is a current limit and in general it is not recommended to use more than +/-20mA DC current through any IO pin.
For standard pin:
Rdson can be calculated (Table A-9 5V I/O Characteristics – items either 7 or 8):
Rdson = 0.8V/0.004A = 200 ohm (voltage drop/defined current)
For example, you use 6 * 4mA loads, LQFP 100, double sided PCB. Table A-5 of the device guide (Thermal package characteristics) -> (36) Thermal resistance=61 K/W.
Let ambient temperature is 50 deg. C then chip temperature is:
50 + 61*6*(0.8*0.004A)=51.17 deg.C. This temperature has to be less than max. operating junction temperature.
(Table A-4 of the device guide.)
Moreover, I would like to bring into your notice that the data sheet defines voltage drop 0.8V at 4mA load. It means that higher current could cause higher voltage drop and you can get out of voltage level specification.
The current we can take through the power supply ring on the silicon itself is surprisingly low (60mA). It is a limit per Vddx and Vssx rail individually. It means you can drive a few loads to log.1 and few loads to log.0 in order to increase number of loads.
(Let’s suppose 6x10mA diodes switched to log.0 and 6x10mA diodes switched to log.1 (supplied directly from MCU pins). In this case 60mA flows from Vddx through diodes to gnd. Next 60mA flows from external source through diodes to VSSX. In this case we are able to drive 600mA but we are not allowed to add any load. If higher current than 60mA flows through VDDX or VSSX it can destroy this pin because of current density.)
So the umber of VDDX/VSSX pairs has influence on the current the MCU can manage from pin loads point of view.
Let's say an automotive dashboard manufacturer wants to drive 10 LEDs with the micro (driven to log. 1 – Vddx supplies diodes), 10mA each. That is 100mA of current, 0.8V drop across the I/O structure => 80mW power dissipation. That will take the device temperature up by 4.9degC (at 61K/W). That is not too much in terms of temperature rise, but the current is the 40mA over limit!
Moreover, I would like to bring into your notice the document AN2434 - Input_Output (I_O) Pin Drivers to see information about Voh and Vol dependence on load current.
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2434.pdf
It is older application node created for S12 MCUs at 250nm technology, therefore absolute value doesn’t need to fits, but general information is valid.
Note: Do not forget at maximum injection current. It is not allowed to be higher than +/-2.5 mA for one pin and sum of all injection currents is not allowed to exceed +/-25mA. Each pin is connected to some of the VDD sources (see Table 2-1. Signal Properties Summary) through ESD protection diode. If the current is higher the diode can be destroyed.
There are two types of diode failing – short-circuit and disconnection.
- a) In both cases can happen that diode in failure can burn out also area close to it.
- b) In the case of short circuit you get direct connection between two independent sources which can on the base of short-circuit parameters cause local overheating.
- c) In the second case you will lose ESD protection which does not have to affect MCU behavior but nobody will guarantee that it will not cause any problems in the near or far future.
VDDX, VSSX – each VDDX and VSSX pin is able to conduct 60mA. Entire current consumed by VDDX, VSSX loads is not allowed to exceed 60mA to each side due to electromigration limit – you can drive 60mA to log1 (current flows from VDDX to the load) and 60mA to log.0 (current flows from load to the VSSX of the MCU) => 120mA. (plus we can multiply this value by a number of VDDX/VSSX pairs)
There is a Table 1-22 100-Pin LQFP Pinout for S12G96 and S12G128 in the spec which denotes which pins are supplied by what supply.
Best regards,
Ladislav