module ti.mcu.msp430.runtime.utils.Clock

Basic "wall clock" functions

C synopsis target-domain sourced in ti/mcu/msp430/runtime/utils/Clock.xdc
#include <ti/mcu/msp430/runtime/utils/Clock.h>
Functions
Void 
Void 
Functions common to all target modules
Defines
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
Typedefs
typedef struct
typedef UInt16 
Constants
extern const Int 
extern const Int 
extern const Clock_TimerRegs *
 
 
const Clock_T0A3
C synopsis target-domain
#define Clock_T0A3 (Clock_TimerRegs*)0x340
 
 
const Clock_T0A5
C synopsis target-domain
#define Clock_T0A5 (Clock_TimerRegs*)0x340
 
 
const Clock_T0B7
C synopsis target-domain
#define Clock_T0B7 (Clock_TimerRegs*)0x3d0
 
 
const Clock_T1A2
C synopsis target-domain
#define Clock_T1A2 (Clock_TimerRegs*)0x180
 
 
const Clock_T1A3
C synopsis target-domain
#define Clock_T1A3 (Clock_TimerRegs*)0x380
 
 
const Clock_T1A5
C synopsis target-domain
#define Clock_T1A5 (Clock_TimerRegs*)0x380
 
 
const Clock_T2A3
C synopsis target-domain
#define Clock_T2A3 (Clock_TimerRegs*)0x400
 
 
const Clock_TA2
C synopsis target-domain
#define Clock_TA2 (Clock_TimerRegs*)0x160
 
 
const Clock_TA3
C synopsis target-domain
#define Clock_TA3 (Clock_TimerRegs*)0x160
 
 
const Clock_TA5
C synopsis target-domain
#define Clock_TA5 (Clock_TimerRegs*)0x160
 
 
const Clock_TB3
C synopsis target-domain
#define Clock_TB3 (Clock_TimerRegs*)0x180
 
 
const Clock_TB7
C synopsis target-domain
#define Clock_TB7 (Clock_TimerRegs*)0x180
 
 
typedef Clock_TimeValue

Time value type

C synopsis target-domain
typedef UInt16 Clock_TimeValue;
 
 
struct Clock_TimerRegs

Timer peripheral register definition

C synopsis target-domain
typedef struct Clock_TimerRegs {
    Bits16 CTL;
    Bits16 CCTL[7];
    Bits16 R;
    Bits16 CCR[7];
    Bits16 EX0;
    Bits16 IV;
} Clock_TimerRegs;
 
 
config Clock_TIMER  // module-wide

Base address of timer peripheral to use

C synopsis target-domain
extern const Clock_TimerRegs *Clock_TIMER;
 
DETAILS
Timer B on 2274
 
config Clock_fastClockKHz  // module-wide

Main System clock frequency (KHz)

C synopsis target-domain
extern const Int Clock_fastClockKHz;
 
 
config Clock_slowClockHz  // module-wide

Auxiliary clock frequency (Hz)

C synopsis target-domain
extern const Int Clock_slowClockHz;
 
 
Clock_delay()  // module-wide

Spin for specified number of micro seconds

C synopsis target-domain
Void Clock_delay(UInt16 usec);
 
 
Clock_getTime()  // module-wide

Get the current time in Auxiliary clock ticks

C synopsis target-domain
Clock_TimeValue Clock_getTime();
 
 
Clock_sleep()  // module-wide

Idle the CPU for specified number of micro seconds

C synopsis target-domain
Void Clock_sleep(UInt16 usec, UInt lpm);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId Clock_Module_id();
// Get this module's unique id
 
Bool Clock_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle Clock_Module_heap();
// The heap from which this module allocates memory
 
Bool Clock_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 Clock_Module_getMask();
// Returns the diagnostics mask for this module
 
Void Clock_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
XDCscript usage meta-domain sourced in ti/mcu/msp430/runtime/utils/Clock.xdc
var Clock = xdc.useModule('ti.mcu.msp430.runtime.utils.Clock');
module-wide constants & types
    const Clock.T0A3//  = 0x340;
    const Clock.T0A5//  = 0x340;
    const Clock.T0B7//  = 0x3d0;
    const Clock.T1A2//  = 0x180;
    const Clock.T1A3//  = 0x380;
    const Clock.T1A5//  = 0x380;
    const Clock.T2A3//  = 0x400;
    const Clock.TA2//  = 0x160;
    const Clock.TA3//  = 0x160;
    const Clock.TA5//  = 0x160;
    const Clock.TB3//  = 0x180;
    const Clock.TB7//  = 0x180;
 
        obj.CTL = Bits16  ...
        obj.CCTL = Bits16[7]  ...
        obj.R = Bits16  ...
        obj.CCR = Bits16[7]  ...
        obj.EX0 = Bits16  ...
        obj.IV = Bits16  ...
module-wide config parameters
 
 
 
const Clock.T0A3
XDCscript usage meta-domain
const Clock.T0A3 = 0x340;
 
C SYNOPSIS
 
const Clock.T0A5
XDCscript usage meta-domain
const Clock.T0A5 = 0x340;
 
C SYNOPSIS
 
const Clock.T0B7
XDCscript usage meta-domain
const Clock.T0B7 = 0x3d0;
 
C SYNOPSIS
 
const Clock.T1A2
XDCscript usage meta-domain
const Clock.T1A2 = 0x180;
 
C SYNOPSIS
 
const Clock.T1A3
XDCscript usage meta-domain
const Clock.T1A3 = 0x380;
 
C SYNOPSIS
 
const Clock.T1A5
XDCscript usage meta-domain
const Clock.T1A5 = 0x380;
 
C SYNOPSIS
 
const Clock.T2A3
XDCscript usage meta-domain
const Clock.T2A3 = 0x400;
 
C SYNOPSIS
 
const Clock.TA2
XDCscript usage meta-domain
const Clock.TA2 = 0x160;
 
C SYNOPSIS
 
const Clock.TA3
XDCscript usage meta-domain
const Clock.TA3 = 0x160;
 
C SYNOPSIS
 
const Clock.TA5
XDCscript usage meta-domain
const Clock.TA5 = 0x160;
 
C SYNOPSIS
 
const Clock.TB3
XDCscript usage meta-domain
const Clock.TB3 = 0x180;
 
C SYNOPSIS
 
const Clock.TB7
XDCscript usage meta-domain
const Clock.TB7 = 0x180;
 
C SYNOPSIS
 
struct Clock.TimerRegs

Timer peripheral register definition

XDCscript usage meta-domain
var obj = new Clock.TimerRegs;
 
    obj.CTL = Bits16  ...
    obj.CCTL = Bits16[7]  ...
    obj.R = Bits16  ...
    obj.CCR = Bits16[7]  ...
    obj.EX0 = Bits16  ...
    obj.IV = Bits16  ...
 
C SYNOPSIS
 
config Clock.TIMER  // module-wide

Base address of timer peripheral to use

XDCscript usage meta-domain
Clock.TIMER = Clock.TimerRegs* Clock.TB3;
 
DETAILS
Timer B on 2274
C SYNOPSIS
 
config Clock.fastClockKHz  // module-wide

Main System clock frequency (KHz)

XDCscript usage meta-domain
Clock.fastClockKHz = Int 8000;
 
C SYNOPSIS
 
config Clock.slowClockHz  // module-wide

Auxiliary clock frequency (Hz)

XDCscript usage meta-domain
Clock.slowClockHz = Int 12000;
 
C SYNOPSIS
 
metaonly config Clock.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
Clock.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, 10 Jul 2012 02:24:10 GMT