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 ... ]
C synopsis target-domain sourced in ti/sysbios/family/msp430/ClockFreqs.xdc
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 for UCS-based 5xx/6xx devices are:
      ACLK  = 32768 Hz
      SMCLK = 1000000 Hz
The default reset values for CS-based FR58xx/FR59xx devices are:
      ACLK  = 39063 Hz
      SMCLK = 1000000 Hz
The default Boot module boost values for UCS-based 5xx/6xx devices are:
      ACLK  = 32768 Hz
      SMCLK = 8192000 Hz
The default Boot module boost values for CS-based FR58x/FR59x devices are:
      ACLK  = 39063 Hz
      SMCLK = 8000000 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

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

ACLK frequency (Hz)

C synopsis target-domain
extern const UInt32 ClockFreqs_ACLK;
 
 
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);
 
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/msp430/ClockFreqs.xdc
var ClockFreqs = xdc.useModule('ti.sysbios.family.msp430.ClockFreqs');
module-wide constants & types
    values of type ClockFreqs.Clock// Clocks
        const ClockFreqs.Clock_ACLK;
        const ClockFreqs.Clock_SMCLK;
        const ClockFreqs.Clock_MCLK;
module-wide config parameters
    ClockFreqs.ACLK// ACLK 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_MCLK;
 
C SYNOPSIS
 
config ClockFreqs.ACLK  // module-wide

ACLK frequency (Hz)

Configuration settings
ClockFreqs.ACLK = 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.
generated on Tue, 09 Oct 2018 20:57:41 GMT