<?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>S12 / MagniV Microcontrollers中的主题 Re: 9S12 Configuring PMF's and Port P inputs</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/155067#M4624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well....I've figured it out. the key: Don't use device initialization like I was. For some reason, device initialization was trying to set up all of the PMF modules when I only needed Module C (i.e. PMF 4 and 5).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to anyone who looked into this. If anyone is interested in the solution, just request it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 May 2012 10:18:21 GMT</pubDate>
    <dc:creator>JamesonB</dc:creator>
    <dc:date>2012-05-04T10:18:21Z</dc:date>
    <item>
      <title>9S12 Configuring PMF's and Port P inputs</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/155066#M4623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using an MC9S12E128 in which the PMF module is on the P port. I am trying to enable only PMF4 and 5 on Port P while using PP0-PP3 as inputs. I'm aware that a peripheral takes prescidence over its corresponding Port I/O statements, however there is a line in the datasheet that states:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The PMF function takes precedence over the general-purpose I/O function if the associated PWM channel&lt;/P&gt;&lt;P&gt;is enabled. The PWM channels 5-0 are outputs if the respective channels are enabled."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Datasheet seems a little foggy on how to disable PMF channels and use them as inputs. Here is a snippet of my initialization code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Init_PMF(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;PMFCFG0=0x5F; //Each pair of PMF's uses a different time base. A and B are edge aligned&lt;BR /&gt;// C is Center Aligned &amp;amp; are independent&lt;BR /&gt;PMFCFG1=0; //Positive polarity&lt;BR /&gt;PMFCFG2=0; //Unmasked&lt;BR /&gt;PMFCFG3=0; //PMF's run in 'Wait &amp;amp; Freeze' modes, No pair swapping&lt;BR /&gt;PMFOUTC=0x0F; //Enable software control of PWM pin&lt;BR /&gt;PMFOUTB=0x30; //disable PWM0-3&lt;/P&gt;&lt;P&gt;PMFENCC=0; //Verify that timer C for PMF4 &amp;amp; 5 is disabled&lt;BR /&gt;x=PMFENCC; //Read register prior to writing a 1 to the LDOKC bit&lt;BR /&gt;PMFENCC=2; //Write a 1 to the LDOKC bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DDRP=0x30; &amp;nbsp;//Enable PT0-3 as inputs, PT4 and 5 are PWM&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure there is are quite a few 9S12 Guru's out there who have encountered this before or have some words of wisdom. I prefer to use the configuration mentioned above due to an existing PCB layout. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the proper way to configure the PMF3 and PMF4 peripheral and PT0-3 as Input pins?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jameson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 21:57:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/155066#M4623</guid>
      <dc:creator>JamesonB</dc:creator>
      <dc:date>2012-04-17T21:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12 Configuring PMF's and Port P inputs</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/155067#M4624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well....I've figured it out. the key: Don't use device initialization like I was. For some reason, device initialization was trying to set up all of the PMF modules when I only needed Module C (i.e. PMF 4 and 5).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to anyone who looked into this. If anyone is interested in the solution, just request it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 10:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/155067#M4624</guid>
      <dc:creator>JamesonB</dc:creator>
      <dc:date>2012-05-04T10:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12 Configuring PMF's and Port P inputs</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/1644412#M19174</link>
      <description>&lt;P&gt;I am trying to get all 6 PWM to work independently&amp;nbsp; on a s12e on the PMF port P. Whithout any PMF-functionality activated. The PMF-init example I found didn't seem to work so any source-code example that you have about this PMF-module would be a help.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 07:55:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/9S12-Configuring-PMF-s-and-Port-P-inputs/m-p/1644412#M19174</guid>
      <dc:creator>ovek</dc:creator>
      <dc:date>2023-05-04T07:55:18Z</dc:date>
    </item>
  </channel>
</rss>

