MC9S08AWxx FBE mode with 16 Mhz crystal

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

MC9S08AWxx FBE mode with 16 Mhz crystal

1,069 Views
admin
Specialist II
Hi!
 I develop an application on microcontroller MC9S08AWxx, this system should work at high (up to 50 degrees) and low temperature with extremely precison timer so I use an external crystal.
I can only use  a crystal of 16 MHz  and the application doesn't run why?

For working with this hardware I can only choose the FBE clock mode, so the init code is

/* ICGC1: HGO=0,RANGE=1,REFS=0,CLKS1=1,CLKS0=0,OSCSTEN=1,LOCD=0,??=0 */
ICGC1= 0x54;                
  /* ICGC2: LOLRE=0,MFD2=0,MFD1=0,MFD0=0,LOCRE=0,RFD2=0,RFD1=0,RFD0=0 */
 ICGC2=0x00);                
 
 while((ICGS1_ERCS==0)){  
     }
here the routine is frozen why?

Why the FBE mode doesn't work?



how can resolve it?
Labels (1)
0 Kudos
1 Reply

216 Views
peg
Senior Contributor IV
Hello and welcome to the forums,

If you are using a crystal you need REFS=1 (0 is for an oscillator input)
If your crystal is above 8MHz you need to use the high gain oscillator (HGO=1)

Give it a go with these two changes!

0 Kudos