<?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>8-bit MicrocontrollersのトピックRe: MC9S08EL32 TPM Interrupt</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182945#M13490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply bigmac. Actually one of the problem is my processor expert doesnt work. Iam trying to generate code from old version (3.2 i guess) with processor expert and copying files to new version but lots of error appearing. I have looked at videos and documents of freescale and see that in the processor expert menu there sould be "view" but i dont have any. Is my program limited version?. I put 2 pictures in order to see my processor exp menu and my codewarrior version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2012 17:59:48 GMT</pubDate>
    <dc:creator>e_ay</dc:creator>
    <dc:date>2012-07-25T17:59:48Z</dc:date>
    <item>
      <title>MC9S08EL32 TPM Interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182943#M13488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam using MC9S08EL32 MCU and trying a make blinking LED periodically. Iam not much familiar with this MCU and need to use it. Just 2 weeks past with this MCU. Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */&lt;BR /&gt;#include "derivative.h" /* include peripheral declarations */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;#include "utility.h"&lt;/DIV&gt;&lt;DIV&gt;#define LED PTBD_PTBD5&lt;/DIV&gt;&lt;DIV&gt;char button_counter;&lt;/DIV&gt;&lt;P&gt;void MCU_init(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LED=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;button_counter=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;TPM1SC = 0x00; /* Stop and reset counter */&lt;BR /&gt;TPM1MOD = 0x05DCU; /* Period value setting */&lt;BR /&gt;(void)(TPM1SC == 0); /* Overflow int. flag clearing (first part) */&lt;BR /&gt;/* TPM1SC: TOF=0,TOIE=1,CPWMS=0,CLKSB=0,CLKSA=1,PS2=1,PS1=1,PS0=0 */&lt;BR /&gt;TPM1SC = 0x4E; /* Int. flag clearing (2nd part) and timer control register setting */&lt;BR /&gt;/* ### Init_GPIO init code */&lt;BR /&gt;/* PTBPE: PTBPE5=0 */&lt;BR /&gt;PTBPE &amp;amp;= (unsigned char)~0x20;&lt;BR /&gt;/* PTBDD: PTBDD5=1 */&lt;BR /&gt;PTBDD |= (unsigned char)0x20;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__interrupt void isrVtpm1ovf(void)&lt;BR /&gt;{&lt;BR /&gt;button_counter++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main(void) {&lt;/P&gt;&lt;P&gt;if(button_counter&amp;gt;100) {&lt;BR /&gt;&lt;SPAN&gt;LED = ~LED;&lt;/SPAN&gt;&lt;BR /&gt;button_counter=0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong with this code? If is not what is suppose to be changed? Am I suppose to be used TPM overflow flag (TPMSC1_TOF) &amp;nbsp;or what? Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 04:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182943#M13488</guid>
      <dc:creator>e_ay</dc:creator>
      <dc:date>2012-07-25T04:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08EL32 TPM Interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182944#M13489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 1:&amp;nbsp; Your program structure is wrong - main() function should never exit.&amp;nbsp; I suggest that you create a new project using the wizard, that will provide a framework for the file main.c.&amp;nbsp; You can then "fill in the blanks" with your project code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 2: In the absence of an explicit vector table definition, your ISR definition needs to incorporate the required vector number so that the appropriate vector will be correctly programmed.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;__interrupt &amp;lt;vector_number&amp;gt; void ISR_name( void);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;However, if you have used Processesor Expert, a vector table may already exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem 3:&amp;nbsp; Your ISR code needs to clear the overflow interrupt flag for the TPM module, otherwise you will immediately re-enter the ISR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 16:53:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182944#M13489</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-25T16:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08EL32 TPM Interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182945#M13490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply bigmac. Actually one of the problem is my processor expert doesnt work. Iam trying to generate code from old version (3.2 i guess) with processor expert and copying files to new version but lots of error appearing. I have looked at videos and documents of freescale and see that in the processor expert menu there sould be "view" but i dont have any. Is my program limited version?. I put 2 pictures in order to see my processor exp menu and my codewarrior version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 17:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08EL32-TPM-Interrupt/m-p/182945#M13490</guid>
      <dc:creator>e_ay</dc:creator>
      <dc:date>2012-07-25T17:59:48Z</dc:date>
    </item>
  </channel>
</rss>

