AnsweredAssumed Answered

Code functions differently in debug mode versus flash release - how do I find out why?

Question asked by gearhead1107 on Aug 14, 2015
Latest reply on Aug 16, 2015 by ZhangJennie

I'm currently working on a program for an 8-bit freescale chip (MC9S08QG8) in CodeWarrior v10.3 which uses the timer/ period capture to turn a frequency to an analog voltage.

I've gotten the thing to work pretty well in debug mode, but I noticed when I just flash the .abs file to the target to test the release build, it behaves as if the timer register is skewed. In other words, a 20ms period will normally turn on a DAC in debug mode (as intended). However, when the file is flashed directly, the DAC turns on at about 17.4ms. Ditto for other other cases; an event that's supposed to happen at 6.64ms happens at 5.75ms.

The code is interrupt-based - does anyone know what's different in debug vs direct flash that could cause this? Anything I can disable in debug mode to make it behave like a release build?

Outcomes