AnsweredAssumed Answered

[Oscillator initialization is not completed (OSCINIT = 0)]

Question asked by Mohammed Aboelnasr on Jun 5, 2017
Latest reply on Jul 30, 2017 by Kerry Zhou

I am working on TRK-KEA64 trying to initialize oscillator to generate 40 MHz as core (system) clock and 20 MHz as Bus clock.

 

/* FLL Enabled with External clock */
/* High range & gain; select osc */
/* OSCEN =1 ; OSC module enabled */
/* OSCSTEN = 0; OSC clock disabled in stop mode */
/* OSCOS = 1; OSC clock source is selected */
/* RANGE = 1; High freq range of 4-24 MHz */
/* HGO = 1; High-gain mode */
OSC_CR = 0x96;

 

 

/* Wait until oscillator is ready*/
while ((OSC_CR & OSC_CR_OSCINIT_MASK) == 0);

 

Code does not come out from the while loop due to the non-initialization of the oscillator.

 

Could you help please ?

Outcomes