<?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のトピックMC 9S12C128  PWM TESTING problems</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184002#M6870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style=": ; font-size: 2;"&gt;I recently purchased a NANOCORE12MAX128 which has a MC9S12C128 microcontroller form freescale on board. This is what is advertised and i can actually read this off top of the chip&lt;BR /&gt;&lt;BR /&gt;mc9s12&lt;BR /&gt;c128cfae&lt;BR /&gt;&lt;BR /&gt;When I load up codwewarrior and attempt to run the True-Time Simulator and Real Time Debugger, it says&lt;BR /&gt;Set derivative&lt;BR /&gt;The MCUID of this derivative is 0x2CF&lt;BR /&gt;Part ID returned from the connected derivative matches with multiple derivatives&lt;BR /&gt;&lt;BR /&gt;and the only options it has are for MC9S12Q 64, 96, and 128. This is important as the Q variant only has 4 PWM channels unlike the C model which has 6. So I think that I have a C model, but the software / serial monitor is misidentifying the target. At first I just selected the Q128, and that worked well for a while, but when I tried to run this code to&amp;nbsp;see if my pwm works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;#include &amp;lt;hidef.h&amp;gt; /* common defines and macros */&lt;BR /&gt;#include &amp;lt;mc9s12c128.h&amp;gt; /* derivative information */&lt;BR /&gt;&lt;BR /&gt;#pragma LINK_INFO DERIVATIVE "mc9s12c128"&lt;BR /&gt;#pragma CODE_SEG DEFAULT&lt;BR /&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;//Enabling portT for PWM0&lt;BR /&gt;MODRR =0x05;&lt;BR /&gt;/*&lt;BR /&gt;The line MODRR=0x01 IS (IN MY ONE)&lt;BR /&gt;necessary if your PWM&lt;BR /&gt;in not multiplexed with the Timer module.&lt;BR /&gt;Check the block diagram of your circuit.&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;PWMCLK=0x05;&lt;BR /&gt;PWMSCLA=0xFA; //HEX 250 C8&lt;BR /&gt;PWMPRCLK=0x07;&lt;BR /&gt;&lt;BR /&gt;PWMPER0=0xFA; //HEX 250&lt;BR /&gt;PWMDTY0=0x7D; //HEX 125&lt;BR /&gt;&lt;BR /&gt;PWMPER2=0xFA; //HEX 250&lt;BR /&gt;PWMDTY2=0x7D;&lt;BR /&gt;&lt;BR /&gt;PWME=0x05;&lt;BR /&gt;&lt;BR /&gt;while(1){&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;//f=4MHz/250/128 (prescale A)/250 (scale a) = 0.5 Hz&lt;BR /&gt;&lt;BR /&gt;running this code causes the PWM channel 0 to beat at 0.5 Hz, (first led on school board) with a 50% duty cycle. But PWM channel 2 beats way faster, as if it is not being scaled down (a red led with 340 ohm resistance in series). What is causing this problem!!@@?? I have been able to vary the duty cycle on both the correctly 0.5Hz pins and the ones that flash tooo fast.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style=": ; font-size: 2;"&gt;I have tested the first 5 channels of the PWM on port T using bit masks on the MODRR PWMCLK and PWME registers. and 0 and 1 work, 2 and 3 have the higher frequency malfunction and 4 works at 0.5 Hz.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Sep 2008 08:23:16 GMT</pubDate>
    <dc:creator>Raptor</dc:creator>
    <dc:date>2008-09-06T08:23:16Z</dc:date>
    <item>
      <title>MC 9S12C128  PWM TESTING problems</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184002#M6870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style=": ; font-size: 2;"&gt;I recently purchased a NANOCORE12MAX128 which has a MC9S12C128 microcontroller form freescale on board. This is what is advertised and i can actually read this off top of the chip&lt;BR /&gt;&lt;BR /&gt;mc9s12&lt;BR /&gt;c128cfae&lt;BR /&gt;&lt;BR /&gt;When I load up codwewarrior and attempt to run the True-Time Simulator and Real Time Debugger, it says&lt;BR /&gt;Set derivative&lt;BR /&gt;The MCUID of this derivative is 0x2CF&lt;BR /&gt;Part ID returned from the connected derivative matches with multiple derivatives&lt;BR /&gt;&lt;BR /&gt;and the only options it has are for MC9S12Q 64, 96, and 128. This is important as the Q variant only has 4 PWM channels unlike the C model which has 6. So I think that I have a C model, but the software / serial monitor is misidentifying the target. At first I just selected the Q128, and that worked well for a while, but when I tried to run this code to&amp;nbsp;see if my pwm works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;#include &amp;lt;hidef.h&amp;gt; /* common defines and macros */&lt;BR /&gt;#include &amp;lt;mc9s12c128.h&amp;gt; /* derivative information */&lt;BR /&gt;&lt;BR /&gt;#pragma LINK_INFO DERIVATIVE "mc9s12c128"&lt;BR /&gt;#pragma CODE_SEG DEFAULT&lt;BR /&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;//Enabling portT for PWM0&lt;BR /&gt;MODRR =0x05;&lt;BR /&gt;/*&lt;BR /&gt;The line MODRR=0x01 IS (IN MY ONE)&lt;BR /&gt;necessary if your PWM&lt;BR /&gt;in not multiplexed with the Timer module.&lt;BR /&gt;Check the block diagram of your circuit.&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;PWMCLK=0x05;&lt;BR /&gt;PWMSCLA=0xFA; //HEX 250 C8&lt;BR /&gt;PWMPRCLK=0x07;&lt;BR /&gt;&lt;BR /&gt;PWMPER0=0xFA; //HEX 250&lt;BR /&gt;PWMDTY0=0x7D; //HEX 125&lt;BR /&gt;&lt;BR /&gt;PWMPER2=0xFA; //HEX 250&lt;BR /&gt;PWMDTY2=0x7D;&lt;BR /&gt;&lt;BR /&gt;PWME=0x05;&lt;BR /&gt;&lt;BR /&gt;while(1){&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;//f=4MHz/250/128 (prescale A)/250 (scale a) = 0.5 Hz&lt;BR /&gt;&lt;BR /&gt;running this code causes the PWM channel 0 to beat at 0.5 Hz, (first led on school board) with a 50% duty cycle. But PWM channel 2 beats way faster, as if it is not being scaled down (a red led with 340 ohm resistance in series). What is causing this problem!!@@?? I have been able to vary the duty cycle on both the correctly 0.5Hz pins and the ones that flash tooo fast.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style=": ; font-size: 2;"&gt;I have tested the first 5 channels of the PWM on port T using bit masks on the MODRR PWMCLK and PWME registers. and 0 and 1 work, 2 and 3 have the higher frequency malfunction and 4 works at 0.5 Hz.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2008 08:23:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184002#M6870</guid>
      <dc:creator>Raptor</dc:creator>
      <dc:date>2008-09-06T08:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: MC 9S12C128  PWM TESTING problems</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184003#M6871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I believe you should write 0x1F to MODRR in order to get all PWM pins mapped to port T.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 14:02:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184003#M6871</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2008-09-08T14:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: MC 9S12C128  PWM TESTING problems</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184004#M6872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I did as you said. It did not change the behaviour. I think the serial monitor might be responsible for this mess, because it is unlikely the PWM channel would work at all if it was a hardware failure right?.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 19:55:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184004#M6872</guid>
      <dc:creator>Raptor</dc:creator>
      <dc:date>2008-09-08T19:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: MC 9S12C128  PWM TESTING problems</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184005#M6873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Raptor,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;PWM2 and PWM0 use different clocks, clock A&amp;nbsp;and clock B. &lt;FONT size="2"&gt;You set both PWM clocks for &amp;nbsp;for scaled&amp;nbsp;B (SB) for PWM2 and scaled A (SA) for PWM0. But you&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;set&amp;nbsp;PWMSCLA only for clock SA, but not for SB.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 16:09:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184005#M6873</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-09-09T16:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: MC 9S12C128  PWM TESTING problems</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184006#M6874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks Kef I read the manual and I programmed it properly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PWMSCLB=0xFA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //HEX 250 C8&lt;BR /&gt;PWMPRCLK=0x07|(0x07&amp;lt;&amp;lt;4);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2008 17:17:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC-9S12C128-PWM-TESTING-problems/m-p/184006#M6874</guid>
      <dc:creator>Raptor</dc:creator>
      <dc:date>2008-09-12T17:17:17Z</dc:date>
    </item>
  </channel>
</rss>

