AnsweredAssumed Answered

Periodic Interrupt Timer - want to Stop in reeze Mode

Question asked by STEVE LEWIS on May 28, 2014
Latest reply on Jun 5, 2014 by STEVE LEWIS

I am using Processor Expert in Code Warrior Classic version 5.1 with a MC9S12XS256 processor. Processor Expert is version 3.02

I have used Processor Expert to create a 1ms timer, using the Periodic Interrupt Time 0. (These are modulus down counters, as described in chapter 12 of the Freescale manual for the device).

I want to freeze this timer when I reach a break point during debugging.

According to the manual, there is a flag in register PITCFLMT called PITFRZ. The manual says "When during debugging a breakpoint (freeze mode) is encountered it is useful in many cases to freeze the PIT counters to avoid e.g. interrupt generation. The PITFRZ bit controls the PIT operation while in freeze mode.

0 PIT operates normally in freeze mode

1 PIT counters are stalled when in freeze mode

 

In Processor Expert, if I look at the EXPERT view of the Timer Properties, there is a property called "Stop in Freeze Mode". See attached Image. I set this to yes, but the generated code does not set the PITFRZ flag in this register.

Also if I click on the "View Regs>" button to view the registers, the PITFRZ flag is shown as zero in that display.

Is there some other option I am meant to set to make this work? It is an annoyance in debugging as I cannot step through the code. The way round is to remember to manually change this flag at the start of each debugging session, but that is not an elegant solution.

Problem with PE Timer.JPG.jpg

Outcomes