<?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 FRDM-K64F : No output on DAC0_OUT with Processor Expert in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318280#M2411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just getting familiar with the FRDM-K64F board and have gotten a bunch of things working, ADC, GPIO, etc. What's not going so well is getting the DAC to work. Specifically nothing comes out on the DAC0_OUT pin when trying to configure it with Processor Expert (as Eclipse plugin).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I try the online compiler at mbed.org, there is no problem&lt;/STRONG&gt;, I get what I expect so I'm probing the right pin.&lt;/P&gt;&lt;P&gt;With&amp;nbsp; my Processor Expert code, I don't see any obvious errors, but nothing comes out, even following exactly the "typical usage" code in the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've checked the return from DAC_Enable() and it is okay. I've checked DAC_SetValue(), DAC_SetValue8(), DAC_SetValue16() and these also return ERR_OK. In fact, I specifically set DAC_Disable() as well to test to make sure I read back an error in this case, and it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw a similar thread &lt;A href="https://community.nxp.com/thread/321259"&gt;No output DAC0 or 1 using CW10.5 using PE DAC_LDD component on K70 tower board&lt;/A&gt; so I tried those suggested tricks, but still nothing. I added &amp;amp; configured VREF component, no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other things I need to try?&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// This is the typical usage example in the Help. It doesn't work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; byte i = 128;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; DA1_Enable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; for(;;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; if (i == 255) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; i = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; DA1_SetValue8(&amp;amp;i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another odd thing I noticed is that if I try a low level write to the register, e.g.&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;volatile char *DAC_BASE_ADDR;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_BASE_ADDR = (char *) 0x400CC000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;*(DACBASEADDR + 0x21) =&amp;nbsp; 0xC0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=======================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;it doesn't seem to do anything. If I use DAC_Enable() first, this doesn't disable it if I write 0x00 and if I use DAC_Disable(), this fails to enable it. I use the same technique to do low level GPIO toggle and it works as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2014 16:24:39 GMT</pubDate>
    <dc:creator>isaacleung</dc:creator>
    <dc:date>2014-06-12T16:24:39Z</dc:date>
    <item>
      <title>FRDM-K64F : No output on DAC0_OUT with Processor Expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318280#M2411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just getting familiar with the FRDM-K64F board and have gotten a bunch of things working, ADC, GPIO, etc. What's not going so well is getting the DAC to work. Specifically nothing comes out on the DAC0_OUT pin when trying to configure it with Processor Expert (as Eclipse plugin).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I try the online compiler at mbed.org, there is no problem&lt;/STRONG&gt;, I get what I expect so I'm probing the right pin.&lt;/P&gt;&lt;P&gt;With&amp;nbsp; my Processor Expert code, I don't see any obvious errors, but nothing comes out, even following exactly the "typical usage" code in the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've checked the return from DAC_Enable() and it is okay. I've checked DAC_SetValue(), DAC_SetValue8(), DAC_SetValue16() and these also return ERR_OK. In fact, I specifically set DAC_Disable() as well to test to make sure I read back an error in this case, and it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw a similar thread &lt;A href="https://community.nxp.com/thread/321259"&gt;No output DAC0 or 1 using CW10.5 using PE DAC_LDD component on K70 tower board&lt;/A&gt; so I tried those suggested tricks, but still nothing. I added &amp;amp; configured VREF component, no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other things I need to try?&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// This is the typical usage example in the Help. It doesn't work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; byte i = 128;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; DA1_Enable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; for(;;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; if (i == 255) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; i = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; DA1_SetValue8(&amp;amp;i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another odd thing I noticed is that if I try a low level write to the register, e.g.&lt;/P&gt;&lt;P&gt;=======================================================&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;volatile char *DAC_BASE_ADDR;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_BASE_ADDR = (char *) 0x400CC000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;*(DACBASEADDR + 0x21) =&amp;nbsp; 0xC0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=======================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;it doesn't seem to do anything. If I use DAC_Enable() first, this doesn't disable it if I write 0x00 and if I use DAC_Disable(), this fails to enable it. I use the same technique to do low level GPIO toggle and it works as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 16:24:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318280#M2411</guid>
      <dc:creator>isaacleung</dc:creator>
      <dc:date>2014-06-12T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F : No output on DAC0_OUT with Processor Expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318281#M2412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem, but referring to the thread you referenced (&lt;A href="https://community.nxp.com/thread/321259"&gt;No output DAC0 or 1 using CW10.5 using PE DAC_LDD component on K70 tower board&lt;/A&gt;), set the voltage reference source to External (Vdda) and it worked for me. My suspicion is that the VREF component is not available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 02:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318281#M2412</guid>
      <dc:creator>bobapplonie</dc:creator>
      <dc:date>2014-06-23T02:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F : No output on DAC0_OUT with Processor Expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318282#M2413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have reproduced the problem with DAC component and it is a defect related to the internal value computation which we will fix for next release.&amp;nbsp; We are sorry for the inconvenience. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, for Kinetis processors family, we recommend to use LDD components (in this case DAC_LDD) instead of “High level components”. The DAC component is interally using DAC_LDD anyway.&lt;/P&gt;&lt;P&gt;We have created simple example for you to use of the DAC_LDD component. Please find it attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code you can use setValue method to put the value to the DAC converter, like this:&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; DA1_SetValue(DA1_DeviceData, 2047)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note the first parameter of &lt;STRONG&gt;SetValue &lt;/STRONG&gt;method- it is a pointer to DAC device data structure that holds the internal status of the device.&lt;/P&gt;&lt;P&gt;If you have enabled auto-initialization, this structure is created automatically and accessible using &lt;EM&gt;{componentName}_DeviceData&lt;/EM&gt; macro so in this case there is &lt;EM&gt;&lt;STRONG&gt;DA1_DeviceData&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Petr Hradsky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 13:56:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318282#M2413</guid>
      <dc:creator>Petr_H</dc:creator>
      <dc:date>2014-06-27T13:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F : No output on DAC0_OUT with Processor Expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318283#M2414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2016 and the problem stands.&lt;/P&gt;&lt;P&gt;But,&lt;/P&gt;&lt;P&gt;the solution of use DAC_LDD and change to external reference (Vdda) works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Mar 2016 02:37:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/FRDM-K64F-No-output-on-DAC0-OUT-with-Processor-Expert/m-p/318283#M2414</guid>
      <dc:creator>viniciuscarvalho</dc:creator>
      <dc:date>2016-03-20T02:37:03Z</dc:date>
    </item>
  </channel>
</rss>

