module ti.sysbios.family.msp430.ClockFreqs |
|
|
ClockFreqs Module
This module is used to define the ACLK and SMCLK frequencies in effect when
BIOS_start() is called at the end of main(). It also provides a function
that can be called by the application at runtime to query individual
clock frequencies.
[
more ... ]
#include <ti/sysbios/family/msp430/ClockFreqs.h>
Functions |
UInt32 | |
Functions common to all target modules |
|
|
Typedefs |
typedef enum | |
Constants |
extern const UInt32 | |
extern const UInt32 | |
DETAILS
This module is used to define the ACLK and SMCLK frequencies in effect when
BIOS_start() is called at the end of main(). It also provides a function
that can be called by the application at runtime to query individual
clock frequencies.
If the application configuration defines values for these two clocks, it
(the application) is responsible for setting up the clocks to the
corresponding frequencies. This module will simply hold the values
specified, for reference by other SYS/BIOS modules, or for query by the
application.
If the application configuration specifies a value for one of these
two clock frequencies, it must specify values for both clock frequencies;
if it does not, a build error will be thrown.
If the application does not define values for one of these clocks, the
values will default either to the device reset values, or the boost values
setup by the Boot module (ti.catalog.msp430.init.Boot). For example, if
the application does not configure values for ClockFreq, and does not turn
off the Boot module's default frequency boost, then the Boot module boost
frequencies are used.
If the application does not configure values for ClockFreq, and *does* turn
off the Boot module's frequency boost (see snippet below), then the default
reset frequency values will be used.
var Boot = xdc.module('ti.catalog.msp430.init.Boot');
Boot.configureDCO = false;
Currently the reset and Boot module boost values are fixed, as shown below.
In future releases these values may made changeable.
The default reset values are:
ACLK = 32768 Hz
SMCLK = 1000000 Hz
The default Boot module boost values are:
ACLK = 32768 Hz
SMCLK = 8192000 Hz
Note: This module allows query of the CPU clock (MCLK) frequency via the
ClockFreqs_getFrequency() API. But MCLK cannot be configured with this
module. Since MCLK is the CPU frequency, it is configured in the BIOS
module. For example:
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.cpuFreq.lo = 25000000;
BIOS.cpuFreq.hi = 0;
Calling Context
Function | Hwi | Swi | Task | Main | Startup |
getFrequency | Y | Y | Y | Y | Y |
Definitions:
- Hwi: API is callable from a Hwi thread.
- Swi: API is callable from a Swi thread.
- Task: API is callable from a Task thread.
- Main: API is callable from main().
- Startup: API is callable during any module startup.
|
enum ClockFreqs_Clock |
|
Clocks
typedef enum ClockFreqs_Clock {
ClockFreqs_Clock_ACLK,
ClockFreqs_Clock_SMCLK,
ClockFreqs_Clock_MCLK
} ClockFreqs_Clock;
config ClockFreqs_ACLK // module-wide |
|
ACLK frequency (Hz)
extern const UInt32 ClockFreqs_ACLK;
config ClockFreqs_SMCLK // module-wide |
|
SMCLK frequency (Hz)
extern const UInt32 ClockFreqs_SMCLK;
ClockFreqs_getFrequency() // module-wide |
|
Get the frequency for a clock
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool ClockFreqs_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool ClockFreqs_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 ClockFreqs_Module_getMask();
// Returns the diagnostics mask for this module
Void ClockFreqs_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
module-wide constants & types
module-wide config parameters
generated on Thu, 01 Mar 2012 16:57:24 GMT