metaonly module ti.catalog.msp430.peripherals.memory.Flash_2xx

MSP430 Flash 2xx

XDCscript usage meta-domain sourced in ti/catalog/msp430/peripherals/memory/Flash_2xx.xdc
var Flash_2xx = xdc.useModule('ti.catalog.msp430.peripherals.memory.Flash_2xx');
module-wide constants & types
        const Flash_2xx.ACCVIFG_OFF;
        const Flash_2xx.ACCVIFG;
        const Flash_2xx.BLKWRT_OFF;
        const Flash_2xx.BLKWRT;
    values of type Flash_2xx.BUSY_t// Busy
        const Flash_2xx.BUSY_OFF;
        const Flash_2xx.BUSY;
        const Flash_2xx.EEIEX_OFF;
        const Flash_2xx.EEIEX;
        const Flash_2xx.EEI_OFF;
        const Flash_2xx.EEI;
    values of type Flash_2xx.EMEX_t// Emergency exit
        const Flash_2xx.EMEX_OFF;
        const Flash_2xx.EMEX;
    values of type Flash_2xx.ERASE_t// Erase
        const Flash_2xx.ERASE_OFF;
        const Flash_2xx.ERASE;
    values of type Flash_2xx.FAIL_t// Operation failure
        const Flash_2xx.FAIL_OFF;
        const Flash_2xx.FAIL;
        const Flash_2xx.FN0_OFF;
        const Flash_2xx.FN0;
        const Flash_2xx.FN1_OFF;
        const Flash_2xx.FN1;
        const Flash_2xx.FN2_OFF;
        const Flash_2xx.FN2;
        const Flash_2xx.FN3_OFF;
        const Flash_2xx.FN3;
        const Flash_2xx.FN4_OFF;
        const Flash_2xx.FN4;
        const Flash_2xx.FN5_OFF;
        const Flash_2xx.FN5;
    values of type Flash_2xx.FSSEL_t// 
        const Flash_2xx.FSSEL_0// ACLK;
        const Flash_2xx.FSSEL_1// MCLK;
        const Flash_2xx.FSSEL_2// SMCLK;
        const Flash_2xx.FSSEL_3// SMCLK;
    values of type Flash_2xx.FWKEY_t// 
        const Flash_2xx.FWKEY_OFF;
        const Flash_2xx.FWKEY;
        const Flash_2xx.KEYV_OFF;
        const Flash_2xx.KEYV;
        const Flash_2xx.LOCKA_OFF;
        const Flash_2xx.LOCKA;
    values of type Flash_2xx.LOCK_t// Lock
        const Flash_2xx.LOCK_OFF;
        const Flash_2xx.LOCK;
    values of type Flash_2xx.MERAS_t// Mass erase
        const Flash_2xx.MERAS_OFF;
        const Flash_2xx.MERAS;
    values of type Flash_2xx.WAIT_t// Wait
        const Flash_2xx.WAIT_OFF;
        const Flash_2xx.WAIT;
    values of type Flash_2xx.WRT_t// Write
        const Flash_2xx.WRT_OFF;
        const Flash_2xx.WRT;
    var obj = new Flash_2xx.FCTL1_t// ;
        obj.FWKEY// FCTLx password = Flash_2xx.FWKEY_t  ...
        obj.BLKWRT// Block write mode = Flash_2xx.BLKWRT_t  ...
        obj.WRT// Write = Flash_2xx.WRT_t  ...
        obj.EEI// Enable Erase Interrupts = Flash_2xx.EEI_t  ...
        obj.MERAS// Mass erase = Flash_2xx.MERAS_t  ...
        obj.ERASE// Erase = Flash_2xx.ERASE_t  ...
    var obj = new Flash_2xx.FCTL2_t// ;
        obj.FWKEY// FCTLx password = Flash_2xx.FWKEY_t  ...
    var obj = new Flash_2xx.FCTL3_t// ;
        obj.register = String  ...
        obj.regForceSet = Bool  ...
