<?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>topic Re: MM9Z1_638 Low Power Modes in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1410986#M18484</link>
    <description>&lt;P&gt;Baji,&lt;/P&gt;&lt;P&gt;Yes, I expect you do not need the MC33879 in your design. You also might take a look at our 12V Lead Acid Reference Design with CAN:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/design/designs/12-v-lead-acid-battery-sensor-with-can:RD9Z1-638-12V-C" target="_blank"&gt;https://www.nxp.com/design/designs/12-v-lead-acid-battery-sensor-with-can:RD9Z1-638-12V-C&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want I can review your designs schematics (&lt;A href="mailto:wolfgang.bihlmayr@nxp.com" target="_blank"&gt;wolfgang.bihlmayr@nxp.com&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;W.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Feb 2022 12:20:08 GMT</pubDate>
    <dc:creator>Q_man</dc:creator>
    <dc:date>2022-02-09T12:20:08Z</dc:date>
    <item>
      <title>MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1404504#M18426</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am working on Battary management system, in that i am established the CAN communication and by using CAN cCANommunication i put the CAN module in sleep mode but i am unable to wakeup the processor.&lt;/P&gt;&lt;P&gt;Please help me to wake up the processor and below is the code.&lt;/P&gt;&lt;P&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;BR /&gt;&lt;BR /&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;B_PCR_CTL = OPM_SET_NORMAL; /* set normal mode*/ // bb&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;</description>
      <pubDate>Tue, 25 Jan 2022 10:13:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1404504#M18426</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-01-25T10:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1405239#M18436</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 see that source of the wakeup in your code is PTB4.&lt;/P&gt;
&lt;P&gt;Please refer to the datasheet.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1643207213114.png" style="width: 913px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168913iA324D62191C91613/image-dimensions/913x103?v=v2" width="913" height="103" role="button" title="danielmartynek_0-1643207213114.png" alt="danielmartynek_0-1643207213114.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_2-1643207474615.png" style="width: 780px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168915iC581A9306C99E5E7/image-dimensions/780x696?v=v2" width="780" height="696" role="button" title="danielmartynek_2-1643207474615.png" alt="danielmartynek_2-1643207474615.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure it is configured as explained above before the MCU goes to the Stop mode.&lt;/P&gt;
&lt;P&gt;And apply a wakeup signal to PTB4 according to the configuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 14:32:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1405239#M18436</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-01-26T14:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1405751#M18437</link>
      <description>&lt;P&gt;Thank you for supporting me.&lt;/P&gt;&lt;P&gt;I follow your above suggestions and i set the flags and i am still facing the same issue. Please help me some more clarity or send me code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 06:10:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1405751#M18437</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-01-27T06:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406267#M18443</link>
      <description>&lt;P&gt;Hi Baji,&lt;/P&gt;
&lt;P&gt;1. could you please indicate what hardware platform (KT9Z1J638EVM = "EVB", RD9Z1J638-12V-CAN, etc.) you are using?&lt;/P&gt;
&lt;P&gt;2. how do you want to wakeup (via CAN, etc.)?&lt;/P&gt;
&lt;P&gt;A few general comments:&lt;/P&gt;
&lt;P&gt;1. A wakeup due to CAN communication requires that the CAN PHY is powered. For the NXP hardware platforms this means that the MM9Z1_638 is in STOP mode which keeps the VDDX (5V) powered on whilst in low power mode. The SW snippet above indicates you are using STOP mode.&lt;/P&gt;
&lt;P&gt;2. The wakeup is using the PTB4 pin wakeup.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;On the RD91ZJ638-12V-C board this is already configured from the HW point of view.&lt;/LI&gt;
&lt;LI&gt;On the "EVB" you have to configure it according to the SW HTML documentation coming with the SW (folder docu). I also attached the relevant pages as pdf.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;W.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 21:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406267#M18443</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-01-27T21:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406418#M18445</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. I am working with CAN transmission on MM9Z1_638 with demo board RD9Z1_638_4Li Rev 1.2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I establish CAN communication between MM9Z1_638 and MICROCHIP CAN analyzer with demo code (RD9Z1_638_12VLA_CAN_demo). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. My aim is to work low power modes with CAN protocol, in this process i am setting MSCAN is in Sleep Mode and MCU in stop mode and according to the datasheet to wake the MCU from stop mode using PTB4 (&amp;nbsp;For Wake-up&amp;nbsp; i am setting of the NWUE bit in the GPIO_IN4 register and with the Wake-up Enable Bit (WUPTB4) and the port configuration bit (PTWU) set) But i am unable wake the MCU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. According to the datasheet during MCU stop mode VDDH is 0v &amp;amp; VDDX is 5.0v but i am observing&amp;nbsp; during testing these levels VDDH is in 2.5v and VDDX is in 5.0v&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please help me to sort of this issue and i studied below given SW pdf but it is related to KT9Z1J638EVB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please provide the solution for RD9Z1_638_4Li board&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 06:13:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406418#M18445</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-01-28T06:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406553#M18450</link>
      <description>&lt;P&gt;Baji,&lt;/P&gt;&lt;P&gt;From your description it looks like the MM9Z1_638 is not entering Low Power mode. So we should first find out why this is happening!&lt;/P&gt;&lt;P&gt;Unfortunately do I not have a hardware setup in hands to test things (due to home office).&lt;/P&gt;&lt;P&gt;1. Could you please check that the correct pin is used for then CAN Standby:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// PTA6 is connected to CAN PHY STB pin
