2.4.1.1 Configure the Device System
The first step to develop the ADC application is to configure the system clock. To find out which are the clock options, the user must consult the CLKCTRL – Clock Controller chapter, from the device data sheet.
For example, in this application, the chosen main clock frequency is 2 MHz.
Todo: Using
MCC, configure the internal high-frequency oscillator as the clock source. The frequency
of the oscillator must be 4 MHz. The main clock frequency must be 2 MHz.
Result: Open
the MCC and go to Resource Management [MCC] → Project Resources → System → System
Module. From the Easy Setup tab, the following configuration must
be done:
- Clock Control
- Clock Source: Internal Oscillator
- Internal Oscillator Frequency: 1-32 MHz internal oscillator
- Oscillator Frequency Options: 4 MHz system clock (default)
- Prescaler Enable: checked
- Prescaler: 2X
The settings are described in Figure 2-11.