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

MSP430F2xx Family Flash Module

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
 
 
    values of type Flash_2xx.BUSY_t// Busy
        const Flash_2xx.BUSY_OFF// Not Busy;
        const Flash_2xx.BUSY// Busy;
 
 
 
    values of type Flash_2xx.EMEX_t// Emergency exit
        const Flash_2xx.EMEX// Emergency exit;
 
    values of type Flash_2xx.ERASE_t// Erase
        const Flash_2xx.ERASE_OFF// Erase disabled;
        const Flash_2xx.ERASE// Erase enabled;
 
    values of type Flash_2xx.FAIL_t// Operation failure
        const Flash_2xx.FAIL_OFF// No failure;
        const Flash_2xx.FAIL// Failure;
 
 
 
 
 
 
 
    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;
 
    values of type Flash_2xx.FWKEY_t// 
        const Flash_2xx.FWKEY_OFF;
        const Flash_2xx.FWKEY;
 
 
 
    values of type Flash_2xx.LOCK_t// Lock
        const Flash_2xx.LOCK_OFF// Unlocked;
        const Flash_2xx.LOCK// Locked;
 
    values of type Flash_2xx.MERAS_t// Mass erase
        const Flash_2xx.MERAS// Mass erase enabled;
 
    values of type Flash_2xx.WAIT_t// Wait
 
    values of type Flash_2xx.WRT_t// Write
        const Flash_2xx.WRT// Write mode is on;
 
    var obj = new Flash_2xx.FCTL1_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// ;
 
    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
        };
            FWKEY: IFlash.FWKEY,
            FSSEL: IFlash.FSSEL_1,
            FN5: IFlash.FN5_OFF,
            FN4: IFlash.FN4_OFF,
            FN3: IFlash.FN3_OFF,
            FN2: IFlash.FN2_OFF,
            FN1: IFlash.FN1,
            FN0: IFlash.FN0_OFF
        };
            FAIL: IFlash.FAIL_OFF,
            LOCKA: IFlash.LOCKA_OFF,
            EMEX: IFlash.EMEX_OFF,
            LOCK: IFlash.LOCK,
            WAIT: IFlash.WAIT,
            ACCVIFG: IFlash.ACCVIFG_OFF,
            KEYV: IFlash.KEYV_OFF,
            BUSY: IFlash.BUSY_OFF
        };
        params.clock//  = IClock.Instance undefined;
            {
                register: "FCTL1",
                regForceSet: false
            },
            {
                register: "FCTL2",
                regForceSet: false
            },
            {
                register: "FCTL3",
                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;
        params.uMaxFtg// Max Flash Timing Generator Value from Datasheet = UInt8 undefined;
        params.uMinFtg// Min Flash Timing Generator Value from Datasheet = UInt8 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;
    // No interrupt pending
    const Flash_2xx.ACCVIFG;
    // Interrupt pending
 
 
enum Flash_2xx.BLKWRT_t

Block write mode

XDCscript usage meta-domain
values of type Flash_2xx.BLKWRT_t
    const Flash_2xx.BLKWRT_OFF;
    // Block-write mode is off
    const Flash_2xx.BLKWRT;
    // Block-write mode is on
 
 
enum Flash_2xx.BUSY_t

Busy

XDCscript usage meta-domain
values of type Flash_2xx.BUSY_t
    const Flash_2xx.BUSY_OFF;
    // Not Busy
    const Flash_2xx.BUSY;
    // 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;
    // Exit interrupt disabled
    const Flash_2xx.EEIEX;
    // Exit interrupt enabled
 
 
enum Flash_2xx.EEI_t

Enable Erase Interrupts

XDCscript usage meta-domain
values of type Flash_2xx.EEI_t
    const Flash_2xx.EEI_OFF;
    // Interrupts during segment erase disabled
    const Flash_2xx.EEI;
    // Interrupts during segment erase enabled
 
 
enum Flash_2xx.EMEX_t

Emergency exit

XDCscript usage meta-domain
values of type Flash_2xx.EMEX_t
    const Flash_2xx.EMEX_OFF;
    // No emergency exit
    const Flash_2xx.EMEX;
    // Emergency exit
 
 
enum Flash_2xx.ERASE_t

Erase

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

Operation failure

XDCscript usage meta-domain
values of type Flash_2xx.FAIL_t
    const Flash_2xx.FAIL_OFF;
    // No failure
    const Flash_2xx.FAIL;
    // Failure
 
 
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;
    // Flash controller clock divider bit 0
    const Flash_2xx.FN0;
    // Flash controller clock divider bit 0
 
 
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;
    // Flash controller clock divider bit 1
    const Flash_2xx.FN1;
    // Flash controller clock divider bit 1
 
 
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;
    // Flash controller clock divider bit 2
    const Flash_2xx.FN2;
    // Flash controller clock divider bit 2
 
 
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;
    // Flash controller clock divider bit 3
    const Flash_2xx.FN3;
    // Flash controller clock divider bit 3
 
 
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;
    // Flash controller clock divider bit 4
    const Flash_2xx.FN4;
    // Flash controller clock divider bit 4
 
 
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;
    // Flash controller clock divider bit 5
    const Flash_2xx.FN5;
    // Flash controller clock divider bit 5
 
 
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
 
 
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;
    // FCTLx password was written correctly
    const Flash_2xx.KEYV;
    // FCTLx password was written incorrectly
 
 
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;
    // Segment A unlocked and all information memory is erased during a mass erase
    const Flash_2xx.LOCKA;
    // Segment A locked and all information memory is protected from erasure during a mass erase
 
 
enum Flash_2xx.LOCK_t

Lock

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

Mass erase

XDCscript usage meta-domain
values of type Flash_2xx.MERAS_t
    const Flash_2xx.MERAS_OFF;
    // Mass erase disabled
    const Flash_2xx.MERAS;
    // Mass erase enabled
 
 
enum Flash_2xx.WAIT_t

Wait

XDCscript usage meta-domain
values of type Flash_2xx.WAIT_t
    const Flash_2xx.WAIT_OFF;
    // The flash memory is not ready for the next byte/word write
    const Flash_2xx.WAIT;
    // The flash memory is ready for the next byte/word write
 
 
enum Flash_2xx.WRT_t

Write

XDCscript usage meta-domain
values of type Flash_2xx.WRT_t
    const Flash_2xx.WRT_OFF;
    // Write mode is off
    const Flash_2xx.WRT;
    // Write mode is on
 
 
struct Flash_2xx.FCTL1_t
XDCscript usage meta-domain
var obj = new Flash_2xx.FCTL1_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.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 Always read as 096h. Must be written as 0A5h or a PUC will be generated
    obj.FSSEL = Flash_2xx.FSSEL_t  ...
    // Flash controller clock source select 00 ACLK 01 MCLK 10 SMCLK 11 SMCLK
    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.FN2_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.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.FCTL2 = Flash_2xx.FCTL2_t {
    // Flash Memory Control Register 2
        FWKEY: IFlash.FWKEY,
        FSSEL: IFlash.FSSEL_1,
        FN5: IFlash.FN5_OFF,
        FN4: IFlash.FN4_OFF,
        FN3: IFlash.FN3_OFF,
        FN2: IFlash.FN2_OFF,
        FN1: IFlash.FN1,
        FN0: IFlash.FN0_OFF
    };
    params.FCTL3 = Flash_2xx.FCTL3_t {
    // Flash Memory Control Register 3
        FAIL: IFlash.FAIL_OFF,
        LOCKA: IFlash.LOCKA_OFF,
        EMEX: IFlash.EMEX_OFF,
        LOCK: IFlash.LOCK,
        WAIT: IFlash.WAIT,
        ACCVIFG: IFlash.ACCVIFG_OFF,
        KEYV: IFlash.KEYV_OFF,
        BUSY: IFlash.BUSY_OFF
    };
    params.clock = IClock.Instance undefined;
    // 
    params.forceSetDefaultRegister = Flash_2xx.ForceSetDefaultRegister_t[] [
    // Determine if each Register needs to be forced set or not
        {
            register: "FCTL1",
            regForceSet: false
        },
        {
            register: "FCTL2",
            regForceSet: false
        },
        {
            register: "FCTL3",
            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
    params.uMaxFtg = UInt8 undefined;
    // Max Flash Timing Generator Value from Datasheet
    params.uMinFtg = UInt8 undefined;
    // Min Flash Timing Generator Value from Datasheet
 
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.FCTL2  // instance

Flash Memory Control Register 2

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.FCTL2 = Flash_2xx.FCTL2_t {
    FWKEY: IFlash.FWKEY,
    FSSEL: IFlash.FSSEL_1,
    FN5: IFlash.FN5_OFF,
    FN4: IFlash.FN4_OFF,
    FN3: IFlash.FN3_OFF,
    FN2: IFlash.FN2_OFF,
    FN1: IFlash.FN1,
    FN0: IFlash.FN0_OFF
};
 
 
config Flash_2xx.FCTL3  // instance

Flash Memory Control Register 3

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.FCTL3 = Flash_2xx.FCTL3_t {
    FAIL: IFlash.FAIL_OFF,
    LOCKA: IFlash.LOCKA_OFF,
    EMEX: IFlash.EMEX_OFF,
    LOCK: IFlash.LOCK,
    WAIT: IFlash.WAIT,
    ACCVIFG: IFlash.ACCVIFG_OFF,
    KEYV: IFlash.KEYV_OFF,
    BUSY: IFlash.BUSY_OFF
};
 
 
config Flash_2xx.clock  // instance
XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.clock = IClock.Instance undefined;
 
 
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
    },
    {
        register: "FCTL2",
        regForceSet: false
    },
    {
        register: "FCTL3",
        regForceSet: false
    }
];
 
 
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;
 
 
config Flash_2xx.uMaxFtg  // instance

Max Flash Timing Generator Value from Datasheet

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.uMaxFtg = UInt8 undefined;
 
 
config Flash_2xx.uMinFtg  // instance

Min Flash Timing Generator Value from Datasheet

XDCscript usage meta-domain
var params = new Flash_2xx.Params;
  ...
params.uMinFtg = UInt8 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, 01 May 2012 02:42:12 GMT