#define STANDBYMODE (1)
#define NORMALMODE (0)
#define CAN_STDBY(v) {DDRA_DDRA6 = 1; PTA_PTA6 = (v);} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;2. Add code to enable and disable MC33879&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// PTA7 is connected to MC33879 EN pin
#define MC33879_EN(v)      {DDRA_DDRA7 = 1; PTA_PTA7 = (v);} 							 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;add enable before main loop
MC33879_EN(1);		// enable MC33879
for EVER {  

======================================
add disable before entering Stop Mode

MC33879_EN(0);		// disable MC33879
CAN_STDBY(STANDBYMODE); 
PCREnterStopMode();&lt;/LI-CODE&gt;&lt;P&gt;3. Please test and check:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PTA7 = high after power on&lt;/LI&gt;&lt;LI&gt;trigger CAN message for goto sleep&lt;/LI&gt;&lt;LI&gt;monitor PTA7 = low, VDDH = 0V&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;W.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 09:47:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406553#M18450</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-01-28T09:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406606#M18454</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;1. I have check the&amp;nbsp;&lt;SPAN&gt;CAN PHY STB pin and it is connected to PTA0 by default and according to the Transceiver datasheet i change the CAN PHY STB pin to PTA6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Added the code for enable and disable MC33879 by using function MC33879_EN(v)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I follow below mentioned procedure, i add the code for MC33879 enable and disable functions (MC33879_EN(1) in for loop and&amp;nbsp;MC33879_EN(0) in sleep function before these functions CAN_STDBY(STANDBYMODE); )PCREnterStopMode();)&lt;/P&gt;&lt;P&gt;3. Check the voltages across PTA7 and VDDH &amp;amp; VDDX&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;a. During normal mode PTA7 is High, VDDX=5v &amp;amp; VDDH=2.5v&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;b. During sleep mode and before execution of&amp;nbsp;MC33879_EN(0), the voltage across PTA7 is High, VDDX=5v &amp;amp; VDDH=2.5v&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;c. During sleep mode and after execution of&amp;nbsp;MC33879_EN(0) the&amp;nbsp;voltage across PTA7 is Low, VDDX=5v &amp;amp; VDDH=2.5v&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observed these voltage levels in my board, and i didnot get the 0volts across VDDH during sleep mode. Please help me to sort this issue and what is the reason&amp;nbsp; and why i am not getting the 0v across VDDH.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here i am attaching the updated code, please check the&amp;nbsp;&amp;nbsp;MC33879_EN(v) function and if any changes needed in the updated code, please update me according to that&amp;nbsp; i will modify the code and check the code again and get back you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;#include "drv638.h" // driver for MM9Z1-638&lt;BR /&gt;#include "nvm.h" // nvm driver&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt; // sprintf&lt;BR /&gt;#include "main.h"&lt;BR /&gt;#include "soc.h"&lt;BR /&gt;#include "rd9z1_638_12vc.h"&lt;BR /&gt;#include "ntc.h"&lt;BR /&gt;#include "service.h"&lt;BR /&gt;#include "usercan.h"&lt;BR /&gt;#include "msCANdrv.h"&lt;/P&gt;&lt;P&gt;// For CAN bit Timing see AN1798.pdf&lt;/P&gt;&lt;P&gt;extern u8 wak_int;&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;// This demo software is provided "AS-IS".&lt;BR /&gt;// For documentation please see the folder \docu\documentation.html&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;//---------------------------------------------------------------------&lt;BR /&gt;/*! \brief Structure for Clock configuration for CAN demo&lt;/P&gt;&lt;P&gt;- use external oscillator (16.000MHz) as reference clock (divide by 16)&lt;BR /&gt;- target VCO clock: 50.000MHz&lt;BR /&gt;- target core clock: 50.000MHz&lt;BR /&gt;- target bus clock : 25.000MHz&lt;BR /&gt;- target D2D clock : 25.000MHz&lt;BR /&gt;*/&lt;BR /&gt;TYPE_CPMU_CONF const ClockConf = {&lt;BR /&gt;ClockSrc_EXT,&lt;BR /&gt;VCO_RANGE,&lt;BR /&gt;SYNR(CLOCK_VCO, CLOCK_REF),&lt;BR /&gt;REFCLK_FREQ_1_2_MHZ_RANGE, // Ref is IRC = 1.000MHz&lt;BR /&gt;// REFDIV(4), // Refdivider div = 4 (4MHz quarz)&lt;BR /&gt;REFDIV(16), // Refdivider div = 16 (16MHz quarz)&lt;BR /&gt;POSTDIV(CLOCK_VCO, CLOCK_BUS),&lt;BR /&gt;PLL_FREQ_MOD_0_PERCENT,&lt;BR /&gt;PCRPRE(CLOCK_D2D), // PCR prescaler&lt;BR /&gt;D2DDIV(CLOCK_BUS, CLOCK_D2D)&lt;BR /&gt;};&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;//! \brief TSENSE list of channels to convert...&lt;BR /&gt;TYPE_TSENSE_LIST const tList[] = {&lt;BR /&gt;// ch , avg&lt;BR /&gt;CH_TSENSE_ITS , 1, 6, //!&amp;lt; measure internal chip temperature&lt;BR /&gt;TSENSE_EXT , 1, 6 //!&amp;lt; measure external temperature sensor (NTC)&lt;BR /&gt;};&lt;BR /&gt;const u8 tListEntries = sizeof(tList)/sizeof(TYPE_TSENSE_LIST); //!&amp;lt; number of entries in the list above&lt;BR /&gt;static u16 tValues[sizeof(tList)/sizeof(TYPE_TSENSE_LIST)]; //!&amp;lt; RAM buffer for the TSENSE module&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;//! \brief VSENSE list of channels to convert...&lt;BR /&gt;TYPE_VSENSE_LIST const vList[] = {&lt;BR /&gt;// ch , avg , latency&lt;BR /&gt;CH_VSENSE2 , 100, 12,&lt;BR /&gt;};&lt;BR /&gt;const u8 vListEntries = sizeof(vList)/sizeof(TYPE_VSENSE_LIST); //!&amp;lt; number of entries in the list above&lt;BR /&gt;static u16 vValues[sizeof(vList)/sizeof(TYPE_VSENSE_LIST)]; //!&amp;lt; RAM buffer for the VSENSE module&lt;/P&gt;&lt;P&gt;// --------------------------------------------------------------------&lt;BR /&gt;//! \brief CSENSE list of channels to convert...&lt;BR /&gt;TYPE_CSENSE_LIST const cList[] = {&lt;BR /&gt;// ch , avg , latency&lt;BR /&gt;CH_CSENSE , 100 , 0&lt;BR /&gt;};&lt;BR /&gt;const u8 cListEntries = sizeof(cList)/sizeof(TYPE_CSENSE_LIST); //!&amp;lt; number of entries in the list above&lt;BR /&gt;static s32 cValues[sizeof(cList)/sizeof(TYPE_CSENSE_LIST)]; //!&amp;lt; RAM buffer for the TSENSE module&lt;BR /&gt;/*&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;// PTA0 is connected to MC33901 STB pin&lt;BR /&gt;#define STANDBYMODE (1)&lt;BR /&gt;#define NORMALMODE (0)&lt;BR /&gt;#define CAN_STDBY(v) {DDRA_DDRA0 = 1; PTA_PTA0 = (v);}&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;// --------------------------------------------------------------------&lt;BR /&gt;// PTA6 is connected to MC33901 STB pin&lt;BR /&gt;#define STANDBYMODE (1)&lt;BR /&gt;#define NORMALMODE (0)&lt;BR /&gt;#define CAN_STDBY(v) {DDRA_DDRA6 = 1; PTA_PTA6 = (v);}&lt;/P&gt;&lt;P&gt;// PTA7 is connected to MC33879 EN pin&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;#define MC33879_EN(v) {DDRA_DDRA7 = 1; PTA_PTA7 = (v);}&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;// ---------------------------------------------------------------------&lt;BR /&gt;// private prototypes&lt;BR /&gt;void GPIOInit(void);&lt;BR /&gt;void LTCInit(void);&lt;BR /&gt;void asciitohexa(char* input, char* output); // Change by baji&lt;/P&gt;&lt;P&gt;// ---------------------------------------------------------------------&lt;BR /&gt;// ---------------------------------------------------------------------&lt;BR /&gt;// ---------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;void main(void) {&lt;BR /&gt;u16 TSensor[tListEntries];&lt;BR /&gt;u16 VSensor[vListEntries];&lt;BR /&gt;s32 CSensor[cListEntries];&lt;BR /&gt;&lt;BR /&gt;TYPE_CAN_IBS_Data CAN_IBS_Data;&lt;BR /&gt;TYPE_CAN_IBS_Data_Ext CAN_IBS_Data_Ext;&lt;BR /&gt;&lt;BR /&gt;u8 rec_data[9]={0},trans_arr[8],rec_flag;&lt;BR /&gt;&lt;BR /&gt;TYPE_CAN_IBS_CONTROL CAN_IBS_Control;&lt;BR /&gt;MSCAN_TYPE_ERROR_CODE err_status; //To store the return value of the driver APIs.&lt;BR /&gt;MSCAN_TYPE_STATUS mbStat;&lt;BR /&gt;u8 CAN_status[3]; //CAN_status to store channel status,byte 0 store CANCTL0, byte 1 store CANCTL1, byte 2 store CANRFLG&lt;BR /&gt;&lt;BR /&gt;u8 u8ModeTimer;&lt;BR /&gt;u32 u32Temp;&lt;BR /&gt;static TYPE_BATTERY Battery;&lt;BR /&gt;s16 s16Vdrop;&lt;BR /&gt;u8 u8WakeUpReason;&lt;BR /&gt;u8 u8ChipTemp;&lt;BR /&gt;u16 u16Result;&lt;BR /&gt;Bool WriteSystemCalibrationValues = FALSE; // do not change !!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SYS_Init();&lt;BR /&gt;CPMUInit(&amp;amp;ClockConf);&lt;BR /&gt;D2DInit((TYPE_D2DCLKDIV) ClockConf.D2dDiv);&lt;BR /&gt;XirqEnable(); // enable XIRQ -&amp;gt; isrD2DErr() "write-once"&lt;BR /&gt;if (B_PCR_CTL_OPM &amp;amp; 2) { // Check if Wake Up from Sleep mode (see page RM3.0 110 Intermediate Mode)&lt;BR /&gt;u32Temp = B_ACQ_AHC;&lt;BR /&gt;B_PCR_CTL = OPM_SET_NORMAL; // set normal mode&lt;BR /&gt;while (!(B_PCR_SRH_WLPMF )) DO_NOTHING; // Wait for Clock Domain Change \! /todo where is this described?&lt;BR /&gt;}else{&lt;BR /&gt;if(!B_PCR_SR_HWRF) {&lt;BR /&gt;PCRReset(); // generate a HWR reset to ensure analog die is in defined state! E.g. debugging might cause strange effects in case bits are set from before //&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;B_WD_CTL = WD_OFF;&lt;BR /&gt;u8WakeUpReason = 0;&lt;BR /&gt;&lt;BR /&gt;// evaluate wakeup reason&lt;BR /&gt;if(B_PCR_SR_WULINF) { // wakeup caused by LIN&lt;BR /&gt;u8WakeUpReason = 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(B_PCR_SR_WUAHTHF) {&lt;BR /&gt;u8WakeUpReason = 2;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(B_PCR_SR_WUCALF) {&lt;BR /&gt;u8WakeUpReason = 3;&lt;BR /&gt;}&lt;BR /&gt;if(B_PCR_SR_WUCTHF) { // current threshold&lt;BR /&gt;u8WakeUpReason = 4;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(B_PCR_SR_WULTCF) {&lt;BR /&gt;u8WakeUpReason = 5;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;B_PCR_SRH = 0xFF; // clear all flags&lt;BR /&gt;&lt;BR /&gt;PCRInit(ClockConf.PCRprescaler);&lt;BR /&gt;SYSStartupTrimming();&lt;/P&gt;&lt;P&gt;//! \brief Set a breakpoint to this line and change the variable WriteSystemCalibrationValues to TRUE in the debugger to write values \ref CalibWrite&lt;BR /&gt;if(WriteSystemCalibrationValues) { // hook to manually write system calibration values to eeprom during sw development&lt;BR /&gt;CalibWriteManual();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(CalibRead()==FALSE) { // reads system calibration data from EEPROM (if avaliable). needs to be before ADCInit()&lt;BR /&gt;CalibDefault(); // otherwise use default values&lt;BR /&gt;}&lt;BR /&gt;&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;/P&gt;&lt;P&gt;GPIOInit();&lt;BR /&gt;LTCInit();&lt;BR /&gt;&lt;BR /&gt;CAN_STDBY(NORMALMODE);&lt;BR /&gt;// IBS control frame&lt;BR /&gt;CAN_IBS_Control.u8Len = 2;&lt;BR /&gt;&lt;BR /&gt;err_status = Init_CAN(CAN0, FAST); //Initialization msCAN channel 0, FAST means the reset won't wait until current transmit completed&lt;BR /&gt;do{&lt;BR /&gt;err_status = Check_CAN_Status(CAN0, CAN_status);&lt;BR /&gt;}while ((CAN_status[0] &amp;amp; SYNCH) == 0); //Wait for msCAN channel 0 synchronized to CAN Bus&lt;BR /&gt;err_status = Config_CAN_MB(CAN0, CANBUF1, TXDF, CAN_MO1); //configure the msCAN channel 0, buffer 1 to be TXDF mode (transmit dataframe) -&amp;gt; message object 1,see details in "MSCANID.h"&lt;BR /&gt;err_status = Config_CAN_MB(CAN0, CANBUF2, TXDF, CAN_MO2); //configure the msCAN channel 0, buffer 2 to be TXDF mode (transmit dataframe) -&amp;gt; message object 2&lt;BR /&gt;err_status = Config_CAN_MB(CAN0, CANBUF3, RXDF, CAN_MO3); //configure the msCAN channel 0, buffer 3 to be RXDF mode (receive dataframe) -&amp;gt; message object 3&lt;BR /&gt;&lt;BR /&gt;Battery.tMode = BM_PARKING; // used to get an initial OCV based SoC&lt;BR /&gt;SoCInit();&lt;BR /&gt;RTIInit();&lt;BR /&gt;RTIEnable();&lt;BR /&gt;IrqEnable();&lt;BR /&gt;u8ModeTimer = 50; // timed mode change from parking -&amp;gt; driving (5*100ms)&lt;/P&gt;&lt;P&gt;for EVER {&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;MC33879_EN(1); // bb&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;switch(Battery.tMode) {&lt;BR /&gt;case BM_PARKING:&lt;BR /&gt;case BM_DRIVING:&lt;BR /&gt;// ----- measurements, voltage, current and temp ------&lt;BR /&gt;if(TsenseGetValue(CH_TSENSE_ITS, &amp;amp;TSensor[0])) { // request data&lt;BR /&gt;u8ChipTemp = (u8)(TSensor[0]/TSENSE_ITS_INVRES+K2C+40); // scale to deg C with offset 40&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if(TsenseGetValue(TSENSE_EXT, &amp;amp;TSensor[1])) {&lt;BR /&gt;Battery.u16TempK = NTCRaw2Kelvin(NTCconvert, TSensor[1]);&lt;BR /&gt;}&lt;BR /&gt;if(CsenseGetValue(CH_CSENSE, &amp;amp;CSensor[0])) {&lt;BR /&gt;Battery.s32mAFilt = CSensor[0];&lt;BR /&gt;}&lt;BR /&gt;if(VsenseGetValue(CH_VSENSE2, &amp;amp;VSensor[0])) { // if 0 channel is converted then&lt;BR /&gt;&lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEL)&lt;BR /&gt;// ISENSEL is GND reference&lt;BR /&gt;s16Vdrop = (s16)(Battery.s32mAFilt/G_SHUNT); // calculated shunt drop voltage&lt;BR /&gt;Battery.u16mV = (VSensor[0]&amp;gt;&amp;gt;1) - s16Vdrop; // scale to mV and correct shunt drop voltage&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;#if (ISENSE_GND_REF==ISENSEH)&lt;BR /&gt;// ISENSEH is GND reference&lt;BR /&gt;Battery.u16mV = VSensor[0]&amp;gt;&amp;gt;1; // scale to mV and no correction&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;BR /&gt;if(RTIEvery100ms()) {&lt;BR /&gt;SoCUpdate(&amp;amp;Battery);&lt;BR /&gt;TsenseHandler(); // temperature needs to be done polling (V,I interrupt driven)&lt;BR /&gt;if(u8ModeTimer&amp;gt;0) { // timed mode change from parking -&amp;gt; driving (5*100ms)&lt;BR /&gt;u8ModeTimer--;&lt;BR /&gt;}else{&lt;BR /&gt;Battery.tMode = BM_DRIVING;&lt;BR /&gt;}&lt;BR /&gt;CAN_IBS_Data.FrameLen = 8;&lt;BR /&gt;CAN_IBS_Data.BatVolt = u16Swap(Battery.u16mV); // scale to mV&lt;BR /&gt;CAN_IBS_Data.BatCurr = u32Swap(Battery.s32mAFilt);&lt;BR /&gt;CAN_IBS_Data.BatTemp = (u8)(Battery.u16TempK+K2C+40);&lt;BR /&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;if(RTIEvery1000ms()) {&lt;BR /&gt;CAN_IBS_Data_Ext.FrameLen = 6;&lt;BR /&gt;CAN_IBS_Data_Ext.ChipTemp = u8ChipTemp;&lt;BR /&gt;CAN_IBS_Data_Ext.SOC = Battery.u8SoC;&lt;BR /&gt;CAN_IBS_Data_Ext.Coulomb = u32Swap(Battery.u32CoulombCnt);&lt;BR /&gt;err_status = Load_CAN_MB(CAN0, CANBUF2, CAN_IBS_Data_Ext.byte);&lt;BR /&gt;err_status = Transmit_CAN_MB(CAN0, CANBUF2);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case BM_CALIBRATION:&lt;/P&gt;&lt;P&gt;ServiceApp();&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&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;if(wak_int == 10){&lt;BR /&gt;wak_int=1;&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;BR /&gt;&lt;U&gt;&lt;STRONG&gt;MC33879_EN(0); // bb&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&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;//B_PCR_CTL = OPM_SET_NORMAL; /* set normal mode*/ // bb&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;BR /&gt;}&lt;BR /&gt;} // for EVER&lt;BR /&gt;}&lt;BR /&gt;// ---------------------------------------------------------------------&lt;BR /&gt;/*! \brief Init GPIO&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Configuration used for the RD9Z1_638_12VLA_CAN_Demo:&amp;lt;/b&amp;gt;&lt;BR /&gt;&lt;BR /&gt;| Pin | Enabled | Direction | Routing | used for |&lt;BR /&gt;|:----------:|:--------:|:---------:|:-------:|------------------------------------|&lt;BR /&gt;| PTB0 | - | - | | analog input |&lt;BR /&gt;| PTB1 | disabled | n.a. | | not used |&lt;BR /&gt;| PTB2 | disabled | n.a. | | not used |&lt;BR /&gt;| PTB3 | disabled | n.a. | | not used |&lt;BR /&gt;| PTB4 | enabled | input | PTWU | CAN PHY wake up input |&lt;BR /&gt;| PTB5/GNDSW | - | - | - | GND switch for TSENSE_EXT |&lt;/P&gt;&lt;P&gt;*/&lt;BR /&gt;void GPIOInit(void) {&lt;/P&gt;&lt;P&gt;B_GPIO_CTL = GPIO_CTL_PTB1_DISABLE | GPIO_CTL_PTB1_INPUT;&lt;BR /&gt;B_GPIO_CTL = GPIO_CTL_PTB2_DISABLE | GPIO_CTL_PTB2_INPUT;&lt;BR /&gt;B_GPIO_CTL = GPIO_CTL_PTB3_DISABLE | GPIO_CTL_PTB3_INPUT;&lt;BR /&gt;&lt;BR /&gt;// B_GPIO_PUC_PDE4 = 1; // enable pull down (missing on KT9Z1638EVM)&lt;BR /&gt;B_GPIO_CTL = GPIO_CTL_PTB4_ENABLE; // PTB4 is used for CAN Wakeup&lt;BR /&gt;B_GPIO_IN4 = IN4_PTWU|IN4_NWUE; // enable WU in low power mode, negative edge&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// ---------------------------------------------------------------------&lt;BR /&gt;/*! \brief&lt;BR /&gt;*&lt;BR /&gt;*/&lt;BR /&gt;void LTCInit(void) {&lt;BR /&gt;&lt;BR /&gt;B_LTC_CTL = B_LTC_CTL_LTCEM_MASK | B_LTC_CTL_LTCE_MASK; // LTC enable, no interrupt&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;interrupt VectorNumber_Vcan0wkup void isrCANWakeup(void) {&lt;/P&gt;&lt;P&gt;CAN_Wakeup(CAN0);&lt;BR /&gt;}&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;interrupt VectorNumber_Vcan0err void isrCANErr(void) {&lt;/P&gt;&lt;P&gt;CAN_ERR(CAN0);&lt;BR /&gt;}&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;interrupt VectorNumber_Vcan0tx void isrCANTx(void) {&lt;/P&gt;&lt;P&gt;CAN_Transmit(CAN0);&lt;BR /&gt;}&lt;BR /&gt;// --------------------------------------------------------------------&lt;BR /&gt;interrupt VectorNumber_Vcan0rx void isrCANRx(void) {&lt;/P&gt;&lt;P&gt;CAN_Receive(CAN0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 12:34:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406606#M18454</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-01-28T12:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406975#M18459</link>
      <description>&lt;P&gt;Hi Baji,&lt;/P&gt;
&lt;P&gt;what is the status on this issue?&lt;/P&gt;
&lt;P&gt;One other potential problem could be a connected Debugger. It's not possible to enter STOP mode on the uC with the debugger connected! So please try without debugger!&lt;/P&gt;
&lt;P&gt;W.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 09:06:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1406975#M18459</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-01-31T09:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407252#M18463</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I just tried it with the RD9Z1_638-4Li board and its works Sleep (=STOP) and Wakeup.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Trace Sleep -&amp;gt; Wakeup" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169265i62CC8EC2781F291B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Trace Sleep -&amp;gt; Wakeup" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Trace Sleep -&amp;gt; Wakeup&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can see the Goto To Sleep -&amp;gt; PTA7 = low and VDDH = 0V and wakeup via CAN PTA7 = high and VHHD = 2.5V.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:41:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407252#M18463</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-01-31T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407385#M18465</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;I got the output, please confirm what is the use of MC33879_EN(v) function and explain what is the relation between VDDH and PTA7. Is it compulsory, to add this MC33879_EN()&amp;nbsp; function to my code. If MC33879_EN()&amp;nbsp; function is not thier in my code what happens?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 04:53:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407385#M18465</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-02-01T04:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407412#M18466</link>
      <description>&lt;P&gt;Hi Baji,&lt;/P&gt;
&lt;P&gt;I intended to use the PTA7 for debugging (to see if Sleep is entered) and to actually control the MC33879 Power modes. Also see &lt;A href="https://www.nxp.com/docs/en/data-sheet/MC33879.pdf" target="_blank" rel="noopener"&gt;https://www.nxp.com/docs/en/data-sheet/MC33879.pdf&lt;/A&gt; datasheet.&lt;/P&gt;
&lt;P&gt;There is no relationship to VDDH. VDDH is shut down in MM9Z1_638 STOP mode, so a indicator if the device is in STOP or not.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Q_man_0-1643696777191.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169293i42CF82A440F5D829/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Q_man_0-1643696777191.png" alt="Q_man_0-1643696777191.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 06:29:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407412#M18466</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-02-01T06:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407428#M18467</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;I study the datasheet of MC33879 to control the power modes but i didn't understand how the mscan module entered into sleep mode. Please explain how the mscan module enters into sleep mode?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 07:06:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407428#M18467</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-02-01T07:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407437#M18468</link>
      <description>&lt;P&gt;Baji,&lt;/P&gt;
&lt;P&gt;to bring the reference design to low power mode these steps are required:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;shutdown uC CAN controller &lt;STRONG&gt;Sleep_CAN()&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;enable CAN wakeup using PTB4 &lt;STRONG&gt;B_PCR_WUEH_WUPTB4 = 1&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;PTB4 is already configured in &lt;STRONG&gt;GPIOInit()&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;disable MC33879&amp;nbsp; (Octal switch)&amp;nbsp; by setting PA7 to low &lt;STRONG&gt;MC33789_EN(0)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;disable ("standby") MC33901 (CAN PHY) by setting PA6 to high &lt;STRONG&gt;CAN_STDBY(STANDBYMODE)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;shutdown MM9Z1_638 (this will depend on your specific SW setup)
&lt;UL&gt;
&lt;LI&gt;disable ADC, TSENSE, VSENSE mux&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;LI-CODE lang="c"&gt;// goto sleep
err_status = Sleep_CAN(CAN0, CMPTX);	// request CAN channel 0 go to sleep with completing transmission scheduled
do {
   err_status = Check_CAN_Status(CAN0,CAN_status); 	// read the channel 0 status
}while(!CAN_status[1]&amp;amp;SLPAK)); 	 // wait till SLPAK bit set

