module ti.sysbios.family.arm.msp432.ClockFreqs |
|
|
ClockFreqs Module
This module is used to define the ACLK, SMCLK, and HSMCLK frequencies in
effect when BIOS_start() is called at the end of main(). It also provides
runtime functions that can be used to query or set individual clock
frequencies.
[
more ... ]
#include <ti/sysbios/family/arm/msp432/ClockFreqs.h>
Functions |
UInt32 | |
Void | |
Functions common to all target modules |
|
|
Typedefs |
typedef enum | |
Constants |
extern const UInt32 | |
extern const UInt32 | |
extern const UInt32 | |
DETAILS
This module is used to define the ACLK, SMCLK, and HSMCLK frequencies in
effect when BIOS_start() is called at the end of main(). It also provides
runtime functions that can be used to query or set individual clock
frequencies.
If the application defines values for these three clocks, 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 at runtime.
If the application configuration specifies (in its .cfg file) a value for
one of these three clock frequencies, it must specify values for all three
clocks; if it does not, a build error will be thrown.
If the application does not define values for these clocks, the values will
default either to the device reset values, or the boost values setup by
the Boot module (ti.sysbios.family.arm.msp432.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.sysbios.family.arm.msp432.init.Boot');
Boot.configureClocks = false;
Currently the reset and Boot module boost values are fixed, as shown below.
The default reset values are:
ACLK = 32768 Hz
SMCLK = 3 MHz
HSMCLK = 3 MHz
The default Boot module boost values are:
ACLK = 32768 Hz
SMCLK = 12 MHz
HSMCLK = 24 MHz
Note: This module only tracks the ACLK, SMCLK, and HSMCLK values. It does
not track the CPU clock (MCLK) frequency. MCLK can be configured and
queried with the BIOS module. For example, to configure the CPU
frequency:
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.cpuFreq.lo = 48000000;
BIOS.cpuFreq.hi = 0;
Calling Context
Function | Hwi | Swi | Task | Main | Startup |
getFrequency | Y | Y | Y | Y | Y |
setFrequency | 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_HSMCLK
} ClockFreqs_Clock;
config ClockFreqs_ACLK // module-wide |
|
ACLK frequency (Hz)
extern const UInt32 ClockFreqs_ACLK;
config ClockFreqs_HSMCLK // module-wide |
|
HSMCLK frequency (Hz)
extern const UInt32 ClockFreqs_HSMCLK;
config ClockFreqs_SMCLK // module-wide |
|
SMCLK frequency (Hz)
extern const UInt32 ClockFreqs_SMCLK;
ClockFreqs_getFrequency() // module-wide |
|
Get the frequency for a clock
ClockFreqs_setFrequency() // module-wide |
|
Set 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.arm.msp432.ClockFreqs');
module-wide constants & types
module-wide config parameters
generated on Tue, 14 Feb 2017 19:59:21 GMT