Hello Daxx,
For the QT/QY series, the trim value to be written to the OSCTRIM register will be found at the flash location $FFC0, unless it has been erased (a value of $FF). You appear to be writing a constant value of $FF (= -1) to the register, which would be an extremity of the adjustment range. The centre value of the adjustment range is $80.
The following code snippet would be more typical of the trim adjustment process, usually done during initialisation, where
TRIMVAL EQU $FFC0
LDA TRIMVAL
CMP #$FF ; Test for unprogrammed value
BNE ST2 ; Branch if programmed
LDA #$80 ; Nominal default trim value
ST2: STA OSCTRIM
On power-up the MCU will default to the internal oscillator, so there is no need for any stabilization delay.
Regards,
Mac