1.. _clock_control_xec: 2 3Microchip XEC (MEC15xx/MEC172x) clock control driver sample application 4####################################################################### 5 6Overview 7******** 8 9This sample demonstrates configuring the 32KHz clock 10options via device tree. The application prints out 11hardware configuration and exercises some clock control 12driver API's. 13 14Building and Running 15******************** 16 17The sample can be built and executed on boards using west. 18No pins configurations, except GPIO014 is used as indicator for entry/exit and 19GPIO060 for 48MHZ PLL clock out. 20GPIO221 alternate function 1 is 32KHZ_OUT and can be monitored on Assembly 6915 JP7 pin 5. 21 22Internal Silicon 32KHz Oscillator jumper configuration 23MEC172x Assembly 6915 24 25 JP1 pin 2 to GND (ground MEC172x XTAL1 pin) 26 JP2 No jumper 27 28Dual-ended 32KHz Crystal jumper configuration 29MEC172x Assembly 6915 30 31 Jumper on JP1 1-2 connect crystal Y1 pin 1 to MEC172x XTAL1 32 Jumper on JP2 2-3 connect crystal Y1 pin 2 to MEC172x XTAL2 33 34MEC172x Assembly 6906 (baseboard) 35 36 Remove jumper on JP121 to prevent U15 32KHz 50% duty waveform 37 from coupling to JP2 on Assembly 6915. 38 39External single-ended 32KHz waveform to MEC172x XTAL2 input 40MEC172x Assembly 6915 41 42 JP1 pin 2 to GND (ground MEC172x XTAL1 pin) 43 Jumper on JP2 1-2 connect external 32KHz signal to XTAL2 44 45MEC172x Assembly 6906 (baseboard) 46 47 Jumper on JP121 pins 3-4 connect U15 32KHz output to 48 XTAL2_32KHZ_IN signal routed to XTAL2 MEC172x pin on Assembly 6915 49 50External single-ended 32KHz waveform to MEC172x 32KHZ_IN pin 51MEC172x Assembly 6915 52 53 JP1 pin 2 to GND (ground MEC172x XTAL1 pin) 54 Remove jumper on JP2 55 56MEC172x Assembly 6906 (baseboard) 57 58 Jumper on JP121 pins 1-2 connect U15 32KHz output to 59 32KHZ_IN pin of MEC172x on Assembly 6915 60 61Sample output 62============= 63 64.. code-block:: console 65 66 Prints MEC172x VBAT and PCR register pertaining to power on status and 67 clock control. 68