A clock output unit is provided for sending digital clock signals from the device to external circuits or to the frequency clock counter. This feature is useful for clocking external circuitry such as an external ADC that does not have a clock source. The clock output unit has a flexible set of sources to select and includes a programmable divider.
Available clock sources for CLK_OUT:
- SYSPLLCLK1
- HFCLK
- SYSOSC
- ULPCLK
- MFPCLK
- LFCLK
The selected clock source can be divided by 1 (no divide), 2, 4, 6, 8, 10, 12, 14, or 16 before being output to the pin or to the frequency clock counter.
To use the clock output unit:
- Configure IOMUX to select the CLK_OUT function on the device pin with CLK_OUT.
- Select the desired clock source in the EXCLKSRC field of the GENCLKCFG register.
- Set the desired clock divider, if necessary, in the EXCLKDIVVAL field of the GENCLKCFG register, and enable the divider by setting the EXCLKDIVEN bit.
- Enable the external clock output by setting the EXCLKEN bit in the GENCLKEN register.
Note: When the CLK_OUT source is selected as ULPCLK or MFPCLK, the clock divider must be enabled (EXCLKDIVEN must be set).
Note: When clearing the EXCLKEN bit to disable CLK_OUT, allow the clock source to run for 10 clock cycles to stabilize the EXCLKSRC mux.
Note: When disabling a clock source which is selected for CLK_OUT, it is recommended to disable the CLK_OUT function before disabling the clock source if it is important that CLK_OUT be logic low (0) when the clock source is disabled. If CLK_OUT is left enabled and the source for CLK_OUT is disabled, it is possible that CLK_OUT may stop in a logic high (1) state.
Note: When the CLK_OUT source is selected as SYSPLLCLK1, the SYSPLLCLK1 output must be ≤48MHz. Further speed restrictions can exist depending on the IO capabilities of a specific device and pin; see the Digital IO specifications in the device-specific data sheet for details on supported IO speeds.