<?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>Processor Expert SoftwareのトピックRe: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192036#M646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This fix is a good attempt at the right approach, but it still has one major flaw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon enabeling the event (which now re-enables the interrupt), you can get an immediate interrupt if a compare occured while the interrupt was disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Enable function needs to also clear the interrupt flag before enabeling the interrupts.&amp;nbsp; There is no other method available to do this, other than GetStaus(), which of course is disabled when using interrupts, so it must come from the driver code itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2012 06:31:00 GMT</pubDate>
    <dc:creator>jgirard1</dc:creator>
    <dc:date>2012-02-10T06:31:00Z</dc:date>
    <item>
      <title>TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192030#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For HCS08...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why do TimerInt, FreeCnt, etc.&amp;nbsp;components disable the entire TPM counter module when calling the Disable() method?&amp;nbsp; This prevents other shared components on other channels&amp;nbsp;from functioning correctly because the shared timer is stopped from clocking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;static void HWEnDi(void)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; if (EnUser) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2SC |= 0x10;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Run counter (set CLKSB:CLKSA) */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; } else {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* TPM2SC: CLKSB=0,CLKSA=0 */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrReg8Bits(TPM2SC, 0x18);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Stop counter (CLKSB:CLKSA = 00) */&amp;nbsp; &lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;lt;--This disables the&amp;nbsp;clocking&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* TPM2CNTH: BIT15=0,BIT14=0,BIT13=0,BIT12=0,BIT11=0,BIT10=0,BIT9=0,BIT8=0 */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; setReg8(TPM2CNTH, 0x00);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Clear counter register - any write clears complete counter */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since these components use the Output Compare to generate their interrupts, why not just disable the compare operation using ELSnB:ELSnA bits and keep the timer running for other shared components?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried changing the property: [Component uses entire timer = No]&amp;nbsp;...and this doesn't help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;also tried always keeping the component enabled and then using the EnableEvent() method to control the action.&amp;nbsp; The problem with this is it still keeps the output compare interrupts running when the event is disabled.&amp;nbsp; The event call is just blocked when disabled.&amp;nbsp; This is very inefficient.&amp;nbsp; If the envent is disabled, then why not disable&amp;nbsp;the output compare altogether if it is not required?&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>Mon, 19 Dec 2011 05:47:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192030#M640</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2011-12-19T05:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192031#M641</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;I am sorry, I have not reproduced such behaviour. I have tried to use two TimerInt components in shared mode on the TPM2 (DZ128) and I have got this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static void HWEnDi(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; word TmpCmpVal;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Temporary variable for compare value */&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (EnUser) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TmpCmpVal = (word)(TPM2CNT + CmpVal); /* Count current value for the compare register */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2C1V = TmpCmpVal;&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; /* Set compare register */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (TPM2C1V != TmpCmpVal) {}&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait for register update (because of Latching mechanism) */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* TPM2C1SC: CH1F=0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrReg8Bits(TPM2C1SC, 0x80U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Reset request flag */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* TPM2C1SC: CH1IE=1 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; setReg8Bits(TPM2C1SC, 0x40U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable compare interrupt */&lt;BR /&gt;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* TPM2C1SC: CH1IE=0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrReg8Bits(TPM2C1SC, 0x40U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Disable Compare interrupt */&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please be more specific? What particular settings, compoennt leads you to your issue? What verison of PE are you using? Publishing a demonstration project would be the best.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, I agree with your last paragraph. I will pass this to developers to consider improving generated code in some next release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 23:56:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192031#M641</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2011-12-21T23:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Timeline, Ferment, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192032#M642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have duplicated the issue again.&amp;nbsp; You need to use FreeCntr.&amp;nbsp; If you use FreeCntr and source it to a TPM device that also has other counters sourced (TimerInt, etc.) on the other TPM devices,&amp;nbsp;FreeCntr will no longer allow you to disable the component.&amp;nbsp; It says that the component cannot be disabled because it is sourced from a shared timer.&amp;nbsp; The only thing you can do with FreeCntr is to disable the event.&amp;nbsp; The Output Compare interrupt will still occur in the background.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TPM10 - TimerIntt&lt;/P&gt;&lt;P&gt;TPM11 - Timeline&lt;/P&gt;&lt;P&gt;TPM12 - FreeCntr &amp;lt;-- (Cannot be disabled)&lt;/P&gt;&lt;P&gt;TPM13 - Unused&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since all these counters are based on the individual Output Compares of the TPM unit, they can easily be disabled by turning off the Output Compare interrupt.&amp;nbsp; There is no issue doing this when you are only using all TimerInt components.&amp;nbsp; As a matter of fact, you can disable the TimerInt's on the same TPM unit as the FreeCntr, but yet FreeCntr cannot be disabled?&amp;nbsp; Why not?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe there is a design problem with the FreeCntr components.&amp;nbsp; There is some major oversight here.&amp;nbsp; Is there a good reason why these FreeCntr components act this way?&amp;nbsp; Is there an easy way to get it fixed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem could easily be resolved by creating my own FreeCntr componet that works, but the major issue here is there is no way to get access to the Processor Expert timer database for error checking, configuring etc.&amp;nbsp; The only way to do that it is use inheritance and that has its own set of drawbacks.&amp;nbsp; Primarily, you will usually need to&amp;nbsp;inherit from a timer component or some other&amp;nbsp;thing that is buggy,&amp;nbsp;has limitations or some other stupid set of issues that ultimately make it impossible to acheive your goal.&amp;nbsp; So either way, I lose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 02:08:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192032#M642</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2012-01-06T02:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timeline, Ferment, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192033#M643</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;we are working on improve&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;nt of the behavior of Enable/DisableEvents in TimerInt, FreeCntr, TimerOut components &lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;for HCS08/CFV1 families. For now as &lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;a possible workaround you can disable code generation of selected component and change the code manually, see below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/header/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define TI1_EnableEvent() (TI1_EnEvent = TRUE, FTMxCxSC_CHxIE = 0x01, (byte)ERR_OK) /* Enable interrupt, set the flag "events enabled" */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it will not work for you, &lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;we can provide hot-fix for CW V10.2 (PE V5.3) that will contain&amp;nbsp; the fix of Enable/DisableEvents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;Regarding disabling of the FreeCntr, the problem is that if the timer is shared, the counter cannot be stopped, which would be what ‘disable‘ method would need to do. So it’s not available in shared mode. It’s described in the hint &amp;nbsp;of the method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;„Disable&lt;/EM&gt;&lt;/STRONG&gt; &lt;EM&gt;- This method disables the component, i.e. timer is disabled and the internal clocks are stopped. Last counter value is usually preserved in the counter (if it is supported by HW).&lt;BR /&gt; The method is not available if the counter is shared.“&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 17:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192033#M643</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-01-06T17:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192034#M644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I am using CodeWarrior V6.3 PE&amp;nbsp;with V3.09 Service Pack.&amp;nbsp; Is there a HotFix for this version?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that the Disable method stops the counter.&amp;nbsp; My complaint is that it is wrong to do so.&amp;nbsp; I believe there is no reason to stop the counter.&amp;nbsp; Just stop the interrupts from occurring if it is an Output Compare.&amp;nbsp; The TimerInt works this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just had the issue again.&amp;nbsp; I am using two FreeCntr components shared within the same TPM module and there are conflicts that prevent me from using the components the way I want to.&amp;nbsp; So&amp;nbsp;I try to use TimerInt instead for compatible functionality, but that doesn't work either because TimerInt does not give you direct access to setting the period based on raw timer ticks&amp;nbsp;via&amp;nbsp;a SetCompare().&amp;nbsp; All you get are these high-level math intensive calculating methods that are just not applicable and are inefficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing FreeCntr is missing is a method to get the compare value GetCompare().&amp;nbsp; If you have this method, you can read the last interrupt time add an offset then use SetCompare() to set a new periodic interval.&amp;nbsp; As it stands now, the periodic interval is static and&amp;nbsp;can only be established once from the component properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FreeCntr is pretty low-level to allow you to do many things at will, but it is lacking a couple of things to make it completely versatile at controlling a periodic interrupt simply and easily for anyone and any application.&amp;nbsp; Perhaps this is not the purpose of FreeCntr, which I can accept, but please tell me of another component that is closer that allows me to freely set a variable periodic interrupt or create a simple variable timeout with optional interrupts that I can enable and disable.&amp;nbsp; There is nothing.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 02:24:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192034#M644</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2012-01-17T02:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192035#M645</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;please find the attached archive that contains the improved code of Enable/DisableEvent methods for FreeCntr, TimerInt, TimerOut components. These methods are influencing the interrupt directly now. I think that it should solve most of your problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The instruction how to apply the hot-fix are described in the readme.txt in the archive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&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>Thu, 19 Jan 2012 23:15:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192035#M645</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-01-19T23:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192036#M646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This fix is a good attempt at the right approach, but it still has one major flaw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon enabeling the event (which now re-enables the interrupt), you can get an immediate interrupt if a compare occured while the interrupt was disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Enable function needs to also clear the interrupt flag before enabeling the interrupts.&amp;nbsp; There is no other method available to do this, other than GetStaus(), which of course is disabled when using interrupts, so it must come from the driver code itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 06:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192036#M646</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2012-02-10T06:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192037#M647</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;yes, you are correct. I will prepare the update as soon as possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 23:15:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192037#M647</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-02-10T23:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192038#M648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The other thing you also need to add to the logic is an interlock to check if the event is already enabled.&amp;nbsp; You can simply test the CHxIE bit.&amp;nbsp; If the CHxIE bit is set, then do not clear the interrupt status flag.&amp;nbsp; This is because the user code may always call the&amp;nbsp;EnableEvent() method.&amp;nbsp; There should be no side effects from calling the EnableEvent() method more than twice in a row if it is already enabled.&amp;nbsp; You do not want to inadvertently clear the interrupt status flag before it can be serviced, especially when interrupts are disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how I can join the development team.&amp;nbsp; I have&amp;nbsp;many more ideas and I know how to develop&amp;nbsp;new&amp;nbsp;components using Component Wizard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2012 01:18:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192038#M648</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2012-02-11T01:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCntr, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192039#M649</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;please find the attached updated hot-fix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding: "Please let me know how I can join the development team.&amp;nbsp; I have&amp;nbsp;many more ideas and I know how to develop&amp;nbsp;new&amp;nbsp;components using Component Wizard."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We appreciate your offer for cooperation, I have passed that to my manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 21:22:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192039#M649</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-02-14T21:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192040#M650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; I appreciated this hot fix that you made for the HS(C)08 series.&amp;nbsp; It worked well for me.&amp;nbsp; My question is, can this same hot fix be applied to the S12(X) series processors?&amp;nbsp; I have to port some of the same S08(C) code over to the the S12(X) and I am afraid that I will have the same issues as I had before with the timers sharing one single counter.&amp;nbsp; If one shared timer component was disabled, then the whole timer counter register was disabled and it would no longer work for the other enabled shared timer components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what you gave me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CodeWarrior for Microcontrollers V6.3 Processor Expert V3.09 hotfix for issue IM8614&lt;BR /&gt;====================================================================================&lt;/P&gt;&lt;P&gt;Description&lt;BR /&gt;-----------&lt;/P&gt;&lt;P&gt;- Enable/DisableEvent methods were optimized. These methods toggle the interrupt directly now. (#8702)&lt;/P&gt;&lt;P&gt;Installation&lt;BR /&gt;------------&lt;/P&gt;&lt;P&gt;1. Ensure you have an aministrator rights and the CodeWarrior is not running. &lt;BR /&gt;2. Copy the content of this archive (without readme.txt file) into the CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for MCUs V6.3 installation layout.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;SPAN class="mce_paste_marker"&gt;Do you know if I will run into the same problems using shared timers on the S12(X)?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 16:22:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192040#M650</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2012-11-08T16:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192041#M651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from the code observation seems that in case you select ECT, TIM devices in TimerInt component you should be able use the component without any limitation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I have overlooked something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 08:07:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192041#M651</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2012-11-09T08:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192042#M652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; I have begun to use the HCS12(X) for a program and I am now having the exact same issue for the FreeCnt as mentioned in this thread.&amp;nbsp; I tried to use the hotfix for HC(S)08 that gave, but the package is not compatible with CodeWarrior 5.1 for S12(X). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a possibility that you can do this same hotfix for me that I can integrate into CW5.1 for HC12?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 04:39:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192042#M652</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2013-01-22T04:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192043#M653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok. Could you please just post here a demonstration project of the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 07:20:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192043#M653</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2013-01-22T07:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192044#M654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is for HC(S)08.&amp;nbsp; This is a sample of the code before your hotfix.&amp;nbsp; This FreeCnt bean is connected to a TPM in output compare mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the methods that enable/disable the event using a &lt;SPAN style="text-decoration: underline;"&gt;local variable&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define DTE_Timeout_EnableEvent() (DTE_Timeout_EnEvent = TRUE, (byte)ERR_OK) /* Set the flag "events enabled" */&lt;/P&gt;&lt;P&gt;#define DTE_Timeout_DisableEvent() (DTE_Timeout_EnEvent = FALSE, (byte)ERR_OK) /* Set the flag "events disabled" */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the interrupt function that tests the &lt;SPAN style="text-decoration: underline;"&gt;local variable&lt;/SPAN&gt; to see if the event is enabled or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISR(DTE_Timeout_Interrupt)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* TPM1C3SC: CH3F=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; clrReg8Bits(TPM1C3SC, 0x80);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Reset compare interrupt request flag */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; if (DTE_Timeout_EnEvent) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Is a event allowed? */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DTE_Timeout_OnInterrupt();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Invoke user event */&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is inefficient coding as the output compare is still interrupting all the time, even when the event is disabled.&amp;nbsp; My original proposal to disable the event was to clear the timer interrupt enable bit which also stops the output compare from interrupting.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mcepastemarker"&gt;So now here is the HC(S)08 code after using your "hot_fix_8702_CW_6_3_PE_3_09_CLASSIC.zip".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These new methods enable/disable the event by using the &lt;SPAN style="text-decoration: underline;"&gt;interrupt enable bit&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define DTE3_Timeout_EnableEvent() (TPM1C3SC_CH3IE = 0x01, (byte)ERR_OK) /* Enable interrupt */&lt;BR /&gt;#define DTE3_Timeout_DisableEvent() (TPM1C3SC_CH3IE = 0x00, (byte)ERR_OK) /* Disable interrupt */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ISR is different and does not have to test any local variable if the event is disabled or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISR(DTE_Timeout_Interrupt)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* TPM1C3SC: CH3F=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; clrReg8Bits(TPM1C3SC, 0x80);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Reset compare interrupt request flag */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; DTE_Timeout_OnInterrupt();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Invoke user event */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only issue with this approach is that you need to clear the output compare interrupt flag before re-enabling the interrupt enable bit when re-enabling the event.&amp;nbsp; This I mentioned in my previous post in this thread:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The other thing you also need to add to the logic is an interlock to check if the event is already enabled.&amp;nbsp; You can simply test the CHxIE bit.&amp;nbsp; If the CHxIE bit is set, then do not clear the interrupt status flag.&amp;nbsp; This is because the user code may always call the EnableEvent() method.&amp;nbsp; There should be no side effects from calling the EnableEvent() method more than twice in a row if it is already enabled.&amp;nbsp; You do not want to inadvertently clear the interrupt status flag before it can be serviced, especially when interrupts are disabled."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know you made this improvement for me in another hot fix release, but I cannot find that version and I cannot seem to download it from this thread anymore.&amp;nbsp; You gave me two hot fixes, I believe.&amp;nbsp; I seemed to have lost the final version of this fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, my original question was can you do the same updates, but do it for the HCS12(X) for CW5.1 Classic?&amp;nbsp; If you have the original final version of this hot fix for HC(S)08, I could use that as well.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 02:08:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192044#M654</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2013-01-23T02:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192045#M655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;generally you cannot apply the original hot-fix for hcs08 to another family (and product). I would recommend to use the CW V10.3 instead of using classic CW with hot-fix. Anyway I have attached it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding hot-fix for hcs12(x) - I would just need some demonstration project in order to reproduce the issue on HCS12(X) or at least details on timer device and MCU you use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 07:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192045#M655</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2013-01-23T07:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192046#M656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; Thank you again for all your efforts.&amp;nbsp; I know this may seem like a pain to deal with and I'm sorry if it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now working with a MC9S12XA256 application using Processor Expert with classic interface.&amp;nbsp; This is all I have the license for and cannot use the new Ecplise interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that is generated for my FreeCntr bean:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volatile bool FSK_Out_IRQ_EnEvent;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Used for Enable/Disable events */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FSK_Out_IRQ_EnableEvent() ( FSK_Out_IRQ_EnEvent = TRUE,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the flag "events enabled" */ \&lt;BR /&gt;&amp;nbsp; ERR_OK&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;&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;&amp;nbsp;&amp;nbsp; /* Return result */ )&lt;BR /&gt;#define FSK_Out_IRQ_DisableEvent() ( FSK_Out_IRQ_EnEvent = FALSE,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the flag "events disabled" */ \&lt;BR /&gt;&amp;nbsp; ERR_OK&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;&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;&amp;nbsp;&amp;nbsp; /* Return result */ )&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISR(FSK_Out_IRQ_Interrupt)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; TFLG1 = 0x04U;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Reset interrupt request flag */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (FSK_Out_IRQ_EnEvent) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Are the events enabled? */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSK_Out_IRQ_OnInterrupt();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Invoke user event */&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the same code as HC(S)08 &lt;SPAN style="text-decoration: underline;"&gt;before&lt;/SPAN&gt; applying your 8702 hot fix.&amp;nbsp; It is the same inefficient code that keeps the timer output compare interrupting unneccesarily.&amp;nbsp; It would be more efficient to just disable the timer interrupt as your hot fix does.&amp;nbsp; However, the hot fix you provided is incomplete as I've already mentioned in the previous posts with respect to re-enabling the event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The other thing you also need to add to the logic is an interlock to check if the event is already enabled.&amp;nbsp; You can simply test the CHxIE bit.&amp;nbsp; If the CHxIE bit is set, then do not clear the interrupt status flag.&amp;nbsp; This is because the user code may always call the EnableEvent() method.&amp;nbsp; There should be no side effects from calling the EnableEvent() method more than twice in a row if it is already enabled.&amp;nbsp; You do not want to inadvertently clear the interrupt status flag before it can be serviced, especially when CPU interrupts are temporarily disabled using SEI instruction."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how your hot fix re-enables the event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;#define DTE3_Timeout_EnableEvent() (TPM1C3SC_CH3IE = 0x01, (byte)ERR_OK) /* Enable interrupt */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;The enable event should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;if (TPM1C3SC_CH3IE != 0x01)&amp;nbsp; /* Test if event is already enabled */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&amp;nbsp; clrReg8Bits(TPM1C3SC, 0x80);&amp;nbsp; /* Clear any previous compare interrupt request flag */ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&amp;nbsp; TPM1C3SC_CH3IE = 0x01;&amp;nbsp; /* Now enable the event */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;I would like to have this functionality as a hot fix in both the HC(S)08 and the S12(X) for my applications.&amp;nbsp; I thought for sure you added this additional 'enable event' functionality for me in a update to your original 8702 hot fix, but I cannot find it in my files.&amp;nbsp; Maybe you can go back and look for a secondary update after Jan 19, 2012?&amp;nbsp; The additional update, after we discussed it, and according to this thread, should be Feb 14, 2012.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Please let me know if you can do this for me and I would really appreciate it.&amp;nbsp; I am sorry if this is a pain for you.&amp;nbsp; If you do not understand the history, you can take time to re-read this entire thread as it has become pretty evolved.&amp;nbsp; Everything you need to know is in this thread as you already addressed this issue once for me for the HC(S)08 application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 02:08:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192046#M656</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2013-01-24T02:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192047#M657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please find the attached patch from &lt;SPAN class="mce_paste_marker"&gt;Feb 14, 2012. Regarding HCS12(X,Z): I have passed your requested to developers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Could you please also specify which version of CW for HCS12 do you use?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Vojtech Filip&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 11:04:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192047#M657</guid>
      <dc:creator>vfilip</dc:creator>
      <dc:date>2013-01-28T11:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192048#M658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using CodeWarrior Development Studio S12(X) Version 5.1, Build 10221 (Professional).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I can have this same fix for S12(X), that would perfect.&amp;nbsp; Thank you for all your great help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 05:23:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192048#M658</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2013-01-29T05:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: TimerInt, FreeCnt, etc. calling Disable() method disables entire TPM module.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192049#M659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; Do you think you can have the same fix for S12(X) anytime soon?&amp;nbsp; My project is sort of waiting on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also having more limitations with other PE components as I have posted in Embedded Components forum.&amp;nbsp; I wish it was easier to make your own components that has acess to the PE databases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 03:00:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/TimerInt-FreeCnt-etc-calling-Disable-method-disables-entire-TPM/m-p/192049#M659</guid>
      <dc:creator>jgirard1</dc:creator>
      <dc:date>2013-02-04T03:00:23Z</dc:date>
    </item>
  </channel>
</rss>

