<?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>Processor Expert SoftwareのトピックMultiple ADC Channels in PE?</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Multiple-ADC-Channels-in-PE/m-p/676749#M4041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm getting really frustrated by the lack of documentation with processor expert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the values of two pins from an ADC on a FRDM-K26Z. They're ADC0_SE8 and ADC0_SE9 if that matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the component fsl_adc16, which lets me set up multiple channel configurations, both single ended. One ADC configuration:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;adConv1_InitConfig0 = {&lt;BR /&gt; .lowPowerEnable = false,&lt;BR /&gt; .clkDividerMode = kAdc16ClkDividerOf1,&lt;BR /&gt; .longSampleTimeEnable = false,&lt;BR /&gt; .resolution = kAdc16ResolutionBitOfSingleEndAs12,&lt;BR /&gt; .clkSrc = kAdc16ClkSrcOfBusClk,&lt;BR /&gt; .asyncClkEnable = false,&lt;BR /&gt; .highSpeedEnable = true,&lt;BR /&gt; .longSampleCycleMode = kAdc16LongSampleCycleOf24,&lt;BR /&gt; .hwTriggerEnable = false,&lt;BR /&gt; .refVoltSrc = kAdc16RefVoltSrcOfVref,&lt;BR /&gt; .continuousConvEnable = true,&lt;BR /&gt; .dmaEnable = false,&lt;BR /&gt;};&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This works for the first channel configuration, software triggered (or really, "continuous") via&amp;nbsp;ADC16_DRV_GetConvValueRAW(0,0).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When trying to get the second channel configuration, via&amp;nbsp;ADC16_DRV_GetConvValueRAW(0,1), I get nothing but zeros. Even when attempting to manually initialize/trigger the 2nd channel with&amp;nbsp;ADC16_DRV_ConfigConvChn(adConv1_IDX, 1, &amp;amp;adConv1_ChnConfig1);&amp;nbsp;I get nothing but zeros. When I try adding&amp;nbsp;DC16_DRV_WaitConvDone(adConv1_IDX,1);, the device effectively halts at that line (the conversion is never done).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diving deeper into the fsl_adc16 component, I notice that I can't initialize multiple channels unless I turn on hardware triggering (Maybe add why that is a requirement to the docs?). So I tried that. I enabled hardware triggering in adConv1_InitConfig0, pointed Trigger A to PIT_Trigger_0 (I also tried combinations of Trigger B and PIT_Trigger_1), and set up an fsl_pit component. There's no pin configuration &amp;nbsp;in the fsl_pit component so I'm just assuming it'll be on one of the PIT_Trigger pins...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The behavior is even worse now, with *neither* channel getting any values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm losing my mind here because I feel like this ought to be a ridiculously simple thing to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2017 03:47:14 GMT</pubDate>
    <dc:creator>steveno</dc:creator>
    <dc:date>2017-07-20T03:47:14Z</dc:date>
    <item>
      <title>Multiple ADC Channels in PE?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Multiple-ADC-Channels-in-PE/m-p/676749#M4041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm getting really frustrated by the lack of documentation with processor expert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the values of two pins from an ADC on a FRDM-K26Z. They're ADC0_SE8 and ADC0_SE9 if that matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the component fsl_adc16, which lets me set up multiple channel configurations, both single ended. One ADC configuration:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;adConv1_InitConfig0 = {&lt;BR /&gt; .lowPowerEnable = false,&lt;BR /&gt; .clkDividerMode = kAdc16ClkDividerOf1,&lt;BR /&gt; .longSampleTimeEnable = false,&lt;BR /&gt; .resolution = kAdc16ResolutionBitOfSingleEndAs12,&lt;BR /&gt; .clkSrc = kAdc16ClkSrcOfBusClk,&lt;BR /&gt; .asyncClkEnable = false,&lt;BR /&gt; .highSpeedEnable = true,&lt;BR /&gt; .longSampleCycleMode = kAdc16LongSampleCycleOf24,&lt;BR /&gt; .hwTriggerEnable = false,&lt;BR /&gt; .refVoltSrc = kAdc16RefVoltSrcOfVref,&lt;BR /&gt; .continuousConvEnable = true,&lt;BR /&gt; .dmaEnable = false,&lt;BR /&gt;};&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This works for the first channel configuration, software triggered (or really, "continuous") via&amp;nbsp;ADC16_DRV_GetConvValueRAW(0,0).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When trying to get the second channel configuration, via&amp;nbsp;ADC16_DRV_GetConvValueRAW(0,1), I get nothing but zeros. Even when attempting to manually initialize/trigger the 2nd channel with&amp;nbsp;ADC16_DRV_ConfigConvChn(adConv1_IDX, 1, &amp;amp;adConv1_ChnConfig1);&amp;nbsp;I get nothing but zeros. When I try adding&amp;nbsp;DC16_DRV_WaitConvDone(adConv1_IDX,1);, the device effectively halts at that line (the conversion is never done).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diving deeper into the fsl_adc16 component, I notice that I can't initialize multiple channels unless I turn on hardware triggering (Maybe add why that is a requirement to the docs?). So I tried that. I enabled hardware triggering in adConv1_InitConfig0, pointed Trigger A to PIT_Trigger_0 (I also tried combinations of Trigger B and PIT_Trigger_1), and set up an fsl_pit component. There's no pin configuration &amp;nbsp;in the fsl_pit component so I'm just assuming it'll be on one of the PIT_Trigger pins...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The behavior is even worse now, with *neither* channel getting any values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm losing my mind here because I feel like this ought to be a ridiculously simple thing to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 03:47:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Multiple-ADC-Channels-in-PE/m-p/676749#M4041</guid>
      <dc:creator>steveno</dc:creator>
      <dc:date>2017-07-20T03:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple ADC Channels in PE?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Multiple-ADC-Channels-in-PE/m-p/676750#M4042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello steven,&lt;/P&gt;&lt;P&gt;- From the Reference manual of your chip&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/27928i32352F74E7FA37B1/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;so if you initialize two pins at the same time, the I think only the second one work.&lt;/P&gt;&lt;P&gt;- About the second channel&amp;nbsp; initialization, please change&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;ADC16_DRV_ConfigConvChn&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;adConv1_IDX&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;adConv1_ChnConfig1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;ADC16_DRV_ConfigConvChn&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;adConv1_IDX&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;adConv1_ChnConfig1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then&amp;nbsp; read result also use&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;ADC16_DRV_GetConvValueRAW&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; ‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- In the hardware trigger, if you use the PIT as trigger source, it needn't any pins for PIT.&lt;/P&gt;&lt;P&gt;After you configure the PIT correctly, it will the PIT trigger will automatically trigger ADC .&lt;/P&gt;&lt;P&gt;- About the hardware trigger , there is demo under KSDKv1.3 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KSDK_1.3.0\examples\frdmkl26z\demo_apps\adc_hw_trigger&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-About the PE, there is detail describe about the each component : right lick fsl_adc16 component -&amp;gt; choose "Help on component "&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/27929iF8C0CBB04DF6DCAA/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:57:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Multiple-ADC-Channels-in-PE/m-p/676750#M4042</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-02T13:57:54Z</dc:date>
    </item>
  </channel>
</rss>

