<?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 BSP in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/ADC-configuration-in-BSP/m-p/377249#M12587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I am writing MQX application code for Kinetis MCU MK64FN1M0VLL12 of a custom board. My question is regarding ADC configuration in BSP. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I would like to use pin 14 (ADC0_DP1) and pin 15(ADC0_DM1) as two singled ended ADC inputs instead of differential ADC (which is by default). How to configure BSP projects to make this work? The BSP projects I am using are ported from FRDM-K64F BSPs and All ADC related configuration are as default. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I noticed that in (costomboard).h file under bsp project directory, there are macros defining ADC input and ADC source mapping. What ADC source should I use if I want to configure those two pins are two single-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;ended ADC inputs? Is there any other places in BSP projects or application code (My plan is to use LWADC APIs) that I need to modify to make this work? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Tuo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2015 15:46:37 GMT</pubDate>
    <dc:creator>tuowang</dc:creator>
    <dc:date>2015-01-26T15:46:37Z</dc:date>
    <item>
      <title>ADC configuration in BSP</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/ADC-configuration-in-BSP/m-p/377249#M12587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I am writing MQX application code for Kinetis MCU MK64FN1M0VLL12 of a custom board. My question is regarding ADC configuration in BSP. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I would like to use pin 14 (ADC0_DP1) and pin 15(ADC0_DM1) as two singled ended ADC inputs instead of differential ADC (which is by default). How to configure BSP projects to make this work? The BSP projects I am using are ported from FRDM-K64F BSPs and All ADC related configuration are as default. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I noticed that in (costomboard).h file under bsp project directory, there are macros defining ADC input and ADC source mapping. What ADC source should I use if I want to configure those two pins are two single-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;ended ADC inputs? Is there any other places in BSP projects or application code (My plan is to use LWADC APIs) that I need to modify to make this work? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Tuo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 15:46:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/ADC-configuration-in-BSP/m-p/377249#M12587</guid>
      <dc:creator>tuowang</dc:creator>
      <dc:date>2015-01-26T15:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: ADC configuration in BSP</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/ADC-configuration-in-BSP/m-p/377250#M12588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately MQX 4.1.1 doesn’t contain directly FRDMK64F project for LWADC example code.&lt;/P&gt;&lt;P&gt;However you can take LWADC projects for other boards as inspiration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can modify frdmk64f.h file or rather user_config.h file where you define your BSP ADC channels as for example:&lt;/P&gt;&lt;P&gt;#define BSP_ADC_INPUT_0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ADC0_SOURCE_AD1)&amp;nbsp; //pin14 for 100 LQFP package&lt;/P&gt;&lt;P&gt;#define BSP_ADC_INPUT_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ADC0_SOURCE_AD20)&amp;nbsp; //pin15 for 100 LQFP package&lt;/P&gt;&lt;P&gt;See chapter “3.7.1.3.1.3 ADC0 Channel Assignment for 100-Pin Package” in reference manual:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf"&gt;http://www.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADC0_SOURCE_AD1 refers to ADC0_DP1 with SC1n[DIFF]= 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&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>Tue, 27 Jan 2015 12:09:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/ADC-configuration-in-BSP/m-p/377250#M12588</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-01-27T12:09:00Z</dc:date>
    </item>
  </channel>
</rss>