B_PCR_WUEH_WUPTB4 =  1;  // enable PTB4 wakeup	
ADCDisable();
TsenseDisable();
B_GPIO_VSENSE = 0;
MC33879_EN(0);		// disable MC33879 (Octal SWITCH)
CAN_STDBY(STANDBYMODE); // disable MC33901 (CAN PHY)
PCREnterStopMode();
// .....zzzzzzzzzzz (stop mode)&lt;/LI-CODE&gt;
&lt;P&gt;6. Enter MM9Z1_638 low power mode:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;disable uC interrupts&lt;/LI&gt;
&lt;LI&gt;disable interrupts on analog die&lt;/LI&gt;
&lt;LI&gt;clear all analog die interrupt flags&lt;/LI&gt;
&lt;LI&gt;send analog die to STOP mode&lt;/LI&gt;
&lt;LI&gt;allow uC STOP mode&lt;/LI&gt;
&lt;LI&gt;send uC to STOP mode&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="c"&gt;// --------------------------------------------------------------------
/*! \brief Function to enter low power STOP mode. 
 * 
 * In STOP mode the VDDX = 5V will remain powered. The uC will be powered and also has to be set into uC STOP mode.
 * 
 * After a wakeup (interrupt) the software continues to execute after the StopEnter() routine. 
 * The interrupt will straight away interrupt and execute the corresponding interrupt service routine in general isrD2D(). 
 * 
 */ 
void PCREnterStopMode(void)  {	

  IrqDisable();     
  B_INT_MSK = 0xFF3F;       // disable all Analog Interrupts 
  B_ACQ_SRH = 0xFF;         // Clear pending Flags
  B_INT_MSK = 0xFF00;       // enable all Analog Interrupts 
  
  B_PCR_SR =  0xFFFF;       // Clear Flags
  B_PCR_CTL = OPM_SET_STOP; // Goto Stop Mode
  StopEnable();		
  StopEnter();
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 07:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407437#M18468</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-02-01T07:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407483#M18469</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;I understand very much the low power modes but my doubt is with out using this function (&lt;SPAN&gt;MC33789_EN(v)) also i am getting the output, in that scenerio i didn't understand the use of this&amp;nbsp;MC33879&amp;nbsp; (Octal switch). Please give some more clarity on particular this&amp;nbsp;MC33879&amp;nbsp; (Octal switch) only.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 09:02:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1407483#M18469</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-02-01T09:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1408979#M18472</link>
      <description>&lt;P&gt;Thank you Q_man for helping me to sort of this wake up issue,&lt;/P&gt;&lt;P&gt;I intially tested the my test setup in debug mode, due to this the wake up interrupt is not happening.When i run the setup in continuous mode i got the output, unfortunately i comment the function MC33879(v) even though i can see the output and also by using sleep &amp;amp; wake up commands i can control the output.&lt;/P&gt;&lt;P&gt;During normal mode, the MC33879 En pin is high and i am getting the values like VDDX=5v, VDDH=2.5v, PTA7 is high and Current is approx 40milliAmps and CAN in normal mode&lt;/P&gt;&lt;P&gt;During MSCAN Module sleep mode, the MC33879 En pin is low and i observed these values&amp;nbsp; VDDX=5v, VDDH=0v, PTA7 is low and Current is approx 6milliAmps and CAN in standby mode and MCU in STOP mode.&lt;/P&gt;&lt;P&gt;According to the datasheet of MC33879, it is showing The EN pin on the 33879 enables the device. With the EN pin high, output drivers may be activated and open/short fault detection&lt;BR /&gt;performed and reported. With the EN pin low, all outputs become inactive, open load detection current is disabled, and the device enters Sleep mode. The 33879 performs Power-ON Reset on the rising edge of the enable signal.&lt;/P&gt;&lt;P&gt;but my doubt is without using the MC33879 EN pin also i am getting the same values like&amp;nbsp;&lt;/P&gt;&lt;P&gt;During normal mode, the MC33879 En pin is not connected and observed values like VDDX=5v, VDDH=2.5v, PTA7 is low and Current is approx 40milliAmps and CAN in normal mode&lt;/P&gt;&lt;P&gt;During MSCAN Module sleep mode, the MC33879 En pin is not connected and observed values are&amp;nbsp; VDDX=5v, VDDH=0v, PTA7 is low and Current is approx 6milliAmps and CAN in standby mode and MCU in STOP mode.&lt;/P&gt;&lt;P&gt;I did not find any current deferences also, Please explain some detailed manner regards this MC33879 octal serial switch&lt;/P&gt;&lt;P&gt;Why am i asking this means i am planning to build one hardware setup based on EVK board, i didnot understand i have to use this IC in my design or not?&lt;/P&gt;&lt;P&gt;One more favour, please explain how to check the raw values of Vsense, Isense and Tsense, according to the demo code i unable to check the above&amp;nbsp;Vsense, Isense and Tsense values because CAN is in Continuous mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest a procedure to find the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:04:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1408979#M18472</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-02-04T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1408989#M18473</link>
      <description>&lt;P&gt;Baji,&lt;/P&gt;
&lt;P&gt;what type of BMS are you working on? For Lead Acid or LiIon cells?&lt;/P&gt;
&lt;P&gt;On the hardware platform you have the MC33879 Octal Switch was intended for the cell balancing of the 4 LiIon cells and the 4 unused switches are available as High-Side or Low-Side output for other purposes.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Q_man_0-1643977441369.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169566iCC7CD91C79010A68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Q_man_0-1643977441369.png" alt="Q_man_0-1643977441369.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I understand you correct you do NOT intend to use any of the switches, correct? In this case we do not have to use it.&lt;/P&gt;
&lt;P&gt;The stop mode current of 6mA is to high. To measure the Stop current the debugger must be disconnected! It would be helpful if you could provide your external circuitry (what is connected where).&lt;/P&gt;
&lt;P&gt;W.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1408989#M18473</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-02-04T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1410970#M18483</link>
      <description>&lt;P&gt;Thank you Q_man,&lt;/P&gt;&lt;P&gt;Sorry for the delay response, i tested these&amp;nbsp;&lt;SPAN&gt;stop mode current 6 milli amps and remaining voltages on EVK board(RD9Z1_638_4Li v1.2).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am planning to design a hardware(BMS) with Lead acid battery, based on our discussion i understood that for&amp;nbsp;LiIon cell batterys only need this MC33879 octal switch.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It means with out using this MC33879_EN(v) also CAN demo project is working?&amp;nbsp; and if i add this CAN code to my design my code works as expecetd(with out using this MC33879_EN(v) function )?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Based on our discussion For lead acid battery need not necessary MC33879 octal switch, then i can proceed my design without this MC33879 octal switch&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 11:50:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1410970#M18483</guid>
      <dc:creator>baji</dc:creator>
      <dc:date>2022-02-09T11:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_638 Low Power Modes</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1410986#M18484</link>
      <description>&lt;P&gt;Baji,&lt;/P&gt;&lt;P&gt;Yes, I expect you do not need the MC33879 in your design. You also might take a look at our 12V Lead Acid Reference Design with CAN:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/design/designs/12-v-lead-acid-battery-sensor-with-can:RD9Z1-638-12V-C" target="_blank"&gt;https://www.nxp.com/design/designs/12-v-lead-acid-battery-sensor-with-can:RD9Z1-638-12V-C&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want I can review your designs schematics (&lt;A href="mailto:wolfgang.bihlmayr@nxp.com" target="_blank"&gt;wolfgang.bihlmayr@nxp.com&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;W.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:20:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-638-Low-Power-Modes/m-p/1410986#M18484</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2022-02-09T12:20:08Z</dc:date>
    </item>
  </channel>
</rss>

