<?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中的主题 Are there any more examples of PWM on the TWR-KV58F?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Are-there-any-more-examples-of-PWM-on-the-TWR-KV58F/m-p/914988#M53559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using Mcuxpresso and have downloaded the corresponding SDK for this board,&lt;/P&gt;&lt;P&gt;when loading the PWM driver example all I get is three pwm outputs with 25 50 and 75 duty cycle all in phase, which is curious since the example says 3ph PWM.&lt;/P&gt;&lt;P&gt;I understand that I have to modify the VALx registers, but in the example no matter what you do all of these registers&amp;nbsp;are always set to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the only page in the reference manual about phase shifted PWMs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please point me to a good reference on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&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/86116iA8CFF811506EA786/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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Jul 2019 08:56:20 GMT</pubDate>
    <dc:creator>edgardnetz</dc:creator>
    <dc:date>2019-07-28T08:56:20Z</dc:date>
    <item>
      <title>Are there any more examples of PWM on the TWR-KV58F?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Are-there-any-more-examples-of-PWM-on-the-TWR-KV58F/m-p/914988#M53559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using Mcuxpresso and have downloaded the corresponding SDK for this board,&lt;/P&gt;&lt;P&gt;when loading the PWM driver example all I get is three pwm outputs with 25 50 and 75 duty cycle all in phase, which is curious since the example says 3ph PWM.&lt;/P&gt;&lt;P&gt;I understand that I have to modify the VALx registers, but in the example no matter what you do all of these registers&amp;nbsp;are always set to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the only page in the reference manual about phase shifted PWMs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please point me to a good reference on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&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/86116iA8CFF811506EA786/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jul 2019 08:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Are-there-any-more-examples-of-PWM-on-the-TWR-KV58F/m-p/914988#M53559</guid>
      <dc:creator>edgardnetz</dc:creator>
      <dc:date>2019-07-28T08:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any more examples of PWM on the TWR-KV58F?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Are-there-any-more-examples-of-PWM-on-the-TWR-KV58F/m-p/914989#M53560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Unfortunately, I have not the phase-shift code for eFlexPWM module based on KV58, but i have the code for DSC, I think you can refer to it.&lt;/P&gt;&lt;P&gt;But you have to modify the code. Before you write any eFlexPWM registers, you have to enable the gated clock of eFlexPWM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //enable PWM0 clock&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SIM_SCGC4|=0xF000000;&lt;/P&gt;&lt;P&gt;write the pin assignment&lt;/P&gt;&lt;P&gt;void pinsAssignment(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD14:PWM0_A0&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD15:PWM0_B0&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD12:PWM0_A1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD13:PWM0_B1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD10:PWM0_A2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//PTD11:PWM2_B2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//enable PORTD gated clock&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SIM_SCGC5|=0x1000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//set PTE MUX&amp;nbsp; ALT5&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR14&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR14|=(ALT6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR15&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR15|=(ALT6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR12&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR12|=(ALT6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR13&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR13|=(ALT6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR10&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR10|=(ALT6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR11&amp;amp;=~(0xF00);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PORTD_PCR11|=(ALT6);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;For the PWM initialization, I attach the main.c which is based on the DSC, but the registers are the same.&lt;/P&gt;&lt;P&gt;Maybe the register definition is different.&lt;/P&gt;&lt;P&gt;I suppose that you can use like this:&lt;/P&gt;&lt;P&gt;PWM0_SM0INIT=0xxxxxx; for KV58&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 06:09:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Are-there-any-more-examples-of-PWM-on-the-TWR-KV58F/m-p/914989#M53560</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-07-29T06:09:51Z</dc:date>
    </item>
  </channel>
</rss>