module-wide functions
per-instance config parameters
    var params = new Flash_2xx.Params// Instance config-params object;
        FWKEY: IFlash.FWKEY,
        BLKWRT: IFlash.BLKWRT_OFF,
        WRT: IFlash.WRT_OFF,
        EEIEX: IFlash.EEIEX_OFF,
        EEI: IFlash.EEI_OFF,
        MERAS: IFlash.MERAS_OFF,
        ERASE: IFlash.ERASE_OFF
    };
        params.baseAddr// Address of the peripheral's control register = UInt undefined;
        {
            register: "FCTL1",
            regForceSet: false
        }
    ];
        params.intNum// Interrupt source number = UInt undefined;
        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 = Flash_2xx.create// Create an instance-object(IClock.Instance clock, params);
 
enum Flash_2xx.ACCVIFG_t

Access violation interrupt flag

XDCscript usage meta-domain
values of type Flash_2xx.ACCVIFG_t
    const Flash_2xx.ACCVIFG_OFF;
    const Flash_2xx.ACCVIFG;
enum Flash_2xx.BLKWRT_t

Block write mode

XDCscript usage meta-domain
values of type Flash_2xx.BLKWRT_t
    const Flash_2xx.BLKWRT_OFF;
    const Flash_2xx.BLKWRT;
enum Flash_2xx.BUSY_t

Busy

XDCscript usage meta-domain
values of type Flash_2xx.BUSY_t
    const Flash_2xx.BUSY_OFF;
    const Flash_2xx.BUSY;
enum Flash_2xx.EEIEX_t

Enable Emergency Interrupt Exit

XDCscript usage meta-domain
values of type Flash_2xx.EEIEX_t
    const Flash_2xx.EEIEX_OFF;
    const Flash_2xx.EEIEX;
enum Flash_2xx.EEI_t

Enable Erase Interrupts

XDCscript usage meta-domain
values of type Flash_2xx.EEI_t
    const Flash_2xx.EEI_OFF;
    const Flash_2xx.EEI;
enum Flash_2xx.EMEX_t

Emergency exit

XDCscript usage meta-domain
values of type Flash_2xx.EMEX_t
    const Flash_2xx.EMEX_OFF;
    const Flash_2xx.EMEX;
enum Flash_2xx.ERASE_t

Erase

XDCscript usage meta-domain
values of type Flash_2xx.ERASE_t
    const Flash_2xx.ERASE_OFF;
    const Flash_2xx.ERASE;
enum Flash_2xx.FAIL_t

Operation failure

XDCscript usage meta-domain
values of type Flash_2xx.FAIL_t
    const Flash_2xx.FAIL_OFF;
    const Flash_2xx.FAIL;
enum Flash_2xx.FN0_t

Flash controller clock divider bit 0

XDCscript usage meta-domain
values of type Flash_2xx.FN0_t
    const Flash_2xx.FN0_OFF;
    const Flash_2xx.FN0;
enum Flash_2xx.FN1_t

Flash controller clock divider bit 1

XDCscript usage meta-domain
values of type Flash_2xx.FN1_t
    const Flash_2xx.FN1_OFF;
    const Flash_2xx.FN1;
enum Flash_2xx.FN2_t

Flash controller clock divider bit 2

XDCscript usage meta-domain
values of type Flash_2xx.FN2_t
    const Flash_2xx.FN2_OFF;
    const Flash_2xx.FN2;
enum Flash_2xx.FN3_t

Flash controller clock divider bit 3

XDCscript usage meta-domain
values of type Flash_2xx.FN3_t
    const Flash_2xx.FN3_OFF;
    const Flash_2xx.FN3;
enum Flash_2xx.FN4_t

Flash controller clock divider bit 4

XDCscript usage meta-domain
values of type Flash_2xx.FN4_t
    const Flash_2xx.FN4_OFF;
    const Flash_2xx.FN4;
enum Flash_2xx.FN5_t

Flash controller clock divider bit 5

XDCscript usage meta-domain
values of type Flash_2xx.FN5_t
    const Flash_2xx.FN5_OFF;
    const Flash_2xx.FN5;
enum Flash_2xx.FSSEL_t
XDCscript usage meta-domain
values of type Flash_2xx.FSSEL_t
    const Flash_2xx.FSSEL_0;
    // ACLK
    const Flash_2xx.FSSEL_1;
    // MCLK
    const Flash_2xx.FSSEL_2;
    // SMCLK
    const Flash_2xx.FSSEL_3;
    // SMCLK
