HCS12 STOP MODE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HCS12 STOP MODE

2,934 Views
prog_ram
Contributor III
Hello,
I want to put the MCU in STOP mode.
the procedure for doing that is:
1. Clear the S bit in the CCR.
2. execute STOP instruction.
 
my MCU is running from the PLL, the Crystal freq. is 16MHz and the Bus clock is 24Mhz.
I read from the Spec. that when the MCU is in the stop mode, it consumes very small current (less than 1mA) or even less.
but what i get on my board is total current of 25mA!
although the other ICs on the board consume all together less than 1mA.
 
when I put the MCU in the Stop mode, it actually goes into the stop mode, and I can see a reduction in the total current consumed, but it's far more than what the Spec. tell.
 
What would be the reason for such high current in Stop mode?
 
thanks a lot for the help..
 
Prog-Ram.
Labels (1)
0 Kudos
3 Replies

459 Views
Witztronics
Contributor IV
This is from app note AN2461.  It's very good information for getting the lowest power.
>>>>>
When the HCS12 goes in any low-power mode, the content of its registers remain unchanged. In particular the ports keep their configuration. So, it is important to set the ports in a state that may not lead to a current consumption increase at the application level. Software and hardware engineers should follow these guidelines in order to avoid additional current consumption:

• One should not leave any I/O configured as an unconnected input but tie them to Vdd or Vss. Or one can also set unconnected I/O as output thus forcing a steady level.

• The same recommendation applies to unbonded I/O on small packages (on the QFP80 package vs QFP112 for instance). In this case we recommend setting the unbonded I/O as output.

• For inputs whose logic state is uncertain (for a Hall-effect sensor signal for instance), one should use external pull-up or pull-down resistors instead of the internal ones that are “weak” (typically between 20kΩ and 50kΩ). This way the power consumption is minimized in case the level of these inputs changes during the low-power mode.

Example: When using an input with internal pull-up, if the input signal goes low, we may get an additional current consumption of 5V / 20,000 = 250μA !

Disabling the internal pull-up and using an external 100kΩ pull-up resistor in this case would only lead to 50μA additional consumption at the application level.

• In some cases, peripheral devices can be powered down (if connected to V2 of the SBC for instance). This implies that their I/O have an undefined state. In such cases it might be better to set the MCU port as an output in order to set a fixed level (to be defined depending on the device), thus avoiding floating nodes.

>>>>>>>>>>>

I hope this helps.

0 Kudos

459 Views
prog_ram
Contributor III
 thanks Witztronics for the info.
I read the applications, and I would like tell you the following settings I have.
 
I am using only the MSCAN module and ECT and PLL and BDM. I don't use any other ones.
so only the pins for the H/L CAN lines are used here (The ECT is used only for internal timing operations).
all ATD pins are grounded.
Vrh is connected to VDD.
All unused pins are left floating with the default settings in the registers (after Reset).
the BDM is used (standart pin header and configuration is used).
IRQ is left floating (it will take the "out-of-reset" defualt settings).
my other ICs consume about 1mA (total).
 
currently, I get the MCU go to sleep mode and waken up by CAN activity without any problem. the only problem I have is the current consumption, and I still get high current consmuption, and don't know why!!
on functionality point of view, the MCU is working perfectly. but just the current problem.
 
any, any help here will be great.
 
thanks.
 
 
 
0 Kudos

459 Views
Lundin
Senior Contributor IV
Unless you are actively writing to the PUCR register, it isn't possible to leave IRQ floating, since it is shared with PE1, and the whole PORTE has internal pull-ups enabled out of reset.

The advices by Witztronics are not only good for low current consumption, but also for EMI immunity. For that, you should use external pull-resistors on all ports that don't have an internal one enabled out of reset. That is, every port but PORTE, PORTK, PTS, PTJ.

Also, I take it there is no CAN tranceiver on the board? Otherwise I doubt you would get such low current from the other ICs, since you are using MSCAN.
0 Kudos