Clock monitoring on K20 50MHz family

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

Clock monitoring on K20 50MHz family

Clock monitoring on K20 50MHz family

Hello,

     Is your clock correctly configured, what is its frequency?

  You can monitor some of clocks in K0 MCU by routing it to  PTC3/CLKOUT pin.

you can get it easily by selecting desired clock on  SIM_SOPT2[CLKOUTSEL] register and configuring PTC3 for CLKOUT function.   For example to monitor  1 KHz 1 low power osillator   LPO,

----------------------------------------------------------------------------------------------------------------------------

/*  ClockOutput options */

#define CLOCKOUT_FLASH_CLOCK    2

#define CLOCKOUT_LPO                       3

#define CLOCKOUT_MCGIRC                4

#define CLOCKOUT_RTC32KHZ            5

#define CLOCKOUT_OSCERCLK0       6

/* Configure clock output option according to  */      

        SIM_SOPT2 = SIM_SOPT2_CLKOUTSEL(CLOCKOUT_LPO);

/* Configure PTC3 as clock output) */     

        PORTC_PCR3 = PORT_PCR_MUX(5);   //CLKOUT function selected on PTC3

------------------------------------------------------------------------------------------------------------------------------------

               

In attached document you can find captures of all clock options,  and notes on what need to be configured to get the clock output.

                      

Note:       Please note that Clock out (CLKOUT) on PTC3 is not currently shown in Signal Multiplexing and Signal Descriptions of RM.  It is already reported and will be fixed on next release of Reference Manual/Data sheet.

Attachments
No ratings
Version history
Last update:
‎11-07-2013 10:04 AM
Updated by: