<?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: Regarding LGx signal behaviour</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050125#M17178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/danielmartynek"&gt;danielmartynek&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;As per the sample code, I have cleared the GLVLSF, in initCPMU() call before proceeding with the clock settings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2020 01:04:43 GMT</pubDate>
    <dc:creator>pratibhasurabhi</dc:creator>
    <dc:date>2020-07-02T01:04:43Z</dc:date>
    <item>
      <title>Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050123#M17176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is regarding observing LGx signal behaviour during power up scenario.&lt;BR /&gt;Taking Hall sensor sample code(MC9S12ZVML128_BLDC_Hall) as reference, I am trying to observe LGx signals.&lt;BR /&gt;The MCU (MagniV S12 ZVML64) maskset is 3N95G.&lt;/P&gt;&lt;P&gt;FOPT register value is 0xFF&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am using RM V2.13&lt;/P&gt;&lt;P&gt;The initPMF() is as follows :&lt;BR /&gt;**********************************start***************************************&lt;BR /&gt; PMFCFG0_EDGEA = 1 /* Set Pair A PWM as edge aligned */&lt;BR /&gt; PMFCFG0_EDGEB = 1 /* Set Pair B PWM as edge aligned */&lt;BR /&gt; PMFCFG0_EDGEC = 1 /* Set Pair C PWM as edge aligned */&lt;BR /&gt; PMFCFG2_REV0 = 1 /* PWM generator A generates reload event */&lt;BR /&gt; PMFCFG2_REV1 = 0; /* PWM generator A generates reload event */&lt;BR /&gt; PMFOUTB = 0x2A; /* Low MOSFETs ON while SW control (Unipolar PWM) */&lt;BR /&gt; PMFCFG3_VLMODE = 1; /* Writing to value register zero also writes to value registers one to five */&lt;BR /&gt; PMFFQCA = 0; /* Reload every PWM, Half-cycle disabled, fcore / 1 */&lt;BR /&gt; PMFMODA = 2500; /* Apply PMF Modulo value */&lt;BR /&gt; PMFDTMA = 25; /* Set deadtime count */&lt;BR /&gt; PMFCFG2 |= 0x3F; /* Mask all PWM outputs */&lt;BR /&gt; PMFOUTC_OUTCTL = 0x3F; /* Set all outputs in Software mode */&lt;BR /&gt; PMFENCA_LDOKA = 1; /* Load prescalar A,modulus A and PMFVAL values into set of buffers */&lt;BR /&gt; PMFENCA_RSTRTA = 1; /* PWM will restart at commutation event */&lt;BR /&gt; PMFENCA_PWMENA = 1; /* Enable PWM Generator A */&lt;BR /&gt; PMFCFG1_ENCE = 1; /* Enable commutation event */&lt;BR /&gt; PMFENCA_GLDOKA = 1; /* External load OK replaces the function of LDOKA */&lt;BR /&gt;**********************************end**********************************************&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have observed these LGx signals for 4 combination of MCU&amp;lt;-&amp;gt;PEMicro connection(Ribbon cable) and PEMicro&amp;lt;-&amp;gt; User System (Type a to Type B) connection status after flashing the firmware.&lt;BR /&gt;All these LGx signals are observed at power up.&lt;BR /&gt;I am attaching the table of combination and its result as reference.&lt;/P&gt;&lt;P&gt;1. Since the maskset is 3N95G, low side gate should be turned on, since at power up GSUF will be loaded with value in FOPT register. [GSUF bit will have value as 1] [Reference GDUF register description]&lt;BR /&gt;2. Also LGx will be turned off when initPMF() is executed, since the PWM are masked (PMFCFG2 = 0x3F).&lt;/P&gt;&lt;P&gt;So all things considered [ above two points], LGx should be turned on at power-up[FOPT value loaded] and will be turned off when initPMF is executed[mask PWM].&lt;/P&gt;&lt;P&gt;Q1. Request to confirm my understanding.&lt;/P&gt;&lt;P&gt;Q2. I have found some strange observation with respect #1 and #2 scenario as per the attached excel sheet&lt;BR /&gt; Request to inform why such different behaviour is observed for different combination of Ribbon cable(BDM interface) and USB cable connection status.&lt;BR /&gt; especially for #1 and #2&lt;BR /&gt; For #1, /RESET gradually rises while for others it rises sharply.&lt;/P&gt;&lt;P&gt;Also LGx signal behaviour is different.&lt;/P&gt;&lt;P&gt;More information in excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2020 12:52:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050123#M17176</guid>
      <dc:creator>pratibhasurabhi</dc:creator>
      <dc:date>2020-07-01T12:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050124#M17177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pratibha,&lt;/P&gt;&lt;P&gt;Can you read the GDUF register during the startup and clear the GLVLSF flag if set.&lt;/P&gt;&lt;P&gt;Please note that the flag cannot be cleared if the low voltage condition is still there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/114328iF6E5EF53EBEFA9EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2020 13:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050124#M17177</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-07-01T13:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050125#M17178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/danielmartynek"&gt;danielmartynek&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;As per the sample code, I have cleared the GLVLSF, in initCPMU() call before proceeding with the clock settings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2020 01:04:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050125#M17178</guid>
      <dc:creator>pratibhasurabhi</dc:creator>
      <dc:date>2020-07-02T01:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050126#M17179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pratibha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have the&amp;nbsp;3N95G HW right now so I'm not able to test it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, the debugger is not powered and it is an additional load on the reset pin, so the reset voltage is rising slowly which gives some time&amp;nbsp;for the VLS_OUT output to stabilize before the MCU leaves reset (reset pin voltage &amp;gt; 0.65 * VDDX). And this means that the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;GLVLSF flag is not set, and the LS driver are active.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Whereas without the debugger, the reset pin read HIGH immediately probably before the VLS_OUT output is above the low-voltage threshold and this sets the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;GLVLSF flag.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;When&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;GLVLSF&amp;nbsp;flag is set, the LS drivers are inactive.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;As you pointed out, the demo SW clear the flag in the&amp;nbsp;initCPMU() function.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;However, this is the code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// Wait for stable supply after power up
