<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>8-bit MicrocontrollersのトピックRe: How can I reduce MCU consumption? (s08)</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-I-reduce-MCU-consumption-s08/m-p/1594040#M23646</link>
    <description>&lt;P&gt;This problem was solved. Instead of calling function `_EntryPoint` again, I wrote a function in file `main.c` and called this function before the command `asm(stop);`&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void stop3(){
setReg8(SOPT1, 0x20U);
setReg8(SOPT2, 0x00U);
setReg8(SPMSC1, 0x1CU);
setReg8(SPMSC2, 0x00U);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Then, In `main()` I called above function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;while(1){
    if (T_Timer &amp;gt;= 10000){
    stop3();
    asm(stop);
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With this, the normal consumption, which was 60 milliamps, was reduced to 40 milliamps. which, if we don't consider that the LEDs of the circuit are on, it will significantly reduce the consumption.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 06:03:39 GMT</pubDate>
    <dc:creator>mehdializadeh</dc:creator>
    <dc:date>2023-02-07T06:03:39Z</dc:date>
    <item>
      <title>How can I reduce MCU consumption? (s08)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-I-reduce-MCU-consumption-s08/m-p/1594002#M23645</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am using MC9S08DZ96 microcontroller. Normally, when the program is running, 30 milliamps of current is consumed. I know I have to put the MCU in sleep mode. For this, I wrote a function that sets the relevant registers.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void stop3(){
	setReg8(SOPT1, 0x20U);                
	setReg8(SOPT2, 0x00U);                
	setReg8(SPMSC1, 0x1CU);               
	setReg8(SPMSC2, 0x00U); 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;And now, with the `&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;asm(stop);&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;` command, I will take the MCU to sleep mode. I want the current consumption to reach 10 milliamps by lowering the clock and disabling different parts of the microcontroller.&lt;BR /&gt;With this method I have done, the current consumption did not decrease. Can anyone help me?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 14:16:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-I-reduce-MCU-consumption-s08/m-p/1594002#M23645</guid>
      <dc:creator>mehdializadeh</dc:creator>
      <dc:date>2023-02-06T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I reduce MCU consumption? (s08)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-I-reduce-MCU-consumption-s08/m-p/1594040#M23646</link>
      <description>&lt;P&gt;This problem was solved. Instead of calling function `_EntryPoint` again, I wrote a function in file `main.c` and called this function before the command `asm(stop);`&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void stop3(){
setReg8(SOPT1, 0x20U);
setReg8(SOPT2, 0x00U);
setReg8(SPMSC1, 0x1CU);
setReg8(SPMSC2, 0x00U);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Then, In `main()` I called above function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;while(1){
    if (T_Timer &amp;gt;= 10000){
    stop3();
    asm(stop);
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With this, the normal consumption, which was 60 milliamps, was reduced to 40 milliamps. which, if we don't consider that the LEDs of the circuit are on, it will significantly reduce the consumption.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 06:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-I-reduce-MCU-consumption-s08/m-p/1594040#M23646</guid>
      <dc:creator>mehdializadeh</dc:creator>
      <dc:date>2023-02-07T06:03:39Z</dc:date>
    </item>
  </channel>
</rss>

