<?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>Kinetis Microcontrollers中的主题 Re: PIT, PDB to trigger DAC</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182804#M1807</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;&lt;SPAN&gt;See chapter 4 of &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerADC.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerADC.pdf&lt;/A&gt;&lt;SPAN&gt; for HW triggered DAC (or PWM as alternative DAC) and DMA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Full solution in uTasker Kinetis project for most Kinetis parts and all popular development environments, including synchronisation to USB audio output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis for professionals: &lt;A href="https://community.nxp.com/www.utasker.com" target="test_blank"&gt;www.utasker.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Aug 2016 00:05:32 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2016-08-08T00:05:32Z</dc:date>
    <item>
      <title>PIT, PDB to trigger DAC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182801#M1804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I trying to generate a sine wave on the DAC output. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the sine wave table stored in the DAC buffer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything works, except the DAC updates much faster than I want despite what values I use for PDB0_DACINT0 or PIT_LDVAL0. &amp;nbsp;It seems to be updating at about 25 MHz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;uint16_t buf[16] ={2047, 2429, 2754, 2970, 3047, 2970, 2754, 2429, 2047, 1664, 1339,1123, 1047, 1123, 1339, 1664}; // Sine wave buffer int i; uint8_t *p; // enable clock to DAC (pg. 289) SIM_SCGC2 |= SIM_SCGC2_DAC0_MASK ;   // enable DAC, use DACREF_2 (wasn't getting output using DACREF_1) DAC0_C0 |= DAC_C0_DACEN_MASK | DAC_C0_DACRFS_MASK; DAC0_C1 |= DAC_C1_DACBFEN_MASK;  p = (uint8_t*)0x400cc000; for(i=0; i &amp;lt; 16; i++) {  *p = (buf[i] &amp;amp; 0xff);  p++;  *p = (buf[i] &amp;amp; 0xf00) &amp;gt;&amp;gt; 8;  p++; }  // Now we need to setup trigger. SIM_SCGC6 |= SIM_SCGC6_PDB_MASK | SIM_SCGC6_PIT_MASK;  // enable clock to PDB and PIT.  // PIT module doc pg 1071  PIT_LDVAL0 = 10000; // don't seem to do what I expect PIT_TCTRL0 |= PIT_TCTRL_TEN_MASK;  // Enable PIT timer PIT_MCR &amp;amp;= ~PIT_MCR_MDIS_MASK; // enable PIT Timer (pg. 1074)  // Now tell PDB to look for PIT0 // PDB Doc on pg. 913  // Select PIT as trigger // PDB0_SC register doc on pg. 920. // Triggers defined on pg. 131   0b0100 is PIT CH 0 PDB0_SC |= PDB_SC_TRGSEL(4) | PDB_SC_PDBEN_MASK;  PDB0_DACINT0 = 0xff; // changing this doesn't change update rate as I would expect PDB0_DACINTC0 |= 1;  // DAC Interval Trigger enable&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182801#M1804</guid>
      <dc:creator>MikeAdv</dc:creator>
      <dc:date>2020-10-29T09:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: PIT, PDB to trigger DAC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182802#M1805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I don't really need the PIT. &amp;nbsp;I can start the PDB using a software trigger. &amp;nbsp;Once started the DAC interval counter will generate output continually.&lt;/P&gt;&lt;P&gt;2) The problem with my code was that I wasn't "loading" the value I set in PDB0_DACINT0. &amp;nbsp;After writting to PDB0_DACINT0, it is necessary to set the LDOK bit, then things work as expected!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 03:28:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182802#M1805</guid>
      <dc:creator>MikeAdv</dc:creator>
      <dc:date>2011-11-15T03:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: PIT, PDB to trigger DAC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182803#M1806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, I trying use the DAC with HW trigger but I couldn't make it works. I'm using kinetis studio v. 3.&lt;/P&gt;&lt;P&gt;Could you give some ideia?&lt;/P&gt;&lt;P&gt;I sending a link to project: &lt;A href="https://drive.google.com/open?id=0B90HDmfyvQ9UNFN1am1iY3gzeG8" title="https://drive.google.com/open?id=0B90HDmfyvQ9UNFN1am1iY3gzeG8"&gt;gerador.zip - Google Drive&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 18:18:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182803#M1806</guid>
      <dc:creator>julioruzicki</dc:creator>
      <dc:date>2016-08-05T18:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: PIT, PDB to trigger DAC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182804#M1807</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;&lt;SPAN&gt;See chapter 4 of &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerADC.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerADC.pdf&lt;/A&gt;&lt;SPAN&gt; for HW triggered DAC (or PWM as alternative DAC) and DMA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Full solution in uTasker Kinetis project for most Kinetis parts and all popular development environments, including synchronisation to USB audio output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis for professionals: &lt;A href="https://community.nxp.com/www.utasker.com" target="test_blank"&gt;www.utasker.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 00:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-PDB-to-trigger-DAC/m-p/182804#M1807</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-08-08T00:05:32Z</dc:date>
    </item>
  </channel>
</rss>

