Page 1 of 1

Does the NuMicro® family provide the clock output pin to measure the internal or external clock?

Posted: 24 Mar 2017, 15:19
by Henry
Yes, but it depends on the part No.
The measurement frequency will be Fin/2^1 to Fin/2^16, where Fin is the input clock frequency to the clock divider.
Please check the pin configuration and get further information in the related Technical Reference Manual.

Please refer to the following flow to measure the internal or external clock from clock out (CLKO) pin.
Example: (NUC100 Series)
/* Set GPIO pin as CLKO pin */
SYS->GPBMFP.CPO0_CLKO_AD0 = 1;
SYS->ALTMFP.PB12_CLKO = 1;

/* Frequency Divider Output */
SYSCLK->CLKSEL2.FRQDIV_S = 0; // select Fin source form 12 MHz
SYSCLK->APBCLK.FDIV_EN = 1; // FRQDIV_CLK enable
SYSCLK->FRQDIV.FDIV_EN = 1; // Divider enable
SYSCLK->FRQDIV.FSEL = 0; // CLKO = Fin / 2(N+1)
Clock Source.png
Clock Source.png (6.5 KiB) Viewed 3396 times
CLKO.png
CLKO.png (6.96 KiB) Viewed 3396 times