Change clock configuration when 32 kHz oscillator is not available

Document created by Pablo Noriega Navarro Employee on Oct 3, 2016Last modified by Pablo Noriega Navarro Employee on Oct 31, 2016
Version 1Show Document
  • View in full screen mode

If the application running in the KW41Z does not operate in low power mode, the device could work without the 32 kHz oscillator. However, for it to work correctly, the clock configuration must be changed.

 

Figure 1.  KW41Z clock distribution

 

By default, the software stack running on the KW41Z selects a clock source that requires the 32 kHz oscillator. However, if the 32 kHz oscillator is not available, the clock configuration must be changed. Fortunately, the option to change it is already implemented, it is only required to change the clock configuration to the desired one. To do this, change the value for the CLOCK_INIT_CONFIG macro located in the app_preinclude.h file.

/* Define Clock Configuration */
#define CLOCK_INIT_CONFIG           CLOCK_RUN_32

In the selected mode in this example, CLOCK_RUN_32, the selected clock mode is BLPE (Bypassed Low Power External). In this mode, the FLL is bypassed entirely, and clock is derived from the external RF oscillator, in this case, the 32 MHz external clock.

 

These macros are the default available options to change the clock configuration, they are located in the board.h file. It is up to the application and the developer to chose the most appropriate configuration.

#define CLOCK_VLPR       1U
#define CLOCK_RUN_16     2U
#define CLOCK_RUN_32     3U
#define CLOCK_RUN_13     4U
#define CLOCK_RUN_26     5U
#define CLOCK_RUN_48_24  6U
#define CLOCK_RUN_48_16  7U
#define CLOCK_RUN_20_FLL 8U

More information regarding the different clock modes and their clock sources are available in the KW41Z reference manual, Chapter 5: Clock Distribution, section 5.4 Clock definitions, and Chapter 24: Multipurpose Clock Generator.

3 people found this helpful

Attachments

    Outcomes