while (GDUF_GLVLSF)
GDUF_GLVLSF = 1;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;GSUF flag is set in your application (copied from NVM during reset) along with the GLVLSF flag.&lt;/P&gt;&lt;P&gt;The code above does a read-modify-write operation on the register and therefore it clears the GLVLSF flag along with the GSUF flag. Because both the flags are w1c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, once the&amp;nbsp;&lt;SPAN&gt;GLVLSF&amp;nbsp;flag gets cleared, the GSUF flag = 0 as well and the LS drivers stay inactive.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please use this code instead:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// Wait for stable supply after power up
while (GDUF_GLVLSF)
GDUF = 0x20; // mask GLVLSF only‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2020 09:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050126#M17179</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-07-03T09:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050127#M17180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/danielmartynek"&gt;danielmartynek&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;I checked with suggested change in code.&lt;/P&gt;&lt;P&gt;It is correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The code above does a read-modify-write operation on the register and therefore it clears the GLVLSF flag along with the GSUF flag. Because both the flags are w1c."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;My understanding was since we were accessing a specific bit, it wont affect the other bits/entire register.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Is this specific for w1c registers or is there a specific list. If possible can you please share the document or the link to it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 08:00:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050127#M17180</guid>
      <dc:creator>pratibhasurabhi</dc:creator>
      <dc:date>2020-07-28T08:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050128#M17181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/pratibhasurabhi" rel="noopener noreferrer" target="_blank"&gt;pratibhasurabhi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Please have a look at&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/application-note/AN2554.pdf" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;AN2554/D&amp;nbsp;Clearing and Disabling&amp;nbsp;Interrupt Flags&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/109143iDD186202858A911E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;// Wait for stable supply after power up
while (GDUF_GLVLSF)
GDUF_GLVLSF = 1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;IMG alt="pastedImage_6.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108743i16D420758F72777C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_6.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;// Wait for stable supply after power up
while (GDUF_GLVLSF)
GDUF = 0x20; // mask GLVLSF only&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;IMG alt="pastedImage_7.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108790i7491D852EB5B38B1/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_7.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:39:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050128#M17181</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-11-02T14:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding LGx signal behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050129#M17182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Thank you for sharing the document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 01:26:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Regarding-LGx-signal-behaviour/m-p/1050129#M17182</guid>
      <dc:creator>pratibhasurabhi</dc:creator>
      <dc:date>2020-07-30T01:26:29Z</dc:date>
    </item>
  </channel>
</rss>

