Clock monitoring on K20 50MHz family

Document created by Puebla Palma Luis Employee on Nov 7, 2013Last modified by Puebla Palma Luis Employee on Oct 6, 2015
Version 2Show Document
  • View in full screen mode

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

Outcomes