metaonly module ti.catalog.msp430.peripherals.oa.OA_3

MSP430 General Purpose Operational Amplifier

XDCscript usage meta-domain sourced in ti/catalog/msp430/peripherals/oa/OA_3.xdc
var OA_3 = xdc.useModule('ti.catalog.msp430.peripherals.oa.OA_3');
module-wide constants & types
    values of type OA_3.OAADC0_t// 
        const OA_3.OAADC0_OFF;
        const OA_3.OAADC0;
    values of type OA_3.OAADC1_t// 
        const OA_3.OAADC1_OFF;
        const OA_3.OAADC1;
        const OA_3.OAFBR_0;
        const OA_3.OAFBR_1;
        const OA_3.OAFBR_2;
        const OA_3.OAFBR_3;
        const OA_3.OAFBR_4;
        const OA_3.OAFBR_5;
        const OA_3.OAFBR_6;
        const OA_3.OAFBR_7;
    values of type OA_3.OAFC_t// OAx function control
        const OA_3.OAFC_0;
        const OA_3.OAFC_1;
        const OA_3.OAFC_2;
        const OA_3.OAFC_3;
        const OA_3.OAFC_4;
        const OA_3.OAFC_5;
        const OA_3.OAFC_6;
        const OA_3.OAFC_7;
    values of type OA_3.OANEXT_t// 
        const OA_3.OANEXT_OFF;
        const OA_3.OANEXT;
        const OA_3.OAN_0// OAxI0;
        const OA_3.OAN_1// OAxI1;
    values of type OA_3.OAPM_t// Slew rate select
        const OA_3.OAP_0// OAxI0;
        const OA_3.OAP_1// OAxI1;
    values of type OA_3.OARRIP_t// 
        const OA_3.OARRIP_OFF;
        const OA_3.OARRIP;
        obj.register = String  ...
        obj.regForceSet = Bool  ...
module-wide functions
per-instance config parameters
    var params = new OA_3.Params// Instance config-params object;
        OAN: IOA.OAN_0,
        OAP: IOA.OAP_0,
        OAPM: IOA.OAPM_0,
        OAADC0: IOA.OAADC0_OFF,
        OAADC1: IOA.OAADC1_OFF
    };
        OAFBR: IOA.OAFBR_0,
        OAFC: IOA.OAFC_0,
        OANEXT: IOA.OANEXT_OFF,
        OARRIP: IOA.OARRIP_OFF
    };
        OAN: IOA.OAN_0,
        OAP: IOA.OAP_0,
        OAPM: IOA.OAPM_0,
        OAADC0: IOA.OAADC0_OFF,
        OAADC1: IOA.OAADC1_OFF
    };
        OAFBR: IOA.OAFBR_0,
        OAFC: IOA.OAFC_0,
        OANEXT: IOA.OANEXT_OFF,
        OARRIP: IOA.OARRIP_OFF
    };
        OAN: IOA.OAN_0,
        OAP: IOA.OAP_0,
        OAPM: IOA.OAPM_0,
        OAADC0: IOA.OAADC0_OFF,
        OAADC1: IOA.OAADC1_OFF
    };
        OAFBR: IOA.OAFBR_0,
        OAFC: IOA.OAFC_0,
        OANEXT: IOA.OANEXT_OFF,
        OARRIP: IOA.OARRIP_OFF
    };
        {
            register: "OA0CTL0",
            regForceSet: false
        },
        {
            register: "OA0CTL1",
            regForceSet: false
        },
        {
            register: "OA1CTL0",
            regForceSet: false
        },
        {
            register: "OA1CTL1",
            regForceSet: false
        },
        {
            register: "OA2CTL0",
            regForceSet: false
        },
        {
            register: "OA2CTL1",
            regForceSet: false
        }
    ];
        params.name// Specific peripheral name given by the device = String undefined;
        params.owner// String specifying the entity that manages the peripheral = String undefined;
per-instance creation
    var inst = OA_3.create// Create an instance-object(params);
per-instance functions
 
enum OA_3.OAADC0_t
XDCscript usage meta-domain
values of type OA_3.OAADC0_t
    const OA_3.OAADC0_OFF;
    const OA_3.OAADC0;
enum OA_3.OAADC1_t
XDCscript usage meta-domain
values of type OA_3.OAADC1_t
    const OA_3.OAADC1_OFF;
    const OA_3.OAADC1;
enum OA_3.OAFBR_t

OAx feedback resistor select

XDCscript usage meta-domain
values of type OA_3.OAFBR_t
    const OA_3.OAFBR_0;
    const OA_3.OAFBR_1;
    const OA_3.OAFBR_2;
    const OA_3.OAFBR_3;
    const OA_3.OAFBR_4;
    const OA_3.OAFBR_5;
    const OA_3.OAFBR_6;
    const OA_3.OAFBR_7;
enum OA_3.OAFC_t

OAx function control

XDCscript usage meta-domain
values of type OA_3.OAFC_t
    const OA_3.OAFC_0;
    const OA_3.OAFC_1;
    const OA_3.OAFC_2;
    const OA_3.OAFC_3;
    const OA_3.OAFC_4;
    const OA_3.OAFC_5;
    const OA_3.OAFC_6;
    const OA_3.OAFC_7;
enum OA_3.OANEXT_t
XDCscript usage meta-domain
values of type OA_3.OANEXT_t
    const OA_3.OANEXT_OFF;
    const OA_3.OANEXT;
enum OA_3.OAN_t

Inverting input selection

XDCscript usage meta-domain
values of type OA_3.OAN_t
    const OA_3.OAN_0;
    // OAxI0
    const OA_3.OAN_1;
    // OAxI1
    const OA_3.OAN_2;
    // OAxIA (see the device-specific data sheet for connected signal)
    const OA_3.OAN_3;
    // OAxIB (see the device-specific data sheet for connected signal)
enum OA_3.OAPM_t

Slew rate select

XDCscript usage meta-domain
values of type OA_3.OAPM_t
    const OA_3.OAPM_0;
    // OAx Power mode select: Off, output high Z
    const OA_3.OAPM_1;
    // OAx Power mode select: Slow
    const OA_3.OAPM_2;
    // OAx Power mode select: Medium
    const OA_3.OAPM_3;
    // OAx Power mode select: Fast
enum OA_3.OAP_t

Non-inverting input selection

XDCscript usage meta-domain
values of type OA_3.OAP_t
    const OA_3.OAP_0;
    // OAxI0
    const OA_3.OAP_1;
    // OAxI1
    const OA_3.OAP_2;
    // OAxIA (see the device-specific data sheet for connected signal)
    const OA_3.OAP_3;
    // OAxIB (see the device-specific data sheet for connected signal)
enum OA_3.OARRIP_t
XDCscript usage meta-domain
values of type OA_3.OARRIP_t
    const OA_3.OARRIP_OFF;
    const OA_3.OARRIP;
struct OA_3.ForceSetDefaultRegister_t

Force Set Default Register

XDCscript usage meta-domain
var obj = new OA_3.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
struct OA_3.OAxCTL0_t

Opamp Control Register 0 Definition

