<?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 Issue with Multiple Channel Range Compare Interrupts on ADC0 (S32K118) in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Issue-with-Multiple-Channel-Range-Compare-Interrupts-on-ADC0/m-p/2119076#M50060</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I’m currently using the S32K118 MCU in my project for ADC-based signal detection. I’m facing an issue when configuring multiple ADC channels on the same ADC instance (ADC0) with range compare functionality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Problem Description:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to monitor multiple channels simultaneously on ADC0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Range compare is configured on each channel to generate an interrupt when the ADC value is within a defined threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I’ve observed that only the last configured channel triggers the interrupt, and the others are ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is only one ISR available for ADC0, and I couldn’t find any API or method to identify which channel triggered the interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Application Requirement:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to monitor two ADC channels (more than 6 values in each) continuously.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Each channel is configured with a range, and I need an interrupt whenever any configured channel value falls within its respective threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both channels should be active concurrently and trigger ISR independently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Request:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a recommended way to configure multiple channels with range compare on the same ADC instance (ADC0) so that all can trigger interrupts as needed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I identify the source channel inside the ADC ISR?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this approach is not supported on ADC0, would ADC1 (if available on S32K118) be a viable workaround?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise how this can be resolved or provide guidance or examples if available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your support.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jun 2025 05:52:11 GMT</pubDate>
    <dc:creator>Arunpk</dc:creator>
    <dc:date>2025-06-19T05:52:11Z</dc:date>
    <item>
      <title>Issue with Multiple Channel Range Compare Interrupts on ADC0 (S32K118)</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-Multiple-Channel-Range-Compare-Interrupts-on-ADC0/m-p/2119076#M50060</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I’m currently using the S32K118 MCU in my project for ADC-based signal detection. I’m facing an issue when configuring multiple ADC channels on the same ADC instance (ADC0) with range compare functionality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Problem Description:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to monitor multiple channels simultaneously on ADC0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Range compare is configured on each channel to generate an interrupt when the ADC value is within a defined threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I’ve observed that only the last configured channel triggers the interrupt, and the others are ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is only one ISR available for ADC0, and I couldn’t find any API or method to identify which channel triggered the interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Application Requirement:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to monitor two ADC channels (more than 6 values in each) continuously.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Each channel is configured with a range, and I need an interrupt whenever any configured channel value falls within its respective threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both channels should be active concurrently and trigger ISR independently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Request:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a recommended way to configure multiple channels with range compare on the same ADC instance (ADC0) so that all can trigger interrupts as needed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I identify the source channel inside the ADC ISR?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this approach is not supported on ADC0, would ADC1 (if available on S32K118) be a viable workaround?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise how this can be resolved or provide guidance or examples if available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your support.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 05:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-Multiple-Channel-Range-Compare-Interrupts-on-ADC0/m-p/2119076#M50060</guid>
      <dc:creator>Arunpk</dc:creator>
      <dc:date>2025-06-19T05:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Multiple Channel Range Compare Interrupts on ADC0 (S32K118)</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-Multiple-Channel-Range-Compare-Interrupts-on-ADC0/m-p/2119357#M50078</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;not sure how do you perform multiple conversion which code/driver youa re using. But the interrupt should be triggered for each converted channel if compare condition is true and channel interrupt is enabled.&lt;/P&gt;
&lt;P&gt;Compare functionality is same and valid for all channels. After any input is sampled and converted, if the condition selected evaluates true, respective SC1n[COCO] is set and result can be read from respective Rn. If the compare condition is not true, SC1n[COCO] is not set and the conversion result data will not be transferred to the result register, Rn.&lt;BR /&gt;An ADC interrupt is generated when SC1n[COCO] is set and the respective ADC interrupt is enabled, that is, SC1n[AIEN] = 1.&lt;BR /&gt;Withing ADC interrupt you can read SC1n[COCO] to know which channel triggers interrupt, then read Rn to clear COCO.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 11:16:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-Multiple-Channel-Range-Compare-Interrupts-on-ADC0/m-p/2119357#M50078</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2025-06-19T11:16:12Z</dc:date>
    </item>
  </channel>
</rss>

