<?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>S12 / MagniV MicrocontrollersのトピックRe: MM9Z1_638 sleep mode issue</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-sleep-mode-issue/m-p/1403241#M18422</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186056"&gt;@baji&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'm not the owner of the demo and the demo is provided "as is".&lt;/P&gt;
&lt;P&gt;But you can see what it does from the code.&lt;/P&gt;
&lt;P&gt;For example, the Goto Sleep command puts the MSCAN do Sleep mode and the MCU into Stop mode.&lt;/P&gt;
&lt;P&gt;The other two commands change the value of this switch:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1642768064677.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168483iB90AAF3B3E46970B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielmartynek_0-1642768064677.png" alt="danielmartynek_0-1642768064677.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and so on.&lt;/P&gt;
&lt;P&gt;Please go line by line and look into the code.&lt;/P&gt;
&lt;P&gt;If the code accesses a register, please refer to the datasheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 12:38:26 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2022-01-21T12:38:26Z</dc:date>
    <item>
      <title>MM9Z1_638 sleep mode issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-sleep-mode-issue/m-p/1402560#M18420</link>
      <description>&lt;P&gt;I am working with CAN transmission on MM9Z1_638 with demo board RD9Z1_638_4Li Rev 1.2, We establish CAN communication between MM9Z1_638 and MICROCHIP CAN analyzer with demo code (RD9Z1_638_12VLA_CAN_demo). The data is transmitting from MM9Z1_638 to CAN analyzer is ok and receiving data from CAN analyzer to MM9Z1_638 is also working ok. But what is the below sleep mode(CAN_IBS_Control.u16Var&amp;amp;0x8000), calibration mode(CAN_IBS_Control.u16Var&amp;amp;0x1000) &amp;amp; normal mode(CAN_IBS_Control.u16Var&amp;amp;0x2000) commands and Please help me to understanding these commands.&lt;/P&gt;&lt;P&gt;Here i am attching the code&amp;nbsp;&lt;/P&gt;&lt;P&gt;// read message object .....&lt;BR /&gt;(void) Check_CAN_MB_Status(CAN0, CANBUF3, &amp;amp;mbStat);&lt;BR /&gt;if((mbStat.Status == NEWDATA) || (mbStat.Status == OVERRUN)) { //Wait for the Receive ISR to finish and change the buffer status, NEWDATA indicates that the buffer has receive a new data&lt;BR /&gt;&lt;BR /&gt;err_status = Read_CAN_MB_Data(CAN0, CANBUF3, CAN_IBS_Control.byte);//Copy the received data in msCAN channel 0 buffer 2 to data_rec;&lt;BR /&gt;CAN_IBS_Control.u16Var = u16Swap(CAN_IBS_Control.u16Var);&lt;BR /&gt;//Clear buffer_status[0]&lt;BR /&gt;//err_status = Read_CAN_MB_Data(CAN0, CANBUF3, rec_data);&lt;BR /&gt;err_status = Load_CAN_MB(CAN0, CANBUF1, CAN_IBS_Control.byte);&lt;BR /&gt;err_status = Transmit_CAN_MB(CAN0, CANBUF1);&lt;BR /&gt;mbStat.Status = NODATA;&lt;BR /&gt;&lt;BR /&gt;if(CAN_IBS_Control.u16Var&amp;amp;0x8000) { // Goto Sleep Request&lt;BR /&gt;// goto sleep&lt;BR /&gt;err_status = Sleep_CAN(CAN0, CMPTX); // request CAN channel 0 go to sleep with completing transmission scheduled&lt;BR /&gt;do {&lt;BR /&gt;err_status = Check_CAN_Status(CAN0,CAN_status); // read the channel 0 status&lt;BR /&gt;}while (!(CAN_status[1]&amp;amp;SLPAK)); // wait till SLPAK bit set&lt;/P&gt;&lt;P&gt;//B_PCR_WUEH_WUPTB4 = 1; // enable PTB4 wakeup&lt;BR /&gt;ADCDisable();&lt;BR /&gt;TsenseDisable();&lt;BR /&gt;B_GPIO_VSENSE = 0;&lt;/P&gt;&lt;P&gt;CAN_STDBY(STANDBYMODE);&lt;BR /&gt;PTA_PTA1 = 0;&lt;BR /&gt;PCREnterStopMode();&lt;/P&gt;&lt;P&gt;// .....zzzzzzzzzzz (stop mode)&lt;BR /&gt;// after wakeup the code continues to run here....&lt;BR /&gt;// but first the D2D Interrupt service routine will be run&lt;BR /&gt;B_WD_CTL = WD_OFF;&lt;BR /&gt;VsenseInit(&amp;amp;(vList[0]), &amp;amp;vListEntries, &amp;amp;(vValues[0]));&lt;BR /&gt;CsenseInit(&amp;amp;(cList[0]), &amp;amp;cListEntries, &amp;amp;(cValues[0]));&lt;BR /&gt;TsenseInit(&amp;amp;(tList[0]), &amp;amp;tListEntries, &amp;amp;(tValues[0]));&lt;BR /&gt;ADCInit();&lt;BR /&gt;CAN_STDBY(NORMALMODE);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(CAN_IBS_Control.u16Var&amp;amp;0x1000) { // Goto Calib mode&lt;BR /&gt;Battery.tMode = BM_CALIBRATION;&lt;/P&gt;&lt;P&gt;CAN_IBS_Data.BatMode = Battery.tMode;&lt;BR /&gt;err_status = Load_CAN_MB(CAN0, CANBUF1, CAN_IBS_Data.byte);&lt;BR /&gt;err_status = Transmit_CAN_MB(CAN0, CANBUF1);&lt;BR /&gt;&lt;BR /&gt;err_status = Config_CAN_MB (CAN0, 8, RXDF, 8);&lt;BR /&gt;err_status = Config_CAN_MB (CAN0, 9, TXDF, 9);&lt;BR /&gt;}&lt;BR /&gt;if(CAN_IBS_Control.u16Var&amp;amp;0x2000) { // Goto normal mode&lt;BR /&gt;Battery.tMode = BM_DRIVING;&lt;BR /&gt;VsenseInit(&amp;amp;(vList[0]), &amp;amp;vListEntries, &amp;amp;(vValues[0]));&lt;BR /&gt;CsenseInit(&amp;amp;(cList[0]), &amp;amp;cListEntries, &amp;amp;(cValues[0]));&lt;BR /&gt;TsenseInit(&amp;amp;(tList[0]), &amp;amp;tListEntries, &amp;amp;(tValues[0]));&lt;BR /&gt;ADCInit();&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 10:17:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-sleep-mode-issue/m-p/1402560#M18420</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-01-20T10:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 sleep mode issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-sleep-mode-issue/m-p/1403241#M18422</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186056"&gt;@baji&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'm not the owner of the demo and the demo is provided "as is".&lt;/P&gt;
&lt;P&gt;But you can see what it does from the code.&lt;/P&gt;
&lt;P&gt;For example, the Goto Sleep command puts the MSCAN do Sleep mode and the MCU into Stop mode.&lt;/P&gt;
&lt;P&gt;The other two commands change the value of this switch:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1642768064677.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168483iB90AAF3B3E46970B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielmartynek_0-1642768064677.png" alt="danielmartynek_0-1642768064677.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and so on.&lt;/P&gt;
&lt;P&gt;Please go line by line and look into the code.&lt;/P&gt;
&lt;P&gt;If the code accesses a register, please refer to the datasheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 12:38:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-sleep-mode-issue/m-p/1403241#M18422</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-01-21T12:38:26Z</dc:date>
    </item>
  </channel>
</rss>

