<?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 Help with triggering A/D from PWM in MC56F84789 in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703669#M1109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to get the ADC12 and ADC16 to trigger from the PWMA output of SM0, SM1, and SM2 modules.&amp;nbsp; I have set the XBARA_SEL0, 1, 2 registers to map the pwm module's PWMA output to the ADC input, and similarly for the PWMB and and the ADC16.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL0 = 0x140C;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL1 = 0x160D;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL2 = 0x180E;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code, the PWMA_SMxTCTRL register reads 0x0004 instead of 0x8004 (which is supposed to be setting the trigger for PWMA as a trigger).&amp;nbsp; The code does attempt to set the bit in PWMA_Init() in the PWMA.c module generated by ProcessorExpert (and similarly for SM1 and SM2),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* PWMA_SM0TCTRL: PWAOT0=1,PWBOT1=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,OUT_TRIG_EN=4 */&lt;BR /&gt;&amp;nbsp; setReg16(PWMA_SM0TCTRL, 0x8004U);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't get set when I look at it using CodeWarrior.&amp;nbsp; Any idea what is wrong?&amp;nbsp; Is this even possible with this chip?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Aug 2017 14:56:58 GMT</pubDate>
    <dc:creator>ptszymanski</dc:creator>
    <dc:date>2017-08-21T14:56:58Z</dc:date>
    <item>
      <title>Help with triggering A/D from PWM in MC56F84789</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703669#M1109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to get the ADC12 and ADC16 to trigger from the PWMA output of SM0, SM1, and SM2 modules.&amp;nbsp; I have set the XBARA_SEL0, 1, 2 registers to map the pwm module's PWMA output to the ADC input, and similarly for the PWMB and and the ADC16.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL0 = 0x140C;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL1 = 0x160D;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XBARA_SEL2 = 0x180E;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code, the PWMA_SMxTCTRL register reads 0x0004 instead of 0x8004 (which is supposed to be setting the trigger for PWMA as a trigger).&amp;nbsp; The code does attempt to set the bit in PWMA_Init() in the PWMA.c module generated by ProcessorExpert (and similarly for SM1 and SM2),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* PWMA_SM0TCTRL: PWAOT0=1,PWBOT1=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,OUT_TRIG_EN=4 */&lt;BR /&gt;&amp;nbsp; setReg16(PWMA_SM0TCTRL, 0x8004U);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't get set when I look at it using CodeWarrior.&amp;nbsp; Any idea what is wrong?&amp;nbsp; Is this even possible with this chip?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 14:56:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703669#M1109</guid>
      <dc:creator>ptszymanski</dc:creator>
      <dc:date>2017-08-21T14:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with triggering A/D from PWM in MC56F84789</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703670#M1110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reading, I figured it out...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 18:20:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703670#M1110</guid>
      <dc:creator>ptszymanski</dc:creator>
      <dc:date>2017-08-21T18:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with triggering A/D from PWM in MC56F84789</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703671#M1111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Peter,&lt;/P&gt;&lt;P&gt;Pls refer to the screenshot in the MC56F847xxRM.pdf, if you want to use PWMA0_Trig0 to trigger ADCA, this is the crossbar setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; XBARA_SEL6 = 20; //the 20 means XBAR_IN20,&amp;nbsp;&amp;nbsp;&amp;nbsp; XBAR_OUT12 is&amp;nbsp; the ADCA trigger&lt;/P&gt;&lt;P&gt;If you want to use PWMA_Trig0 to trigger SAR ADC&lt;/P&gt;&lt;P&gt;&amp;nbsp; XBARA_SEL7 = 20; //the 20 means XBAR_IN20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the PWMA triggering setting:&lt;/P&gt;&lt;P&gt;setReg16(PWMA_SM0TCTRL, 0x04U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //use VAL2 to trigger, do not set the PWMAOT0 or PWMAOT1 bits&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28426iA4FC423CFDB779C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28471iDF1995C0B53DF80D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 05:58:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Help-with-triggering-A-D-from-PWM-in-MC56F84789/m-p/703671#M1111</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-08-22T05:58:34Z</dc:date>
    </item>
  </channel>
</rss>

