摘要 |
<p>PROBLEM TO BE SOLVED: To prevent the processing of a peripheral circuit from being made invalid at the time of transition to a low power consumption mode. SOLUTION: A method for controlling a microcontroller 100 equipped with a CPU 110, peripheral circuit 120, and clock supply controlling part 130 for individually outputting a clock C2 for a CPU for driving the CPU and a peripheral clock C3 for driving the peripheral circuit includes a process for judging whether or not the peripheral circuit is operated and a process for switching the CPU clock and the peripheral clock to a low power consumption mode when it is judged that the peripheral circuit is not operated in the process. The method includes also a process for switching the CPU clock to the low power consumption mode when it is judged that the peripheral circuit is operated in the process, and for switching the peripheral clock to the low power consumption mode after the operation of the peripheral circuit is ended. Therefore, the processing of the peripheral circuit can be prevented from being made invalid.</p> |