enum Flash_2xx.FWKEY_t
XDCscript usage meta-domain
values of type Flash_2xx.FWKEY_t
    const Flash_2xx.FWKEY_OFF;
    const Flash_2xx.FWKEY;
enum Flash_2xx.KEYV_t

Flash security key violation

XDCscript usage meta-domain
values of type Flash_2xx.KEYV_t
    const Flash_2xx.KEYV_OFF;
    const Flash_2xx.KEYV;
enum Flash_2xx.LOCKA_t

SegmentA and Info lock

XDCscript usage meta-domain
values of type Flash_2xx.LOCKA_t
    const Flash_2xx.LOCKA_OFF;
    const Flash_2xx.LOCKA;
enum Flash_2xx.LOCK_t

Lock

XDCscript usage meta-domain
values of type Flash_2xx.LOCK_t
    const Flash_2xx.LOCK_OFF;
    const Flash_2xx.LOCK;
enum Flash_2xx.MERAS_t

Mass erase

XDCscript usage meta-domain
values of type Flash_2xx.MERAS_t
    const Flash_2xx.MERAS_OFF;
    const Flash_2xx.MERAS;
enum Flash_2xx.WAIT_t

Wait

XDCscript usage meta-domain
values of type Flash_2xx.WAIT_t
    const Flash_2xx.WAIT_OFF;
    const Flash_2xx.WAIT;
enum Flash_2xx.WRT_t

Write

XDCscript usage meta-domain
values of type Flash_2xx.WRT_t
    const Flash_2xx.WRT_OFF;
    const Flash_2xx.WRT;
struct Flash_2xx.FCTL1_t
XDCscript usage meta-domain
var obj = new Flash_2xx.FCTL1_t;
 
    obj.FWKEY = Flash_2xx.FWKEY_t  ...
    // FCTLx password
    obj.BLKWRT = Flash_2xx.BLKWRT_t  ...
    // Block write mode
    obj.WRT = Flash_2xx.WRT_t  ...
    // Write
    obj.EEIEX = Flash_2xx.EEIEX_t  ...
    // Enable Emergency Interrupt Exit
    obj.EEI = Flash_2xx.EEI_t  ...
    // Enable Erase Interrupts
    obj.MERAS = Flash_2xx.MERAS_t  ...
    // Mass erase
    obj.ERASE = Flash_2xx.ERASE_t  ...
    // Erase
struct Flash_2xx.FCTL2_t
XDCscript usage meta-domain
var obj = new Flash_2xx.FCTL2_t;
 
    obj.FWKEY = Flash_2xx.FWKEY_t  ...
    // FCTLx password
    obj.FSSEL = Flash_2xx.FSSEL_t  ...
    // Flash controller clock source select
    obj.FN5 = Flash_2xx.FN5_t  ...
    // Flash controller clock divider bit 5
    obj.FN4 = Flash_2xx.FN4_t  ...
    // Flash controller clock divider bit 4
    obj.FN3 = Flash_2xx.FN3_t  ...
    // Flash controller clock divider bit 3
    obj.FN2 = Flash_2xx.FN3_t  ...
    // Flash controller clock divider bit 2
    obj.FN1 = Flash_2xx.FN1_t  ...
    // Flash controller clock divider bit 1
    obj.FN0 = Flash_2xx.FN0_t  ...
    // Flash controller clock divider bit 0
