<?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: ADC Acquisition Issue with Triangular Signal Generated by DAC on NHS3152 in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/ADC-Acquisition-Issue-with-Triangular-Signal-Generated-by-DAC-on/m-p/2070202#M3680</link>
    <description>&lt;P class=""&gt;I wanted to update you on the ticket I submitted. The main issues were:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;The triangular waveform generated by the DAC was too fast. This fast signal did not give the ADC enough time to capture the values correctly.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;I mistakenly used the wrong name for the interrupt handler. It must be named &lt;STRONG&gt;ADC_IRQHandler(void)&lt;/STRONG&gt; instead of &lt;STRONG&gt;ADCDAC_IRQHandler(void)&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;After lowering the frequency (or increasing the number of samples per period) and renaming the interrupt routine, the ADC started working as expected.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2025 09:26:06 GMT</pubDate>
    <dc:creator>totolr_</dc:creator>
    <dc:date>2025-03-28T09:26:06Z</dc:date>
    <item>
      <title>ADC Acquisition Issue with Triangular Signal Generated by DAC on NHS3152</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/ADC-Acquisition-Issue-with-Triangular-Signal-Generated-by-DAC-on/m-p/2069617#M3679</link>
      <description>&lt;P class=""&gt;I am using an &lt;LI-PRODUCT title="NHS3152" id="NHS3152"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;device to generate a triangular waveform via the DAC and measure this signal with the ADC. The configuration is as follows&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;The DAC output is configured on pin &lt;STRONG&gt;ANA0_5&lt;/STRONG&gt; using the function Chip_ADCDAC_SetMuxDAC with the parameter ADCDAC_IO_ANA0_5.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;The ADC input is configured on pin &lt;STRONG&gt;ANA0_3&lt;/STRONG&gt; using Chip_ADCDAC_SetMuxADC with the parameter ADCDAC_IO_ANA0_3.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;A cable physically connects ANA0_5 to ANA0_3 to loop the signal.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;Technical Details:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;The IOCON configuration for both pins is set to analog mode (IOCON_FUNC_1).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;The DAC is operated in &lt;STRONG&gt;SINGLE_SHOT&lt;/STRONG&gt; mode to update the output on each write, although switching to &lt;STRONG&gt;CONTINUOUS&lt;/STRONG&gt; mode does not resolve the issue—it only slightly affects the signal quality.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;The ADC runs in continuous mode, with detection thresholds set to &lt;STRONG&gt;1500&lt;/STRONG&gt; (LOW_THRESHOLD) and &lt;STRONG&gt;2000&lt;/STRONG&gt; (HIGH_THRESHOLD).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;The code generates a lookup table (LUT) for a triangular waveform (ranging from DAC_MIN_VALUE to DAC_MAX_VALUE), and a 16-bit timer periodically triggers the DAC update.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Despite a clearly observable triangular signal on the output, no ADC interrupt is triggered and no ADC conversion result is recorded.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;Troubleshooting Steps Taken:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;I verified that the MUX selection functions (Chip_ADCDAC_SetMuxADC and Chip_ADCDAC_SetMuxDAC) use the correct channels (channel 3 for ADC and channel 5 for DAC) as specified in the documentation (Figure 90, Chapter 9.4 of the UM10876 manual).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;I confirmed that the IOCON settings for both pins are correctly set to analog mode (IOCON_FUNC_1) and that the cable connecting ANA0_5 to ANA0_3 is properly installed with a common ground.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;I tested modifying the check for the ADC conversion ready flag (ADCDAC_INT_CONVERSION_RDY_ADC) in the ADC interrupt routine, but this did not change the behavior.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Changing the DAC mode between SINGLE_SHOT and CONTINUOUS has no significant effect on the issue, apart from a slight variation in the signal quality.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;STRONG&gt;Request for Assistance:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;I would appreciate your help in understanding whether:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;The current configuration using two different pins via the analog multiplexer is correct for the shared ADCDAC block on the NHS3152, considering it operates with a round-robin scheduler.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;There are additional constraints (such as timing or configuration sequence issues) that might prevent the ADC interrupts from being triggered in this setup.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Alternative modifications, such as testing the ADC in single-shot mode or using the same channel for both ADC and DAC, could resolve the issue.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;Please find attached the complete code used for this configuration. Thank you in advance for your assistance and suggestions.&lt;/P&gt;&lt;P class=""&gt;Regards,&lt;BR /&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 16:11:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/ADC-Acquisition-Issue-with-Triangular-Signal-Generated-by-DAC-on/m-p/2069617#M3679</guid>
      <dc:creator>totolr_</dc:creator>
      <dc:date>2025-03-27T16:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Acquisition Issue with Triangular Signal Generated by DAC on NHS3152</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/ADC-Acquisition-Issue-with-Triangular-Signal-Generated-by-DAC-on/m-p/2070202#M3680</link>
      <description>&lt;P class=""&gt;I wanted to update you on the ticket I submitted. The main issues were:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;The triangular waveform generated by the DAC was too fast. This fast signal did not give the ADC enough time to capture the values correctly.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;I mistakenly used the wrong name for the interrupt handler. It must be named &lt;STRONG&gt;ADC_IRQHandler(void)&lt;/STRONG&gt; instead of &lt;STRONG&gt;ADCDAC_IRQHandler(void)&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;After lowering the frequency (or increasing the number of samples per period) and renaming the interrupt routine, the ADC started working as expected.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 09:26:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/ADC-Acquisition-Issue-with-Triangular-Signal-Generated-by-DAC-on/m-p/2070202#M3680</guid>
      <dc:creator>totolr_</dc:creator>
      <dc:date>2025-03-28T09:26:06Z</dc:date>
    </item>
  </channel>
</rss>

