<?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 Re: MPC5777C etpu phase error in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708578#M9161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. It is randomly every time I power up. I cannot tell if it is multiple of TCR1, since I am running at 100MHz, each period is very small.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a thought, could it because of the etpu code flash problem? To me, it looks like the etpu code started before everything is copied to etpu code ram. But if I do the reset, since all the code is still in the ram which is copied from last power up, it works? But I am using the library, and there is no change on this part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my code, all these etpu related functions are from the library without any change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void) {&lt;BR /&gt; int counter = 0;&lt;/P&gt;&lt;P&gt;//setup clock&lt;BR /&gt; Sysclk_Setup(SELECT_SYSCLK_PLL0, 1, 2, 2, 2, SELECT_PLL0_SOURCE_XOSC, 5);&lt;/P&gt;&lt;P&gt;//eTPU&lt;BR /&gt; GPIO_Init(115, PRIMARY_FUN, 0, 1); //etupa 1 ~ 7&lt;BR /&gt; GPIO_Init(116, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(117, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(118, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(119, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(120, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(121, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(122, PRIMARY_FUN, 0, 1); //etupa 8,9&lt;BR /&gt; GPIO_Init(123, PRIMARY_FUN, 0, 1);&lt;/P&gt;&lt;P&gt;GPIO_Init(142, PRIMARY_FUN, 0, 1); //etpua 31, 28&lt;BR /&gt; GPIO_Init(145, PRIMARY_FUN, 0, 1);&lt;/P&gt;&lt;P&gt;my_system_etpu_init();&lt;/P&gt;&lt;P&gt;my_system_etpu_start();&lt;/P&gt;&lt;P&gt;fs_etpu_pwmmac_enable_3ph(PWMMAC0_MASTER, FS_ETPU_PWMMAC_ACTIVE_HIGH, &lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_LOW);&lt;BR /&gt; fs_etpu_pwmmac_update_duty_cycles(PWMMAC0_MASTER, 0x7fffff, 0x7fffff,&lt;BR /&gt; 0x7fffff);&lt;/P&gt;&lt;P&gt;fs_etpu_pwmmac_enable_1ph( PWMMAC1_MASTER,&lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_HIGH,&lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_LOW);&lt;BR /&gt; fs_etpu_pwmmac_update_duty_cycles(PWMMAC1_MASTER, 0x7fffff, 0, 0);&lt;/P&gt;&lt;P&gt;xcptn_xmpl(); /* Configure and Enable Interrupts */&lt;/P&gt;&lt;P&gt;/* Loop forever */&lt;BR /&gt; for (;;) {&lt;BR /&gt; counter++;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Baiming&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2017 15:39:34 GMT</pubDate>
    <dc:creator>baimingshao</dc:creator>
    <dc:date>2017-08-29T15:39:34Z</dc:date>
    <item>
      <title>MPC5777C etpu phase error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708576#M9159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding the MPC5777C etpu. What I did is following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded the eTPU pwmmac function from&amp;nbsp;&lt;A class="link-titled" href="http://www.nxp.com/webapp/etpu/" title="http://www.nxp.com/webapp/etpu/"&gt;eTPU Function Selector&lt;/A&gt;, config it with graphical configuration tool. I use TCR1 as the clock of engine A, set channel 0 as a master of a 1-phase output, channel 1 as the output PWM signals. Besides that, I also add another 1-phase PWM output, using channel 2 as master, and channel 3 as PWM signals. Both of these two PWM functions are left edge aligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since channels are using the same clock, and are both in engine A, I would assume the output of channel 1 and channel 3 are always left edge aligned. However, at power up, there is always a phase error between these two. But if I reset the CPU using either the debugger, or the hardware pin, the phase error is gone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 13:04:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708576#M9159</guid>
      <dc:creator>baimingshao</dc:creator>
      <dc:date>2017-08-28T13:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C etpu phase error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708577#M9160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is the delay of fixed length? I suppose it is certain multiple TCR1 period, is it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 10:39:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708577#M9160</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2017-08-29T10:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C etpu phase error</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708578#M9161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. It is randomly every time I power up. I cannot tell if it is multiple of TCR1, since I am running at 100MHz, each period is very small.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a thought, could it because of the etpu code flash problem? To me, it looks like the etpu code started before everything is copied to etpu code ram. But if I do the reset, since all the code is still in the ram which is copied from last power up, it works? But I am using the library, and there is no change on this part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my code, all these etpu related functions are from the library without any change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void) {&lt;BR /&gt; int counter = 0;&lt;/P&gt;&lt;P&gt;//setup clock&lt;BR /&gt; Sysclk_Setup(SELECT_SYSCLK_PLL0, 1, 2, 2, 2, SELECT_PLL0_SOURCE_XOSC, 5);&lt;/P&gt;&lt;P&gt;//eTPU&lt;BR /&gt; GPIO_Init(115, PRIMARY_FUN, 0, 1); //etupa 1 ~ 7&lt;BR /&gt; GPIO_Init(116, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(117, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(118, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(119, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(120, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(121, PRIMARY_FUN, 0, 1);&lt;BR /&gt; GPIO_Init(122, PRIMARY_FUN, 0, 1); //etupa 8,9&lt;BR /&gt; GPIO_Init(123, PRIMARY_FUN, 0, 1);&lt;/P&gt;&lt;P&gt;GPIO_Init(142, PRIMARY_FUN, 0, 1); //etpua 31, 28&lt;BR /&gt; GPIO_Init(145, PRIMARY_FUN, 0, 1);&lt;/P&gt;&lt;P&gt;my_system_etpu_init();&lt;/P&gt;&lt;P&gt;my_system_etpu_start();&lt;/P&gt;&lt;P&gt;fs_etpu_pwmmac_enable_3ph(PWMMAC0_MASTER, FS_ETPU_PWMMAC_ACTIVE_HIGH, &lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_LOW);&lt;BR /&gt; fs_etpu_pwmmac_update_duty_cycles(PWMMAC0_MASTER, 0x7fffff, 0x7fffff,&lt;BR /&gt; 0x7fffff);&lt;/P&gt;&lt;P&gt;fs_etpu_pwmmac_enable_1ph( PWMMAC1_MASTER,&lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_HIGH,&lt;BR /&gt; FS_ETPU_PWMMAC_ACTIVE_LOW);&lt;BR /&gt; fs_etpu_pwmmac_update_duty_cycles(PWMMAC1_MASTER, 0x7fffff, 0, 0);&lt;/P&gt;&lt;P&gt;xcptn_xmpl(); /* Configure and Enable Interrupts */&lt;/P&gt;&lt;P&gt;/* Loop forever */&lt;BR /&gt; for (;;) {&lt;BR /&gt; counter++;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Baiming&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 15:39:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-etpu-phase-error/m-p/708578#M9161</guid>
      <dc:creator>baimingshao</dc:creator>
      <dc:date>2017-08-29T15:39:34Z</dc:date>
    </item>
  </channel>
</rss>