struct Flash_2xx.FCTL3_t
XDCscript usage meta-domain
var obj = new Flash_2xx.FCTL3_t;
 
    obj.FWKEY = Flash_2xx.FWKEY_t  ...
    // FCTLx password. Always read as 096h. Must be written as 0A5h or a PUC will be generated
    obj.FAIL = Flash_2xx.FAIL_t  ...
    // FAIL Bit 7 Operation failure. This bit is set if the fFTG clock source fails, or a flash operation is aborted from an interrupt when EEIEX = 1. FAIL must be reset with software. 0 No failure 1 Failure
    obj.LOCKA = Flash_2xx.LOCKA_t  ...
    // SegmentA and Info lock. Write a 1 to this bit to change its state. Writing 0 has no effect. 0 Segment A unlocked and all information memory is erased during a mass erase. 1 Segment A locked and all information memory is protected from erasure during a mass erase
    obj.EMEX = Flash_2xx.EMEX_t  ...
    // Emergency exit 0 No emergency exit 1 Emergency exit
    obj.LOCK = Flash_2xx.LOCK_t  ...
    // Lock. This bit unlocks the flash memory for writing or erasing. The LOCK bit can be set anytime during a byte/word write or erase operation and the operation will complete normally. In the block write mode if the LOCK bit is set while BLKWRT=WAIT=1, then BLKWRT and WAIT are reset and the mode ends normally. 0 Unlocked 1 Locked
    obj.WAIT = Flash_2xx.WAIT_t  ...
    // Wait. Indicates the flash memory is being written to. 0 The flash memory is not ready for the next byte/word write 1 The flash memory is ready for the next byte/word write
    obj.ACCVIFG = Flash_2xx.ACCVIFG_t  ...
    // Access violation interrupt flag 0 No interrupt pending 1 Interrupt pending
    obj.KEYV = Flash_2xx.KEYV_t  ...
    // Flash security key violation. This bit indicates an incorrect FCTLx password was written to any flash control register and generates a PUC when set. KEYV must be reset with software. 0 FCTLx password was written correctly 1 FCTLx password was written incorrectly
    obj.BUSY = Flash_2xx.BUSY_t  ...
    // Busy. This bit indicates the status of the flash timing generator. 0 Not Busy 1 Busy
struct Flash_2xx.ForceSetDefaultRegister_t

Force Set Default Register

XDCscript usage meta-domain
var obj = new Flash_2xx.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
Flash_2xx.addPeripheralsMap()  // module-wide

Create a map of all peripherals available on a device

XDCscript usage meta-domain
Flash_2xx.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.
Flash_2xx.getAll()  // module-wide

Find all peripherals of a certain type

XDCscript usage meta-domain
Flash_2xx.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
Flash_2xx.getRegisters()  // module-wide

Find all registers defined by the peripheral

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

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
// Instance config-params object
    params.FCTL1 = Flash_2xx.FCTL1_t {
    // Flash Memory Control Register 1
    FWKEY: IFlash.FWKEY,
    BLKWRT: IFlash.BLKWRT_OFF,
    WRT: IFlash.WRT_OFF,
    EEIEX: IFlash.EEIEX_OFF,
    EEI: IFlash.EEI_OFF,
    MERAS: IFlash.MERAS_OFF,
    ERASE: IFlash.ERASE_OFF
};
    params.baseAddr = UInt undefined;
    // Address of the peripheral's control register
    params.forceSetDefaultRegister = Flash_2xx.ForceSetDefaultRegister_t[] [
    // Determine if each Register needs to be forced set or not
    {
        register: "FCTL1",
        regForceSet: false
    }
];
    params.intNum = UInt undefined;
    // Interrupt source number
    params.name = String undefined;
    // Specific peripheral name given by the device
    params.owner = String undefined;
    // String specifying the entity that manages the peripheral
config Flash_2xx.FCTL1  // instance

Flash Memory Control Register 1

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.FCTL1 = Flash_2xx.FCTL1_t {
    FWKEY: IFlash.FWKEY,
    BLKWRT: IFlash.BLKWRT_OFF,
    WRT: IFlash.WRT_OFF,
    EEIEX: IFlash.EEIEX_OFF,
    EEI: IFlash.EEI_OFF,
    MERAS: IFlash.MERAS_OFF,
    ERASE: IFlash.ERASE_OFF
};
config Flash_2xx.baseAddr  // instance

Address of the peripheral's control register

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

Determine if each Register needs to be forced set or not

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
const params.forceSetDefaultRegister = Flash_2xx.ForceSetDefaultRegister_t[] [
    {
        register: "FCTL1",
        regForceSet: false
    }
];
config Flash_2xx.intNum  // instance

Interrupt source number

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.intNum = UInt undefined;
config Flash_2xx.name  // instance

Specific peripheral name given by the device

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

String specifying the entity that manages the peripheral

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

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = Flash_2xx.create(IClock.Instance clock, params);
// Create an instance-object
generated on Tue, 24 Aug 2010 15:40:47 GMT