<?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: Using CMP in round robin/trigger mode to wake-up S32K from VLPS in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736686#M1906</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;&lt;/P&gt;&lt;P&gt;Yes I found out that this was a mistake. I fixed the issue by Setting CMR to a value to define the trigger period. The CMP now works correctly in round robin mode. I can wake up the MCU from VLPS when cmp inputs change..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Youssef&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2017 14:50:07 GMT</pubDate>
    <dc:creator>youssef</dc:creator>
    <dc:date>2017-12-11T14:50:07Z</dc:date>
    <item>
      <title>Using CMP in round robin/trigger mode to wake-up S32K from VLPS</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736683#M1903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hi,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I'm trying to get S32K waked-up from VLPS using CMP in round robin mode. Here are the steps that I did:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- Configure SIRC divider to 2 and enable it, so I have 4 Mhz as SIRCDIV2 CLK.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- Enable clock gated LPTMR0.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- LPTMR0 is configured tu use SIRCDIV2 clk in free runing counter with CMR=0&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- Configure CMP0 in round robin mode with:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* IN0, from the 8-bit DAC output&lt;BR /&gt;* IN1, from the analog 8-1 mux&lt;BR /&gt;* Enable Channel 0, 1 and 5 for round robin&lt;BR /&gt;* Enable DAC&lt;BR /&gt;* Supply voltage reference is Vin1&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* 1 round-robin clock cycle later, the result is sampled&lt;BR /&gt;* Compare result is 0 initial values for all channels&lt;BR /&gt;* From datasheet: Initialization delay for CMP in Low-speed mode is 30us max&lt;BR /&gt;* round robin clock is 2 MHz --&amp;gt; INITMOD = 30000/500 = 60&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* Low Speed (LS) comparison mode is selected.&lt;BR /&gt;* Analog Comparator is enabled&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* Clear CMP inputs changed flags&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/*&lt;BR /&gt;* Enable Round robin&lt;BR /&gt;* Enable round robin interrupt&lt;BR /&gt;*/&lt;BR /&gt;CMP0-&amp;gt;C2 |= CMP_C2_RRE(1) | CMP_C2_RRIE(1);&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Clear TCF */&lt;BR /&gt;LPTMR0-&amp;gt;CSR |= LPTMR_CSR_TCF(1u);&lt;BR /&gt;/* Enable LPTMR0 */&lt;BR /&gt;LPTMR0-&amp;gt;CSR |= LPTMR_CSR_TEN(1u);&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Am I missing something?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Is there any example how to configure LPTMR0 to trigger CMP in round robin?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Thanks&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Youssef&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 22:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736683#M1903</guid>
      <dc:creator>youssef</dc:creator>
      <dc:date>2017-11-24T22:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using CMP in round robin/trigger mode to wake-up S32K from VLPS</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736684#M1904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why do you set CMR = 0?&lt;/P&gt;&lt;P&gt;In this case the trigger will remain asserted.&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>Thu, 07 Dec 2017 21:14:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736684#M1904</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2017-12-07T21:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using CMP in round robin/trigger mode to wake-up S32K from VLPS</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736685#M1905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You may refer to the example below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-335759"&gt;https://community.nxp.com/docs/DOC-335759&lt;/A&gt;&amp;nbsp;&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, 11 Dec 2017 12:24:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736685#M1905</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2017-12-11T12:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using CMP in round robin/trigger mode to wake-up S32K from VLPS</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736686#M1906</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;&lt;/P&gt;&lt;P&gt;Yes I found out that this was a mistake. I fixed the issue by Setting CMR to a value to define the trigger period. The CMP now works correctly in round robin mode. I can wake up the MCU from VLPS when cmp inputs change..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Youssef&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 14:50:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-in-round-robin-trigger-mode-to-wake-up-S32K-from-VLPS/m-p/736686#M1906</guid>
      <dc:creator>youssef</dc:creator>
      <dc:date>2017-12-11T14:50:07Z</dc:date>
    </item>
  </channel>
</rss>

