Loading...
Searching...
No Matches
msp430_clock_params_t Struct Reference

MSP430Fxzy Basic Clock System Parameters. More...

Detailed Description

MSP430Fxzy Basic Clock System Parameters.

This structure is optimized for readability under the assumption that its values are readily available compile time constants. Hence, accesses to the structure will be fully optimized out be a decent optimizing compiler.

MSP430Fxzy boards are expected to declare the parameters to configure the Basic Clock System in their periph_conf.h as static const msp430_fxzy_clock_params_t clock_params;.

Definition at line 240 of file periph_cpu_common.h.

#include <periph_cpu_common.h>

Data Fields

uint32_t target_dco_frequency
 The target frequency to run the DCO at in Hz.
 
uint32_t lfxt1_frequency
 The frequency of the LFXT1 crystal in Hz.
 
uint32_t xt2_frequency
 The frequency of the XT2 crystal in Hz.
 
msp430_main_clock_source_t main_clock_source
 The clock source to select for the main clock.
 
msp430_submain_clock_source_t submain_clock_source
 The clock source to select for the submain CPU clock.
 
msp430_main_clock_divider_t main_clock_divier
 Divider of the main clock.
 
msp430_submain_clock_divider_t submain_clock_divier
 Divider of the submain clock.
 
msp430_auxiliary_clock_divider_t auxiliary_clock_divier
 Divider of the auxiliary clock.
 
bool has_r_osc
 An external resistor connected to source the current for the DCO.
 
bool has_xt2
 A high frequency crystal (e.g.
 

Field Documentation

◆ auxiliary_clock_divier

msp430_auxiliary_clock_divider_t msp430_clock_params_t::auxiliary_clock_divier

Divider of the auxiliary clock.

Definition at line 287 of file periph_cpu_common.h.

◆ has_r_osc

bool msp430_clock_params_t::has_r_osc

An external resistor connected to source the current for the DCO.

From the datasheet:

‍The DCO temperature coefficient can be reduced by using an external resistor R_OSC tied to D_VCC to source the current for the DC generator.

Definition at line 296 of file periph_cpu_common.h.

◆ has_xt2

bool msp430_clock_params_t::has_xt2

A high frequency crystal (e.g.

8 MHz) is connected between XT2IN and XT2OUT

Definition at line 301 of file periph_cpu_common.h.

◆ lfxt1_frequency

uint32_t msp430_clock_params_t::lfxt1_frequency

The frequency of the LFXT1 crystal in Hz.

This should be either 32768 Hz watch crystal or a high frequency crystal anywhere between 450 kHz and 8 MHz. The clock driver will automatically configure high frequency mode of the LFXT1 clock source when the frequency is >= 450 kHz.

Definition at line 256 of file periph_cpu_common.h.

◆ main_clock_divier

msp430_main_clock_divider_t msp430_clock_params_t::main_clock_divier

Divider of the main clock.

Definition at line 279 of file periph_cpu_common.h.

◆ main_clock_source

msp430_main_clock_source_t msp430_clock_params_t::main_clock_source

The clock source to select for the main clock.

This is the clock the CPU will run at

Definition at line 269 of file periph_cpu_common.h.

◆ submain_clock_divier

msp430_submain_clock_divider_t msp430_clock_params_t::submain_clock_divier

Divider of the submain clock.

Definition at line 283 of file periph_cpu_common.h.

◆ submain_clock_source

msp430_submain_clock_source_t msp430_clock_params_t::submain_clock_source

The clock source to select for the submain CPU clock.

This is the clock high speed peripherals will run at

Definition at line 275 of file periph_cpu_common.h.

◆ target_dco_frequency

uint32_t msp430_clock_params_t::target_dco_frequency

The target frequency to run the DCO at in Hz.

A frequency between 160 kHz and 4 MHz is enforced by compile time tests to make sure DCO calibration will succeed reliable.

Definition at line 247 of file periph_cpu_common.h.

◆ xt2_frequency

uint32_t msp430_clock_params_t::xt2_frequency

The frequency of the XT2 crystal in Hz.

A value of 0 Hz means no XT2 crystal is present. Otherwise the frequency must be anywhere between 450 kHz and 8 MHz.

Definition at line 263 of file periph_cpu_common.h.


The documentation for this struct was generated from the following file: