enum Clock2xx.DCO0_t |
|
DCO0 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.DCO0_t
const Clock2xx.DCO0_OFF;
// Disable DCO0 bit
const Clock2xx.DCO0;
// Enable DCO0 bit
enum Clock2xx.DCO1_t |
|
DCO1 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.DCO1_t
const Clock2xx.DCO1_OFF;
// Disable DCO1 bit
const Clock2xx.DCO1;
// Enable DCO1 bit
enum Clock2xx.DCO2_t |
|
DCO2 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.DCO2_t
const Clock2xx.DCO2_OFF;
// Disable DCO2 bit
const Clock2xx.DCO2;
// Enable DCO2 bit
enum Clock2xx.DCOR_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.DCOR_t
const Clock2xx.DCOR_OFF;
// DCO uses internal resistor
const Clock2xx.DCOR;
// DCO uses external resistor
enum Clock2xx.DIVA_t |
|
ACLK Divider values
XDCscript usage |
meta-domain |
values of type Clock2xx.DIVA_t
const Clock2xx.DIVA_0;
// Divide by 1
const Clock2xx.DIVA_1;
// Divide by 2
const Clock2xx.DIVA_2;
// Divide by 4
const Clock2xx.DIVA_3;
// Divide by 8
enum Clock2xx.DIVM_t |
|
MCLK Divider values
XDCscript usage |
meta-domain |
values of type Clock2xx.DIVM_t
const Clock2xx.DIVM_0;
// Divide by 1
const Clock2xx.DIVM_1;
// Divide by 2
const Clock2xx.DIVM_2;
// Divide by 4
const Clock2xx.DIVM_3;
// Divide by 8
enum Clock2xx.DIVS_t |
|
SMCLK Divider values
XDCscript usage |
meta-domain |
values of type Clock2xx.DIVS_t
const Clock2xx.DIVS_0;
// Divide by 1
const Clock2xx.DIVS_1;
// Divide by 2
const Clock2xx.DIVS_2;
// Divide by 4
const Clock2xx.DIVS_3;
// Divide by 8
enum Clock2xx.LFXT1OF_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.LFXT1OF_t
const Clock2xx.LFXT1OF_OFF;
// No fault condition present
const Clock2xx.LFXT1OF;
// LFXT1 fault condition present
enum Clock2xx.LFXT1S_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.LFXT1S_t
const Clock2xx.LFXT1S_0;
// XTS = 0, 32768kHz Crystal ; XTS = 1, 0.4 - 1-MHz crystal or resonator
const Clock2xx.LFXT1S_1;
// XTS = 0, Reserved ; XTS = 1, 1 - 3-MHz crystal or resonator
const Clock2xx.LFXT1S_2;
// XTS = 0, VLOCLK ; XTS = 1, 3 - 16-MHz crystal or resonator
const Clock2xx.LFXT1S_3;
// XTS = 0, Digital External ; XTS = 1, 0.4 - 16-MHz Digital External
enum Clock2xx.MOD0_t |
|
MOD0 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.MOD0_t
const Clock2xx.MOD0_OFF;
// Disable MOD0 bit
const Clock2xx.MOD0;
// Enable MOD0 bit
enum Clock2xx.MOD1_t |
|
MOD1 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.MOD1_t
const Clock2xx.MOD1_OFF;
// Disable MOD1 bit
const Clock2xx.MOD1;
// Enable MOD1 bit
enum Clock2xx.MOD2_t |
|
MOD2 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.MOD2_t
const Clock2xx.MOD2_OFF;
// Disable MOD2 bit
const Clock2xx.MOD2;
// Enable MOD2 bit
enum Clock2xx.MOD3_t |
|
MOD3 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.MOD3_t
const Clock2xx.MOD3_OFF;
// Disable MOD3 bit
const Clock2xx.MOD3;
// Enable MOD3 bit
enum Clock2xx.MOD4_t |
|
MOD4 Bit
XDCscript usage |
meta-domain |
values of type Clock2xx.MOD4_t
const Clock2xx.MOD4_OFF;
// Disable MOD4 bit
const Clock2xx.MOD4;
// Enable MOD4 bit
enum Clock2xx.PreCalibratedValues_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.PreCalibratedValues_t
const Clock2xx.PreCal_0;
// 1 MHz
const Clock2xx.PreCal_1;
// 8 MHz
const Clock2xx.PreCal_2;
// 12 MHz
const Clock2xx.PreCal_3;
// 16 MHz
const Clock2xx.PreCal_4;
// Custom
enum Clock2xx.RSEL0_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.RSEL0_t
const Clock2xx.RSEL0_OFF;
// Disable RSEL0 bit
const Clock2xx.RSEL0;
// Enable RSEL0 bit
enum Clock2xx.RSEL1_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.RSEL1_t
const Clock2xx.RSEL1_OFF;
// Disable RSEL1 bit
const Clock2xx.RSEL1;
// Enable RSEL1 bit
enum Clock2xx.RSEL2_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.RSEL2_t
const Clock2xx.RSEL2_OFF;
// Disable RSEL2 bit
const Clock2xx.RSEL2;
// Enable RSEL2 bit
enum Clock2xx.RSEL3_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.RSEL3_t
const Clock2xx.RSEL3_OFF;
// Disable RSEL3 bit
const Clock2xx.RSEL3;
// Enable RSEL3 bit
enum Clock2xx.SELM_t |
|
MCLK Source Select
XDCscript usage |
meta-domain |
values of type Clock2xx.SELM_t
const Clock2xx.SELM_0;
// DCOCLK
const Clock2xx.SELM_2;
// XT2CLK/LFXTCLK
const Clock2xx.SELM_3;
// LFXTCLK
enum Clock2xx.SELS_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.SELS_t
const Clock2xx.SELS_OFF;
// DCOCLK
const Clock2xx.SELS;
// XT2CLK
enum Clock2xx.XCAP_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.XCAP_t
const Clock2xx.XCAP_0;
// ~1 pF
const Clock2xx.XCAP_1;
// ~6 pF
const Clock2xx.XCAP_2;
// ~10 pF
const Clock2xx.XCAP_3;
// ~12.5 pF
enum Clock2xx.XT2OFF_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.XT2OFF_t
const Clock2xx.XT2OFF_OFF;
// Enable XT2CLK
const Clock2xx.XT2OFF;
// Disable XT2CLK
enum Clock2xx.XT2OF_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.XT2OF_t
const Clock2xx.XT2OF_OFF;
// No fault condition present
const Clock2xx.XT2OF;
// XT2 fault condition present
enum Clock2xx.XT2S_t |
|
XT2 frequency range select
XDCscript usage |
meta-domain |
values of type Clock2xx.XT2S_t
const Clock2xx.XT2S_0;
// 0.4 - 1 MHz
const Clock2xx.XT2S_1;
// 1 - 3 MHz
const Clock2xx.XT2S_2;
// 3 - 16 MHz
const Clock2xx.XT2S_3;
// Digital input signal
enum Clock2xx.XTS_t |
|
XDCscript usage |
meta-domain |
values of type Clock2xx.XTS_t
const Clock2xx.XTS_OFF;
// Low Frequency
const Clock2xx.XTS;
// High Frequency
struct Clock2xx.BCSCTL1_t |
|
BCS Control Register 1
XDCscript usage |
meta-domain |
var obj = new Clock2xx.BCSCTL1_t;
// XT2 off. This bit turns off the XT2 oscillator
0 XT2 is on
1 XT2 is off if it is not used for MCLK or SMCLK
// LFXT1 mode select.
0 Low frequency mode
1 High frequency mode
// Divider for ACLK
00 /1
01 /2
10 /4
11 /8
// Range select bit 0
// Range select bit 1
// Range select bit 2
// Range select bit 3
FIELDS
XT2OFF
This bit turns off the XT2 oscillator: 0 - XT2 is on,
1 - XT2 is off if it is not used for MCLK or SMCLK
XTS
0 - Low frequency mode; 1 - High frequency mode
struct Clock2xx.BCSCTL2_t |
|
BCS Control Register 2
XDCscript usage |
meta-domain |
var obj = new Clock2xx.BCSCTL2_t;
// Select MCLK. These bits select the MCLK source.
00 DCOCLK
01 DCOCLK
10 XT2CLK when XT2 oscillator present on-chip. LFXT1CLK or VLOCLK
when XT2 oscillator not present on-chip.
11 LFXT1CLK or VLOCLK
// Divider for MCLK
00 /1
01 /2
10 /4
11 /8
// Select SMCLK. This bit selects the SMCLK source.
0 DCOCLK
1 XT2CLK when XT2 oscillator present. LFXT1CLK or VLOCLK when
XT2 oscillator not present
// Divider for SMCLK
00 /1
01 /2
10 /4
11 /8
// DCO resistor select
0 Internal resistor
1 External resistor
FIELDS
SELM
These bits select the MCLK source.
SELS
These bits select the SMCLK source. When
XT2 oscillator present, 0 selects DCOCLK and
1 selects XT2CLK; otherwise 0 selects LFXT1CLK and
1 selects VLOCLK.
DCOR
0 - Internal resistor, 1 - external resistor
struct Clock2xx.BCSCTL3_t |
|
BCS Control register 3
XDCscript usage |
meta-domain |
var obj = new Clock2xx.BCSCTL3_t;
// XT2 range select. These bits select the frequency range for XT2.
00 0.4 - 1-MHz crystal or resonator
01 1 - 3-MHz crystal or resonator
10 3 - 16-MHz crystal or resonator
11 Digital external 0.4 - 16-MHz clock source
// Low-frequency clock select and LFXT1 range select. These bits select
between LFXT1 and VLO when XTS = 0, and select the frequency range
for LFXT1 when XTS = 1
// Oscillator capacitor selection. These bits select the effective capacitance
seen by the LFXT1 crystal when XTS = 0. If XTS = 1 or if LFCT1Sx = 11
XCAPx should be 00.
00 ~1 pF
01 ~6 pF
10 ~10 pF
11 ~12.5 pF
// XT2 oscillator fault
0 No fault condition present
1 Fault condition present
// LFXT1 oscillator fault
0 No fault condition present
1 Fault condition present
FIELDS
LFXT1S
These bits select between LFXT1 and VLO and XTS = 0,
and select the frequency range for LFXT1 when XTS = 1
XCAP
These bits select the effective capacitance seen by
the LFXT1 crystal when XTS = 0. If XTS = 1 or if
LFCT1Sx = 11, then XCAPx should be 00.
struct Clock2xx.DCOCTL_t |
|
XDCscript usage |
meta-domain |
var obj = new Clock2xx.DCOCTL_t;
// Modulation Bit 0
// Modulation Bit 1
// Modulation Bit 2
// Modulation Bit 3
// Modulation Bit 4
// DCO Select Bit 0
// DCO Select Bit 1
// DCO Select Bit 2
struct Clock2xx.ForceSetDefaultRegister_t |
|
Force Set Default Register
XDCscript usage |
meta-domain |
var obj = new Clock2xx.ForceSetDefaultRegister_t;
obj.register = String ...
obj.regForceSet = Bool ...
DETAILS
Type to store if each register needs to be forced initialized
even if the register is in default state.
SEE
Clock2xx.addPeripheralsMap() // module-wide |
|
Create a map of all peripherals available on a device
XDCscript usage |
meta-domain |
ARGUMENTS
DETAILS
The config parameter
peripherals is by default undefined in an
xdc.platform.ICpuDataSheet instance. This function gathers
all instance configuration parameters that are of the type
xdc.platform.IPeripheral into the map
peripherals.
Clock2xx.getAll() // module-wide |
|
Find all peripherals of a certain type
XDCscript usage |
meta-domain |
DETAILS
The type of the peripherals returned is defined by the type of the
caller.
RETURNS
Returns an array of IPeripheral instances
Clock2xx.getRegisters() // module-wide |
|
Find all registers defined by the peripheral
XDCscript usage |
meta-domain |
Clock2xx.getRegisters() returns String[]
RETURNS
Returns an array of register names
Instance Config Parameters |
|
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
// Instance config-params object
params.ACLKHz = Float undefined;
// Stores ACLK as frequency in float
// Basic Clock System Control 1
};
// Basic Clock System Control 2
};
// Basic Clock System Control 3
};
params.DCOCLKHz = Float 1000000;
// Stores the DCO clock frequency in float
// DCO Clock Frequency Control
};
params.LFXT1CLKHz = Float 0;
//
params.MCLKHz = Float undefined;
// Stores MCLK as frequency in float
params.SMCLKHz = Float undefined;
// Stores SMCLK as frequency in float
params.VLOCLKHz = Float 12000;
//
params.WATCHCRYSTALCLKHz = Float 32768;
//
params.XT2CLKHz = Float 0;
//
params.baseAddr = UInt undefined;
// Address of the peripheral's control register
// Determine if each Register needs to be forced set or not
{
register: "DCOCTL",
regForceSet: false
},
{
register: "BCSCTL1",
regForceSet: false
},
{
register: "BCSCTL2",
regForceSet: false
},
{
register: "BCSCTL3",
regForceSet: false
}
];
params.hasXT2 = Bool false;
// Set whether XT2 is available on the device
params.name = String undefined;
// Specific peripheral name given by the device
params.owner = String undefined;
// String specifying the entity that manages the peripheral
// Basic Clock System 2xx pre-calibrated system frequency
config Clock2xx.ACLKHz // instance |
|
Stores ACLK as frequency in float
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
const params.ACLKHz = Float computed value;
config Clock2xx.BCSCTL1 // instance |
|
Basic Clock System Control 1
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
};
config Clock2xx.BCSCTL2 // instance |
|
Basic Clock System Control 2
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
};
config Clock2xx.BCSCTL3 // instance |
|
Basic Clock System Control 3
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
};
config Clock2xx.DCOCLKHz // instance |
|
Stores the DCO clock frequency in float
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
const params.DCOCLKHz = Float 1000000;
config Clock2xx.DCOCTL // instance |
|
DCO Clock Frequency Control
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
};
config Clock2xx.LFXT1CLKHz // instance |
|
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.LFXT1CLKHz = Float 0;
config Clock2xx.MCLKHz // instance |
|
Stores MCLK as frequency in float
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
const params.MCLKHz = Float computed value;
config Clock2xx.SMCLKHz // instance |
|
Stores SMCLK as frequency in float
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
const params.SMCLKHz = Float computed value;
config Clock2xx.VLOCLKHz // instance |
|
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.VLOCLKHz = Float 12000;
config Clock2xx.WATCHCRYSTALCLKHz // instance |
|
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.WATCHCRYSTALCLKHz = Float 32768;
config Clock2xx.XT2CLKHz // instance |
|
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.XT2CLKHz = Float 0;
config Clock2xx.baseAddr // instance |
|
Address of the peripheral's control register
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.baseAddr = UInt undefined;
DETAILS
A peripheral's registers are commonly accessed through a structure
that defines the offsets of a particular register from the lowest
address mapped to a peripheral. That lowest address is specified by
this parameter.
config Clock2xx.forceSetDefaultRegister // instance |
|
Determine if each Register needs to be forced set or not
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
{
register: "DCOCTL",
regForceSet: false
},
{
register: "BCSCTL1",
regForceSet: false
},
{
register: "BCSCTL2",
regForceSet: false
},
{
register: "BCSCTL3",
regForceSet: false
}
];
config Clock2xx.hasXT2 // instance |
|
Set whether XT2 is available on the device
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.hasXT2 = Bool false;
config Clock2xx.name // instance |
|
Specific peripheral name given by the device
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.name = String undefined;
DETAILS
Devices can have more than one peripheral of the same type. In such
cases, device data sheets give different names to the instances of a
same peripheral. For example, the name for a timer module could be
TimerA3, and a device that has two such timers can name them TA0
and TA1.
config Clock2xx.owner // instance |
|
String specifying the entity that manages the peripheral
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
params.owner = String undefined;
config Clock2xx.preCalibratedValues // instance |
|
Basic Clock System 2xx pre-calibrated system frequency
XDCscript usage |
meta-domain |
var params = new Clock2xx.Params;
...
Instance Creation |
|
XDCscript usage |
meta-domain |
var params =
new Clock2xx.
Params;
// Allocate instance config-params
params.config = ...
// Assign individual configs
var inst = Clock2xx.
create(
IE1.Instance interruptEnableRegister1, params);
// Create an instance-object
Clock2xx.computeDCOCLKHz() // instance |
|
Initialize to the nearest available DCO clock frequency
XDCscript usage |
meta-domain |
inst.computeDCOCLKHz(Float DCOCLKHz) returns Void