<?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: AUTOSAR MCAL LPCMP example in EB Tresos and coding in S32K</title>
    <link>https://community.nxp.com/t5/S32K/AUTOSAR-MCAL-LPCMP-example-in-EB-Tresos-and-coding/m-p/1830956#M33155</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/173289"&gt;@emerging&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can see the RRCR1[RR_CH1EN] = 1 and the&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;CCR0[CMP_EN] = 1&lt;/SPAN&gt;&lt;BR /&gt;after invoking the Icu_EnableEdgeDetection(IcuChannel_LPCMP1) function to enable&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;Round-Robin Trigger mode&lt;/SPAN&gt;&amp;nbsp;in LPCMP. In this mode,&amp;nbsp;a&lt;SPAN class="fontstyle0"&gt;&amp;nbsp;trigger event initiates a comparison sequence; a&lt;/SPAN&gt;nd RTC is configured in this example to trigger CMP performing a DAC compare. If the DAC value is greater than the DAC_DATA value then&amp;nbsp;status flags will be set.&lt;/P&gt;
&lt;P&gt;Besides, this function also sets the&amp;nbsp;&lt;SPAN class="fontstyle0"&gt;IER[RRF_IE]&lt;/SPAN&gt;&amp;nbsp;bit, following the S32K3XX Reference manual: "&lt;SPAN class="fontstyle0"&gt;If &lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;IER[RRF_IE] &lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;sets, an asynchronous interrupt asserts&lt;/SPAN&gt;". when CSR[RRF] is set after detecting when any channel's last comparison result is different from the pre-set value in Trigger mode, it will route to WKPU.&lt;/P&gt;
&lt;P&gt;Calling Icu_EnableEdgeDetection(IcuChannel_LPCMP_Wkup); function to configure WKUP registers can receive wakeup trigger from LPCMP (when RRF was set).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxf78987_1-1710834163714.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269215i4AB56BE5D6B196FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nxf78987_1-1710834163714.png" alt="nxf78987_1-1710834163714.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cmp_Ip_GetStatus() is not necessary use in this example because the&amp;nbsp;comparator status flags will route to WKUP.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 08:22:24 GMT</pubDate>
    <dc:creator>DanNguyenDuy</dc:creator>
    <dc:date>2024-03-19T08:22:24Z</dc:date>
    <item>
      <title>AUTOSAR MCAL LPCMP example in EB Tresos and coding</title>
      <link>https://community.nxp.com/t5/S32K/AUTOSAR-MCAL-LPCMP-example-in-EB-Tresos-and-coding/m-p/1826777#M32875</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a few queries on the sample "S32K344_LPCMP_Wkup_S32DS_3_4_RTD_MCAL_2_0.&amp;nbsp; get from NXP&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My usecase is just to compare an analog voltage with a reference voltage and get the comparator output.&lt;BR /&gt;For my application can i remove the first three channels IcuChannel_EVB, IcuChannel_WB, IcuChannel_LPCMP_Wkup from configurator&amp;nbsp;and keep only IcuChannel_LPCMP1 in configurator, Will that work because i need only a comparator.&lt;BR /&gt;When i come to coding part i am not able to see any section in main.c that checking the status of comparator. Don't we need any functionality to check the comparator status like Cmp_Ip_GetStatus(). In code i was not able to find the part where it checking comparator status&lt;BR /&gt;Could you kindly provide your opinion on the queries I mentioned above?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 04:19:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/AUTOSAR-MCAL-LPCMP-example-in-EB-Tresos-and-coding/m-p/1826777#M32875</guid>
      <dc:creator>emerging</dc:creator>
      <dc:date>2024-03-13T04:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: AUTOSAR MCAL LPCMP example in EB Tresos and coding</title>
      <link>https://community.nxp.com/t5/S32K/AUTOSAR-MCAL-LPCMP-example-in-EB-Tresos-and-coding/m-p/1830956#M33155</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/173289"&gt;@emerging&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can see the RRCR1[RR_CH1EN] = 1 and the&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;CCR0[CMP_EN] = 1&lt;/SPAN&gt;&lt;BR /&gt;after invoking the Icu_EnableEdgeDetection(IcuChannel_LPCMP1) function to enable&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;Round-Robin Trigger mode&lt;/SPAN&gt;&amp;nbsp;in LPCMP. In this mode,&amp;nbsp;a&lt;SPAN class="fontstyle0"&gt;&amp;nbsp;trigger event initiates a comparison sequence; a&lt;/SPAN&gt;nd RTC is configured in this example to trigger CMP performing a DAC compare. If the DAC value is greater than the DAC_DATA value then&amp;nbsp;status flags will be set.&lt;/P&gt;
&lt;P&gt;Besides, this function also sets the&amp;nbsp;&lt;SPAN class="fontstyle0"&gt;IER[RRF_IE]&lt;/SPAN&gt;&amp;nbsp;bit, following the S32K3XX Reference manual: "&lt;SPAN class="fontstyle0"&gt;If &lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;IER[RRF_IE] &lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;sets, an asynchronous interrupt asserts&lt;/SPAN&gt;". when CSR[RRF] is set after detecting when any channel's last comparison result is different from the pre-set value in Trigger mode, it will route to WKPU.&lt;/P&gt;
&lt;P&gt;Calling Icu_EnableEdgeDetection(IcuChannel_LPCMP_Wkup); function to configure WKUP registers can receive wakeup trigger from LPCMP (when RRF was set).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxf78987_1-1710834163714.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269215i4AB56BE5D6B196FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nxf78987_1-1710834163714.png" alt="nxf78987_1-1710834163714.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cmp_Ip_GetStatus() is not necessary use in this example because the&amp;nbsp;comparator status flags will route to WKUP.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 08:22:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/AUTOSAR-MCAL-LPCMP-example-in-EB-Tresos-and-coding/m-p/1830956#M33155</guid>
      <dc:creator>DanNguyenDuy</dc:creator>
      <dc:date>2024-03-19T08:22:24Z</dc:date>
    </item>
  </channel>
</rss>

