<?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: HVI*2 for S12ZVC in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HVI-2-for-S12ZVC/m-p/674148#M14153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;//Command and result list have to be aligned - Base Pointer Register[1,0]=0;&lt;BR /&gt;volatile unsigned long adc0_cmdlist[2] __attribute__ ((aligned (4))); //max 256 bytes = 64 commands per 4-byte entries &lt;BR /&gt;volatile unsigned int adc0_results[2] __attribute__ ((aligned (4))); //max 128 bytes = 64 results per 2-byte entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Define ADC0 command list&lt;BR /&gt;adc0_cmdlist[0] = CMD_SEL(&lt;SPAN&gt;eolw&lt;/SPAN&gt;)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(HVI0)+SMP(0);&lt;BR /&gt; adc0_cmdlist[1] = CMD_SEL(eolw)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(HVI1)+SMP(0);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I resolved the problem. The adc0_cmdlist[0] should be modify as follow:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;adc0_cmdlist[0] = CMD_SEL(&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;norm&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;HVI0&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;)+SMP(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jun 2017 09:08:08 GMT</pubDate>
    <dc:creator>aaronlee</dc:creator>
    <dc:date>2017-06-05T09:08:08Z</dc:date>
    <item>
      <title>HVI*2 for S12ZVC</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HVI-2-for-S12ZVC/m-p/674147#M14152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the code that work fine with HVI0 (PL0) as attachment.&lt;/P&gt;&lt;P&gt;1 channel (PL0 or PL1) can work fine.&lt;/P&gt;&lt;P&gt;Now, I want to measure 2 channel (PL0 &amp;amp; PL1) at the same time. How to do?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338910"&gt;20170604_ADC_Meter24V.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jun 2017 00:22:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HVI-2-for-S12ZVC/m-p/674147#M14152</guid>
      <dc:creator>aaronlee</dc:creator>
      <dc:date>2017-06-05T00:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: HVI*2 for S12ZVC</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HVI-2-for-S12ZVC/m-p/674148#M14153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;//Command and result list have to be aligned - Base Pointer Register[1,0]=0;&lt;BR /&gt;volatile unsigned long adc0_cmdlist[2] __attribute__ ((aligned (4))); //max 256 bytes = 64 commands per 4-byte entries &lt;BR /&gt;volatile unsigned int adc0_results[2] __attribute__ ((aligned (4))); //max 128 bytes = 64 results per 2-byte entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Define ADC0 command list&lt;BR /&gt;adc0_cmdlist[0] = CMD_SEL(&lt;SPAN&gt;eolw&lt;/SPAN&gt;)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(HVI0)+SMP(0);&lt;BR /&gt; adc0_cmdlist[1] = CMD_SEL(eolw)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(HVI1)+SMP(0);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I resolved the problem. The adc0_cmdlist[0] should be modify as follow:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;adc0_cmdlist[0] = CMD_SEL(&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;norm&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;)+INTFLG_SEL(1)+VRH_SEL(1)+VRL_SEL(1)+CH_SEL(&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;HVI0&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;)+SMP(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jun 2017 09:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HVI-2-for-S12ZVC/m-p/674148#M14153</guid>
      <dc:creator>aaronlee</dc:creator>
      <dc:date>2017-06-05T09:08:08Z</dc:date>
    </item>
  </channel>
</rss>

