Dear BigMac,
I'm unsure if the manual is incorrect. The one I referred to had the following (MC9S08QE128 Rev2, ch 4, p62):
The factory ICS trim value is stored in the flash information row (IFR1) and will be loaded into the
ICSTRM and ICSSC registers after any reset. The internal reference trim values stored in flash, TRIM and
FTRIM, can be programmed by third party programmers and must be copied into the corresponding ICS
registers by user code to override the factory trim.
NOTE
When the MCU is in active BDM, the trim value in the IFR will not be
loaded. Instead, the ICSTRM register will reset to 0x80 and the FTRIM bit
in the ICSSC register will be reset to 0
Footnote
1. IFR — Nonvolatile information memory that can be only accessed during production test. During production test, system
initialization, configuration and test information is stored in the IFR. This information cannot be read or modified in normal user or background debug modes.
This refers to two different non-volatile regions:
The Flash programmed by the "user" i.e. in the OP's case the flash programmed by the programmer. This would need to be copied to the clock registers by the program code.
The IFR region which I believe is some kind of factory programmed region which contains a trim value done at the factory - I have not confirmed this but I believe it's what is implied by the above. If this is the case I'm puzzled that the default clock value wasn't closer to the nominal value. Perhaps the trim frquency being used was chosen differently to the factory trim value?
The above is different to most of the HCS08's I've looked at but appears to be an innovation on later devices.
The above is almost consistent with the portion posted by Tbspd_TOK, apart from the reference to the factory trim value in table 4-4 which refers to the usual flash locations (which may also still be programmed to factory trim values I suppose).
Perhaps not wrong but certainly ambiguous!
bye