XDCscript usage meta-domain
var obj = new OA_3.OAxCTL0_t;
 
    obj.OAN = IOA.OAN_t  ...
    // Inverting input select. These bits select the input signal for the OA inverting input. 00 OAxI0 01 OAxI1 10 OAxIA (see the device-specific data sheet for connected signal) 11 OAxIB (see the device-specific data sheet for connected signal)
    obj.OAP = IOA.OAP_t  ...
    // Non-inverting input select. These bits select the input signal for the OA non-inverting input. 00 OAxI0 01 OA0I1 10 OAxIA (see the device-specific data sheet for connected signal) 11 OAxIB (see the device-specific data sheet for connected signal)
    obj.OAPM = IOA.OAPM_t  ...
    // Slew rate select. These bits select the slew rate vs. current consumption for the OA. 00 Off, output high Z 01 Slow 10 Medium 11 Fast
    obj.OAADC0 = IOA.OAADC0_t  ...
    // OA output select. These bits, together with the OAFCx bits, control the routing of the OAx output when OAPMx > 0. When OAFCx = 0: 00 OAxOUT connected to external pins and ADC input A1, A3, or A5 01 OAxOUT connected to external pins and ADC input A12, A13, or A14 10 OAxOUT connected to external pins and ADC input A1, A3, or A5 11 OAxOUT connected to external pins and ADC input A12, A13, or A14 When OAFCx > 0: 00 OAxOUT used for internal routing only 01 OAxOUT connected to external pins and ADC input A12, A13, or A14 10 OAxOUT connected to external pins and ADC input A1, A3, or A5 11 OAxOUT connected internally to ADC input A12, A13 , or A14. External A12, A13, or A14 pin connections are disconnected from the ADC
    obj.OAADC1 = IOA.OAADC1_t  ...
    // OA output select. These bits, together with the OAFCx bits, control the routing of the OAx output when OAPMx > 0. When OAFCx = 0: 00 OAxOUT connected to external pins and ADC input A1, A3, or A5 01 OAxOUT connected to external pins and ADC input A12, A13, or A14 10 OAxOUT connected to external pins and ADC input A1, A3, or A5 11 OAxOUT connected to external pins and ADC input A12, A13, or A14 When OAFCx > 0: 00 OAxOUT used for internal routing only 01 OAxOUT connected to external pins and ADC input A12, A13, or A14 10 OAxOUT connected to external pins and ADC input A1, A3, or A5 11 OAxOUT connected internally to ADC input A12, A13 , or A14. External A12, A13, or A14 pin connections are disconnected from the ADC
SEE
struct OA_3.OAxCTL1_t

Opamp Control Register 1 Definition

XDCscript usage meta-domain
var obj = new OA_3.OAxCTL1_t;
 
    obj.OAFBR = IOA.OAFBR_t  ...
    // OAx feedback resistor select 000 Tap 0 - 0R/16R 001 Tap 1 - 4R/12R 010 Tap 2 - 8R/8R 011 Tap 3 - 10R/6R 100 Tap 4 - 12R/4R 101 Tap 5 - 13R/3R 110 Tap 6 - 14R/2R 111 Tap 7 - 15R/1R
    obj.OAFC = IOA.OAFC_t  ...
    // OAx function control. This bit selects the function of OAx 000 General purpose opamp 001 Unity gain buffer for three-opamp differential amplifier 010 Unity gain buffer 011 Comparator 100 Non-inverting PGA amplifier 101 Cascaded non-inverting PGA amplifier 110 Inverting PGA amplifier 111 Differential amplifier
    obj.OANEXT = IOA.OANEXT_t  ...
    // OAx inverting input externally available. This bit, when set, connects the inverting OAx input to the external pin when the integrated resistor network is used. 0 OAx inverting input not externally available 1 OAx inverting input externally available
    obj.OARRIP = IOA.OARRIP_t  ...
    // OAx reverse resistor connection in comparator mode 0 RTOP is connected to AVSS and RBOTTOM is connected to AVCC when OAFCx = 3 1 RTOP is connected to AVCC and RBOTTOM is connected to AVSS when OAFCx = 3
SEE
OA_3.addPeripheralsMap()  // module-wide

Create a map of all peripherals available on a device

XDCscript usage meta-domain
OA_3.addPeripheralsMap(ICpuDataSheet.Instance cds) returns Void
ARGUMENTS
cds — an xdc.platform.ICpuDataSheet instance
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.
OA_3.getAll()  // module-wide

Find all peripherals of a certain type

XDCscript usage meta-domain
OA_3.getAll() returns IPeripheral.Instance[]
DETAILS
The type of the peripherals returned is defined by the type of the caller.
RETURNS
Returns an array of IPeripheral instances
OA_3.getRegisters()  // module-wide

Find all registers defined by the peripheral

XDCscript usage meta-domain
OA_3.getRegisters() returns String[]
RETURNS
Returns an array of register names
Instance Config Parameters

