I'm using CW6.1 on MC9S08QE128. When downloading the code via P&E USBBDM the trim value is automatically adjusted, and the clock speed is correct (ca. 4MHz).
When running the unit without the BDM the clock speed is increased around 6%. This change is reflected in the baudrate(9600Bd) for the SCI, and the serial communication does not work anymore. When running the BDM the baudrate and clock is spot on, as described in the reference manual.
If I fix this by adding 1 to the baudrate counter value, the value is only 1.56% off and the unit work without BDM, but now it does not work in BDM mode. Around +/-4% is the limit if the unit in the other end is spot on the frequency.
Has anyone seen this before? If so, is there any way around this so the value programmed will work both with and without the BDM connected.
It looks like the trim calculation and frequency is offset by a BDM overhead?