<?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 ADC Configuration in S32K</title>
    <link>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2002959#M43691</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to configure PTE16(ADC0) pin in the S32K312 MCU using S32 DS 3.5. We need to read the voltage level on that pin and need to control the pin accordingly. For your reference, find the details in the below image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_0-1732719001998.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312891iABD1FD255775DE3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_0-1732719001998.png" alt="SasiKumar_Vengam_0-1732719001998.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_1-1732719019049.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312892iB0360B0018DC9CD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_1-1732719019049.png" alt="SasiKumar_Vengam_1-1732719019049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_2-1732719065514.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312894i2277DEF53331E3CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_2-1732719065514.png" alt="SasiKumar_Vengam_2-1732719065514.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We configured this using an example, they have used interrupt. But we prefer to configure without using the ISR function.&lt;/P&gt;&lt;P&gt;Any simple implementation of ADC without ISR would help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 14:52:43 GMT</pubDate>
    <dc:creator>SasiKumar_Vengam</dc:creator>
    <dc:date>2024-11-27T14:52:43Z</dc:date>
    <item>
      <title>ADC Configuration</title>
      <link>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2002959#M43691</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to configure PTE16(ADC0) pin in the S32K312 MCU using S32 DS 3.5. We need to read the voltage level on that pin and need to control the pin accordingly. For your reference, find the details in the below image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_0-1732719001998.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312891iABD1FD255775DE3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_0-1732719001998.png" alt="SasiKumar_Vengam_0-1732719001998.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_1-1732719019049.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312892iB0360B0018DC9CD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_1-1732719019049.png" alt="SasiKumar_Vengam_1-1732719019049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasiKumar_Vengam_2-1732719065514.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/312894i2277DEF53331E3CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasiKumar_Vengam_2-1732719065514.png" alt="SasiKumar_Vengam_2-1732719065514.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We configured this using an example, they have used interrupt. But we prefer to configure without using the ISR function.&lt;/P&gt;&lt;P&gt;Any simple implementation of ADC without ISR would help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 14:52:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2002959#M43691</guid>
      <dc:creator>SasiKumar_Vengam</dc:creator>
      <dc:date>2024-11-27T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Configuration</title>
      <link>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2002965#M43692</link>
      <description>For your reference, The main code used is:&lt;BR /&gt;/**************************************************** ADC sample code **************************************************************/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* Get ADC max value from the resolution */&lt;BR /&gt;if (AdcHwUnit_0.AdcResolution == ADC_SAR_IP_RESOLUTION_8)&lt;BR /&gt;adcMax = (uint16_t) (1 &amp;lt;&amp;lt; 8);&lt;BR /&gt;else if (AdcHwUnit_0.AdcResolution == ADC_SAR_IP_RESOLUTION_10)&lt;BR /&gt;adcMax = (uint16_t) (1 &amp;lt;&amp;lt; 10);&lt;BR /&gt;else if (AdcHwUnit_0.AdcResolution == ADC_SAR_IP_RESOLUTION_12)&lt;BR /&gt;adcMax = (uint16_t) (1 &amp;lt;&amp;lt; 12);&lt;BR /&gt;else if (AdcHwUnit_0.AdcResolution == ADC_SAR_IP_RESOLUTION_14)&lt;BR /&gt;adcMax = (uint16_t) (1 &amp;lt;&amp;lt; 14);&lt;BR /&gt;else&lt;BR /&gt;adcMax = (uint16_t) (1 &amp;lt;&amp;lt; 14);&lt;BR /&gt;&lt;BR /&gt;status = (StatusType) Adc_Sar_Ip_Init(ADCHWUNIT_0_INSTANCE, &amp;amp;AdcHwUnit_0);&lt;BR /&gt;while (status != E_OK);&lt;BR /&gt;&lt;BR /&gt;/* Call Calibration function multiple times, to mitigate instability of board source */&lt;BR /&gt;for(Index = 0; Index &amp;lt;= 5; Index++)&lt;BR /&gt;{&lt;BR /&gt;status = (StatusType) Adc_Sar_Ip_DoCalibration(ADCHWUNIT_0_INSTANCE);&lt;BR /&gt;if(status == E_OK)&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;Adc_Sar_Ip_EnableNotifications(ADCHWUNIT_0_INSTANCE, ADC_SAR_IP_NOTIF_FLAG_NORMAL_ENDCHAIN | ADC_SAR_IP_NOTIF_FLAG_INJECTED_ENDCHAIN);&lt;BR /&gt;&lt;BR /&gt;/* Start a SW triggered normal conversion on ADC_SAR */&lt;BR /&gt;Adc_Sar_Ip_StartConversion(ADCHWUNIT_0_INSTANCE, ADC_SAR_IP_CONV_CHAIN_NORMAL);&lt;BR /&gt;/* Wait for the notification to be triggered and read the data */&lt;BR /&gt;while (notif_triggered != TRUE)&lt;BR /&gt;{&lt;BR /&gt;__asm volatile ("nop");&lt;BR /&gt;}&lt;BR /&gt;notif_triggered = FALSE;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;//notif_triggered = TRUE;&lt;BR /&gt;data_bandgap = Adc_Sar_Ip_GetConvData(ADCHWUNIT_0_INSTANCE, ADC_SAR_USED_CH_BANDGAP);&lt;BR /&gt;data_POT_0 = Adc_Sar_Ip_GetConvData(ADCHWUNIT_0_INSTANCE, ADC_SAR_USED_CH_POT_0);&lt;BR /&gt;&lt;BR /&gt;/* Process the result to get the value in volts */&lt;BR /&gt;data_bandgap_volt = ((float) data_bandgap / adcMax) * (ADC_VREFH - ADC_VREFL);&lt;BR /&gt;data_POT_0_volt = ((float) data_POT_0 / adcMax) * (ADC_VREFH - ADC_VREFL);&lt;BR /&gt;//&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Nov 2024 14:59:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2002965#M43692</guid>
      <dc:creator>SasiKumar_Vengam</dc:creator>
      <dc:date>2024-11-27T14:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Configuration</title>
      <link>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2004475#M43753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;You could refer to the following S32K Knowledge Base post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/RTD400-LLD-K344-ADC-SW-HW-trigger/ta-p/1966179" target="_blank" rel="noopener"&gt;[RTD400 LLD]K344 ADC SW+HW trigger&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 21:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/ADC-Configuration/m-p/2004475#M43753</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2024-11-29T21:47:05Z</dc:date>
    </item>
  </channel>
</rss>