XDCscript usage meta-domain
var params = new OA_3.Params;
// Instance config-params object
    params.OA0CTL0 = OA_3.OAxCTL0_t {
    // OA0 control register 0
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
    params.OA0CTL1 = OA_3.OAxCTL1_t {
    // OA0 control register 1
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
    params.OA1CTL0 = OA_3.OAxCTL0_t {
    // OA1 control register 0
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
    params.OA1CTL1 = OA_3.OAxCTL1_t {
    // OA1 control register 1
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
    params.OA2CTL0 = OA_3.OAxCTL0_t {
    // OA2 control register 0
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
    params.OA2CTL1 = OA_3.OAxCTL1_t {
    // OA2 control register 1
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
    params.forceSetDefaultRegister = OA_3.ForceSetDefaultRegister_t[] [
    // Determine if each Register needs to be forced set or not
    {
        register: "OA0CTL0",
        regForceSet: false
    },
    {
        register: "OA0CTL1",
        regForceSet: false
    },
    {
        register: "OA1CTL0",
        regForceSet: false
    },
    {
        register: "OA1CTL1",
        regForceSet: false
    },
    {
        register: "OA2CTL0",
        regForceSet: false
    },
    {
        register: "OA2CTL1",
        regForceSet: false
    }
];
    params.name = String undefined;
    // Specific peripheral name given by the device
    params.owner = String undefined;
    // String specifying the entity that manages the peripheral
config OA_3.OA0CTL0  // instance

OA0 control register 0

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA0CTL0 = OA_3.OAxCTL0_t {
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
config OA_3.OA0CTL1  // instance

OA0 control register 1

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA0CTL1 = OA_3.OAxCTL1_t {
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
config OA_3.OA1CTL0  // instance

OA1 control register 0

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA1CTL0 = OA_3.OAxCTL0_t {
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
config OA_3.OA1CTL1  // instance

OA1 control register 1

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA1CTL1 = OA_3.OAxCTL1_t {
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
config OA_3.OA2CTL0  // instance

OA2 control register 0

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA2CTL0 = OA_3.OAxCTL0_t {
    OAN: IOA.OAN_0,
    OAP: IOA.OAP_0,
    OAPM: IOA.OAPM_0,
    OAADC0: IOA.OAADC0_OFF,
    OAADC1: IOA.OAADC1_OFF
};
config OA_3.OA2CTL1  // instance

OA2 control register 1

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.OA2CTL1 = OA_3.OAxCTL1_t {
    OAFBR: IOA.OAFBR_0,
    OAFC: IOA.OAFC_0,
    OANEXT: IOA.OANEXT_OFF,
    OARRIP: IOA.OARRIP_OFF
};
config OA_3.forceSetDefaultRegister  // instance

Determine if each Register needs to be forced set or not

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
const params.forceSetDefaultRegister = OA_3.ForceSetDefaultRegister_t[] [
    {
        register: "OA0CTL0",
        regForceSet: false
    },
    {
        register: "OA0CTL1",
        regForceSet: false
    },
    {
        register: "OA1CTL0",
        regForceSet: false
    },
    {
        register: "OA1CTL1",
        regForceSet: false
    },
    {
        register: "OA2CTL0",
        regForceSet: false
    },
    {
        register: "OA2CTL1",
        regForceSet: false
    }
];
config OA_3.name  // instance

Specific peripheral name given by the device

XDCscript usage meta-domain
var params = new OA_3.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 OA_3.owner  // instance

String specifying the entity that manages the peripheral

XDCscript usage meta-domain
var params = new OA_3.Params;
  ...
params.owner = String undefined;
Instance Creation

XDCscript usage meta-domain
var params = new OA_3.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = OA_3.create(params);
// Create an instance-object
OA_3.getNumberOfOA()  // instance

Returns the number of available OA

XDCscript usage meta-domain
inst.getNumberOfOA() returns UChar
generated on Tue, 24 Aug 2010 15:40:47 GMT