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 ... ]
C synopsis target-domain sourced in ti/sysbios/family/arm/msp432/ClockFreqs.xdc
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

C synopsis target-domain
typedef enum ClockFreqs_Clock {
    ClockFreqs_Clock_ACLK,
    ClockFreqs_Clock_SMCLK,
    ClockFreqs_Clock_HSMCLK
} ClockFreqs_Clock;
 
 
config ClockFreqs_ACLK  // module-wide

ACLK frequency (Hz)

C synopsis target-domain
extern const UInt32 ClockFreqs_ACLK;
 
 
config ClockFreqs_HSMCLK  // module-wide

HSMCLK frequency (Hz)

C synopsis target-domain
extern const UInt32 ClockFreqs_HSMCLK;
 
 
config ClockFreqs_SMCLK  // module-wide

SMCLK frequency (Hz)

C synopsis target-domain
extern const UInt32 ClockFreqs_SMCLK;
 
 
ClockFreqs_getFrequency()  // module-wide

Get the frequency for a clock

C synopsis target-domain
UInt32 ClockFreqs_getFrequency(ClockFreqs_Clock clock);
 
 
ClockFreqs_setFrequency()  // module-wide

Set the frequency for a clock

C synopsis target-domain
Void ClockFreqs_setFrequency(ClockFreqs_Clock clock, UInt32 frequency);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId ClockFreqs_Module_id();
// Get this module's unique id
 
Bool ClockFreqs_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle ClockFreqs_Module_heap();
// 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
 
Configuration settings sourced in ti/sysbios/family/arm/msp432/ClockFreqs.xdc
var ClockFreqs = xdc.useModule('ti.sysbios.family.arm.msp432.ClockFreqs');
module-wide constants & types
    values of type ClockFreqs.Clock// Clocks
        const ClockFreqs.Clock_ACLK;
        const ClockFreqs.Clock_SMCLK;
        const ClockFreqs.Clock_HSMCLK;
 
    var obj = new ClockFreqs.ModuleView// ;
        obj.ACLK = UInt  ...
        obj.SMCLK = UInt  ...
        obj.HSMCLK = UInt  ...
module-wide config parameters
    ClockFreqs.ACLK// ACLK frequency (Hz) = UInt32 undefined;
    ClockFreqs.HSMCLK// HSMCLK frequency (Hz) = UInt32 undefined;
    ClockFreqs.SMCLK// SMCLK frequency (Hz) = UInt32 undefined;
 
 
 
enum ClockFreqs.Clock

Clocks

Configuration settings
values of type ClockFreqs.Clock
    const ClockFreqs.Clock_ACLK;
    const ClockFreqs.Clock_SMCLK;
    const ClockFreqs.Clock_HSMCLK;
 
C SYNOPSIS
 
metaonly struct ClockFreqs.ModuleView
Configuration settings
var obj = new ClockFreqs.ModuleView;
 
    obj.ACLK = UInt  ...
    obj.SMCLK = UInt  ...
    obj.HSMCLK = UInt  ...
 
 
config ClockFreqs.ACLK  // module-wide

ACLK frequency (Hz)

Configuration settings
ClockFreqs.ACLK = UInt32 undefined;
 
C SYNOPSIS
 
config ClockFreqs.HSMCLK  // module-wide

HSMCLK frequency (Hz)

Configuration settings
ClockFreqs.HSMCLK = UInt32 undefined;
 
C SYNOPSIS
 
config ClockFreqs.SMCLK  // module-wide

SMCLK frequency (Hz)

Configuration settings
ClockFreqs.SMCLK = UInt32 undefined;
 
C SYNOPSIS
 
metaonly config ClockFreqs.common$  // module-wide

Common module configuration parameters

Configuration settings
ClockFreqs.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config ClockFreqs.rovViewInfo  // module-wide
Configuration settings
ClockFreqs.rovViewInfo = ViewInfo.Instance ViewInfo.create;
 
generated on Thu, 25 May 2017 22:09:52 GMT