Dave Plescia

Debugger Effect on MCU Timing?

Discussion created by Dave Plescia on Mar 1, 2009
Latest reply on Mar 2, 2009 by David Payne
Let me preface this by saying I am relatively new to Freescale device development. I am working with a DEMOQE board with the FLEXIS 8-bit device installed (QE128), and cutting my teeth using the Processor Expert function in the IDE. A component of my project will be to output a PWM signal from a MCU pin, so I have started with the PWM bean in Processor Expert. The output I am requesting is 10ms period with 5ms pulse width from PTA0. The program compiles correctly, and the TTS/RTD is able to program the MCU without any errors. The problem arises when I run the program with the debugger. My oscilloscope is measuring the pulse widths at 5.25ms with a period of 10.5ms. Now here is what's interesting. If I close the debugger, and cycle the power on the development board, the pulses are right where they are supposed to be - 5ms wide with a period of 10ms. It seems to me that there is some effect of the debugger on the timing of the MCU. Does anyone have any ideas as to what is going on here?

Outcomes