<?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: MC56F847 ADC16 configuration problem in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954736#M1708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you change conversion&amp;nbsp;complete vector location name as&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;AD2_Interrupt? your code is coming to interrupt? who is triggering ADC? can you try to read each channel in separate variable&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jun 2019 05:57:47 GMT</pubDate>
    <dc:creator>mohammad_kamil</dc:creator>
    <dc:date>2019-06-10T05:57:47Z</dc:date>
    <item>
      <title>MC56F847 ADC16 configuration problem</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954735#M1707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am first time using CW. I am having trouble making ADC16 work.&lt;/P&gt;&lt;P&gt;I have four new analog inputs connected to MCU(ANC16,17,18 and 19). ANC16 and 19 are single end inputs whereas ANC17 and 18 are differential inputs(RTD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other questions:&lt;/P&gt;&lt;P&gt;1. How to select VDDa and VSSa as reference source for ADC16? From datasheet, its mentioned that internally its routed to reference pins. Is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed below steps to modify my existing project.&lt;/P&gt;&lt;P&gt;1. Enable peripheral in&amp;nbsp;PE_low_level_init().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* GPIOA_PER: PE11=1,PE10=1,PE9=1,PE8=1,PE3=1,PE2=1,PE1=1,PE0=1 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; setReg16Bits(GPIOA_PER, 0x0F0FU);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;2. Initialize ADC16 in 12 bit mode:&lt;/P&gt;&lt;P&gt;void AD2_Init(void)&lt;BR /&gt;{&lt;BR /&gt; /* INTC_IPR2: ADC_COCO=2 */&lt;BR /&gt; clrSetReg16Bits(INTC_IPR2, 0x4000U, 0x8000U); &lt;BR /&gt; /* ADC16_SC1A: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,COCO=0,AIEN=1,??=0,ADCH=0x1F */&lt;BR /&gt; setReg32(ADC16_SC1A,0x1F); /* Disable the module */ &lt;BR /&gt; /* ADC16_SC2: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,ADACT=0,ADTRG=0,ACFE=0,ACFGT=0,ACREN=0,DMAEN=0,REFSEL=0 */&lt;BR /&gt; setReg32(ADC16_SC2,0x00); /* Disable HW trigger and autocompare and select the voltage reference */ &lt;BR /&gt; /* ADC16_SC3: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,CAL=0,CALF=0,??=0,ASSITRGEN=0,ADCO=0,AVGE=0,AVGS=0 */&lt;BR /&gt; setReg32(ADC16_SC3,0x00); /* Disable HW average and continous conversion */&lt;/P&gt;&lt;P&gt;AD2_OutFlg = FALSE; /* No measured value */&lt;BR /&gt; AD2_ModeFlg = IDLE; /* Device isn't running */&lt;BR /&gt; /* ADC16_CFG1: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,ADLPC=0,ADIV=2,ADLSMP=0,MODE=1,ADICLK=2 */&lt;BR /&gt; setReg32(ADC16_CFG1,0x04); /* Configure clock settings and power and resolution mode */ &lt;BR /&gt; /* ADC16_CFG2: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,ADACKEN=0,ADHSC=0,ADLSTS=0 */&lt;BR /&gt; setReg32(ADC16_CFG2,0x00); /* Configure asynchroclock and high speed conversion and sample time longitude */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;3. Copy data in interrupt handler&lt;/P&gt;&lt;P&gt;void AD2_Interrupt(void)&lt;BR /&gt;{&lt;BR /&gt; AD2_OutV[SumChan] = (UINT16)(getReg32(ADC16_RA)); /* Save measured value */&lt;BR /&gt; SumChan++; /* Increase counter of measured channels*/&lt;BR /&gt; if (SumChan == 4U) { /* Is number of measured channels equal to the number of channels used in the component? */&lt;BR /&gt; SumChan = 0U; /* If yes then set the counter of measured channels to 0 */&lt;BR /&gt; AD2_OutFlg = TRUE; /* Measured values are available */&lt;BR /&gt; AD2_GetValue16(ADC.ADC_Results); /* If yes then invoke user event */&lt;BR /&gt; AD2_ModeFlg = IDLE; /* Set the device to the stop mode */&lt;BR /&gt; return; /* Return from interrupt */&lt;BR /&gt; }&lt;BR /&gt; setReg32(ADC16_SC1A,Channels[SumChan]); /* Start measurement of next channel */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see the interrupt handler is called after conversion completed. ADC output looks like, for Input 1=255, Input 2=0, Input 3=0, Input 4=0/500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what I am missing here. Any input is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 10:34:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954735#M1707</guid>
      <dc:creator>dhanaraj_shanmu</dc:creator>
      <dc:date>2019-06-06T10:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: MC56F847 ADC16 configuration problem</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954736#M1708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you change conversion&amp;nbsp;complete vector location name as&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;AD2_Interrupt? your code is coming to interrupt? who is triggering ADC? can you try to read each channel in separate variable&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 05:57:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954736#M1708</guid>
      <dc:creator>mohammad_kamil</dc:creator>
      <dc:date>2019-06-10T05:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: MC56F847 ADC16 configuration problem</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954737#M1709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ISR is served every time there is a conversion completed. ADC is software triggered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void AD2_HWEnDi(void)&lt;BR /&gt;{&lt;BR /&gt; if (AD2_ModeFlg) { /* Start or stop measurement? */&lt;BR /&gt; AD2_OutFlg = FALSE; /* Output values aren't available */&lt;BR /&gt; SumChan = 0U; /* Set the counter of measured channels to 0 */&lt;BR /&gt; ClrSumV(); /* Clear measured values */&lt;BR /&gt; setReg32(ADC16_SC1A,Channels[SumChan]); /* If yes then start the conversion */&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;static const byte Channels[4] = {0x50U,0x51U,0x52U,0x53U}; /* Contents for the device control register */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the ISR, channel number is handled.&lt;/P&gt;&lt;P&gt;#pragma interrupt alignsp saveall&lt;BR /&gt;void AD2_Interrupt(void)&lt;BR /&gt;{&lt;BR /&gt; AD2_OutV[SumChan] = (UINT16)(getReg32(ADC16_RA)); /* Save measured value */&lt;BR /&gt; &lt;STRONG&gt;SumChan++; /* Increase counter of measured channels*/&lt;/STRONG&gt;&lt;BR /&gt; if (SumChan == 4U) &lt;BR /&gt; { /* Is number of measured channels equal to the number of channels used in the component? */&lt;BR /&gt; SumChan = 0U; /* If yes then set the counter of measured channels to 0 */&lt;BR /&gt; AD2_OutFlg = TRUE; /* Measured values are available */&lt;BR /&gt; AD2_GetValue16(ADC.ADC_Results); /* If yes then invoke user event */&lt;BR /&gt; AD2_ModeFlg = IDLE; /* Set the device to the stop mode */&lt;BR /&gt; return; /* Return from interrupt */&lt;BR /&gt; }&lt;BR /&gt; setReg32(ADC16_SC1A,Channels[SumChan]); /* Start measurement of next channel */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 06:15:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954737#M1709</guid>
      <dc:creator>dhanaraj_shanmu</dc:creator>
      <dc:date>2019-06-10T06:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: MC56F847 ADC16 configuration problem</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954738#M1710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shanmugam,&lt;/P&gt;&lt;P&gt;I have developed an ADC16 example, it use software trigger mode to sample ANC16 pin(GPIOA8 pin), it works fine.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 08:14:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954738#M1710</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-06-10T08:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: MC56F847 ADC16 configuration problem</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954739#M1711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your code. It helped me to verify my code works. Your project exactly reads the same counts as mine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 15:02:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56F847-ADC16-configuration-problem/m-p/954739#M1711</guid>
      <dc:creator>dhanaraj_shanmu</dc:creator>
      <dc:date>2019-06-10T15:02:18Z</dc:date>
    </item>
  </channel>
</rss>

