<?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>S12 / MagniV MicrocontrollersのトピックZVL32 ADC question</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491008#M12129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Guys,&amp;nbsp; &lt;/P&gt;&lt;P&gt;I met a trouble on ADC of S9S12ZVL32. &lt;/P&gt;&lt;P&gt;ADC can work before i put init_linphy() into the project.&lt;/P&gt;&lt;P&gt;i found in init_linphy(),&amp;nbsp; when i change LP0IE=0x00, ADC cannot get the result. but when change it to LP0IE=0xC0, ADC can get the result.&lt;/P&gt;&lt;P&gt;it did confused me. i put my code here in the attached. Can anyone help me find out the root? &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robin &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-338649"&gt;zvlxx.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2016 08:57:37 GMT</pubDate>
    <dc:creator>irobin</dc:creator>
    <dc:date>2016-02-26T08:57:37Z</dc:date>
    <item>
      <title>ZVL32 ADC question</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491008#M12129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Guys,&amp;nbsp; &lt;/P&gt;&lt;P&gt;I met a trouble on ADC of S9S12ZVL32. &lt;/P&gt;&lt;P&gt;ADC can work before i put init_linphy() into the project.&lt;/P&gt;&lt;P&gt;i found in init_linphy(),&amp;nbsp; when i change LP0IE=0x00, ADC cannot get the result. but when change it to LP0IE=0xC0, ADC can get the result.&lt;/P&gt;&lt;P&gt;it did confused me. i put my code here in the attached. Can anyone help me find out the root? &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robin &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-338649"&gt;zvlxx.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 08:57:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491008#M12129</guid>
      <dc:creator>irobin</dc:creator>
      <dc:date>2016-02-26T08:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: ZVL32 ADC question</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491009#M12130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xioabin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Your adc_csl contains these commands: 0x00CDA000 and 0x00CCA000. There missing command which is marked as “End Of List”. So, ADC do not know where should finish with conversion sequence. Therefore the last command should be probably 0xC0CCA000. See more in chapter 9.4.2.15 ADC Command Register 0 (ADCCMD_0) in RM.&lt;/LI&gt;&lt;LI&gt;You placed adc_csl into ADC_COMMAND user segment, however I do not see such segment definition in your prm file.&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-left: 18.0pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;For correct work of ADC DMA, the command list and result list must by aligned to 4 byte boundary.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;I would like to recommend declare adc_csl[] and adc_result[] as:&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;//Command and result list have to be aligned - Base Pointer Register[1,0]=0;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1456487723728182 jive_text_macro" data-renderedposition="251_8_1192_112" jivemacro_uid="_1456487723728182" modifiedtitle="true"&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;const dword adc_csl[] __attribute__ ((aligned (4))) { //max 256 bytes = 64 commands per 4-byte entries&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;//...&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;word adc_result[] __attribute__ ((aligned (4))) {&amp;nbsp; //max 128 bytes = 64 results per 2-byte entries&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;//...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P style="margin-left: 18.0pt;"&gt;In that case, you don’t need explicitly specify where command and result will be placed. Linker will place these object automatically.&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Since these lists may not be accessed directly in code, I would like to recommend place their names into ENTRIES section in prm linker file for avoid to optimize out it as unused objects. For example:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14564879002303794 jive_text_macro" data-renderedposition="467_8_1192_64" jivemacro_uid="_14564879002303794"&gt;&lt;P style="margin-left: 18.0pt;"&gt;ENTRIES /* keep the following unreferenced variables */&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;adc_csl, adc_result&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;END&lt;/P&gt;&lt;/PRE&gt;&lt;P style="margin-left: 18.0pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;In attachment is simple ADC example code S12ZVL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&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>Fri, 26 Feb 2016 11:58:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491009#M12130</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-02-26T11:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: ZVL32 ADC question</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491010#M12131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Radek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;big thanks for your promptly support to resolve my trouble. Yes, aligned by 4 byte is key point. I check the address of adc_csl(adc_command) in map file is not aligned by 4 byte in original source/code, but it is aligned by 4 byte as per your guide and the code works correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 06:08:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ZVL32-ADC-question/m-p/491010#M12131</guid>
      <dc:creator>irobin</dc:creator>
      <dc:date>2016-03-01T06:08:40Z</dc:date>
    </item>
  </channel>
</rss>

