FLL Oscillator Frequency Changes For No Reason? - mc9s08qe128

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FLL Oscillator Frequency Changes For No Reason? - mc9s08qe128

2,007 Views
ajacks504
Contributor I

Hello,

I am currently using a mc9s08qe128, I have it configured to use the FLL, the reference clock is set to the internal 32.768k.  DRS = 00, DMX32 = 1, I should have a DCO frequency of 19.92Mhz.  Every time I reset the board through P&E True-Time Sim, I get a differnt clock!

Frequency change to ~9491227hz.
Frequency change to ~9858172hz.
Frequency change to ~9832800hz.
Frequency change to ~9467767hz.


Why is this?  Is this just the inaccuracy of the interal reference?  My ICS setup rountine is:

ICSSetup:
            lda     #%00000111  ; FLL out sel'ed, 32.768k, int.ref. sel and EN'd,
            sta     ICSC1       ; Bus = div1, FEI Mode, Internal CLK
            lda     #%00001100
            sta     ICSC2
            lda     #%00110000  ; Low range, DMX32=1 => 19.92MHz Clock
            sta     ICSSC
            rts


Thanks,
Adam

 

 

Added p/n to subject.



Message Edited by ajacks504 on 2008-07-29 08:20 PM

Message Edited by NLFSJ on 2008-07-30 02:18 PM
Labels (1)
0 Kudos
3 Replies

283 Views
ajacks504
Contributor I
Anyone?  This is incredibly frustrating, I'm trying to setup an SCI recieve, but I cant ever set the correct baud rate generator because the d@mn clock frequency keeps changing!
0 Kudos

283 Views
fabio
Contributor IV
I had a similar problem with a QE8 using an external 32768Hz crystal, but as far as I can tell it appears to be just a BDM accuracy question (that frequency is measured by the BDM tool on-the-fly throughout the debug session).

Even with the high frequency deviation, my system performs all timings and baud rates as expected (I am using the RTC, the SCI for a 9600 BPS port and a second serial port on software).

Best regards,
0 Kudos

283 Views
Zahar
Contributor IV
Ajacks504,

What microprocessor are you working with? What P&E hardware interface are you using?

What version of Codewarrior are you using?

Do you program your code into the FLASH of the micro? Do you enable the trim setting to be programmed into device every time the FLASH is loaded?

A blank S08 chip has a trim accuracy of +-25%. That is why you have to start out by trimming the device to get rid of clock inaccuracy.

Please reply to the questions above and let me know if you have any question about device trimming.

Best Regards,
Zahar
P&E
0 Kudos