|
@@ -20,7 +20,6 @@ const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
const I2C1 = I2C.addInstance();
|
|
const I2C1 = I2C.addInstance();
|
|
|
const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
|
|
const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
|
|
|
const OPA1 = OPA.addInstance();
|
|
const OPA1 = OPA.addInstance();
|
|
|
-const OPA2 = OPA.addInstance();
|
|
|
|
|
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
|
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
|
|
const PWM1 = PWM.addInstance();
|
|
const PWM1 = PWM.addInstance();
|
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
@@ -35,7 +34,10 @@ ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED"];
|
|
|
ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
|
|
ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
|
|
|
ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
|
|
ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
|
|
|
ADC121.sampleTime0 = "125 us";
|
|
ADC121.sampleTime0 = "125 us";
|
|
|
-ADC121.adcMem0vref = "VREF";
|
|
|
|
|
|
|
+ADC121.adcMem0avgen = true;
|
|
|
|
|
+ADC121.hwNumerator = "DL_ADC12_HW_AVG_NUM_ACC_32";
|
|
|
|
|
+ADC121.hwDenominator = "DL_ADC12_HW_AVG_DEN_DIV_BY_32";
|
|
|
|
|
+ADC121.adcMem1vref = "VREF";
|
|
|
ADC121.peripheral.$assign = "ADC0";
|
|
ADC121.peripheral.$assign = "ADC0";
|
|
|
ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
|
|
|
|
@@ -44,18 +46,27 @@ Board.peripheral.$assign = "DEBUGSS";
|
|
|
Board.peripheral.swclkPin.$assign = "PA20";
|
|
Board.peripheral.swclkPin.$assign = "PA20";
|
|
|
Board.peripheral.swdioPin.$assign = "PA19";
|
|
Board.peripheral.swdioPin.$assign = "PA19";
|
|
|
|
|
|
|
|
-COMP1.$name = "COMP_0";
|
|
|
|
|
-COMP1.controlSelect = "DL_COMP_DAC_CONTROL_SW";
|
|
|
|
|
-COMP1.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
|
|
|
|
|
|
|
+COMP1.$name = "COMP_0";
|
|
|
|
|
+COMP1.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
|
|
|
|
|
+COMP1.controlSelect = "DL_COMP_DAC_CONTROL_SW";
|
|
|
|
|
+COMP1.hysteresis = "DL_COMP_HYSTERESIS_10";
|
|
|
|
|
+COMP1.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG";
|
|
|
|
|
|
|
|
GPIO1.$name = "ADDR";
|
|
GPIO1.$name = "ADDR";
|
|
|
-GPIO1.associatedPins.create(2);
|
|
|
|
|
|
|
+GPIO1.associatedPins.create(3);
|
|
|
GPIO1.associatedPins[0].$name = "A0";
|
|
GPIO1.associatedPins[0].$name = "A0";
|
|
|
GPIO1.associatedPins[0].direction = "INPUT";
|
|
GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
|
|
+GPIO1.associatedPins[0].polarity = "RISE_FALL";
|
|
|
|
|
+GPIO1.associatedPins[0].interruptEn = true;
|
|
|
GPIO1.associatedPins[0].pin.$assign = "PA4";
|
|
GPIO1.associatedPins[0].pin.$assign = "PA4";
|
|
|
GPIO1.associatedPins[1].$name = "A1";
|
|
GPIO1.associatedPins[1].$name = "A1";
|
|
|
GPIO1.associatedPins[1].direction = "INPUT";
|
|
GPIO1.associatedPins[1].direction = "INPUT";
|
|
|
|
|
+GPIO1.associatedPins[1].interruptEn = true;
|
|
|
|
|
+GPIO1.associatedPins[1].polarity = "RISE_FALL";
|
|
|
GPIO1.associatedPins[1].pin.$assign = "PA11";
|
|
GPIO1.associatedPins[1].pin.$assign = "PA11";
|
|
|
|
|
+GPIO1.associatedPins[2].$name = "A2";
|
|
|
|
|
+GPIO1.associatedPins[2].direction = "INPUT";
|
|
|
|
|
+GPIO1.associatedPins[2].pin.$assign = "PA16";
|
|
|
|
|
|
|
|
I2C1.$name = "I2C_target";
|
|
I2C1.$name = "I2C_target";
|
|
|
I2C1.basicEnableTarget = true;
|
|
I2C1.basicEnableTarget = true;
|
|
@@ -83,25 +94,11 @@ I2C1.sclPinConfig.enableConfig = true;
|
|
|
OPA1.$name = "OPA_0";
|
|
OPA1.$name = "OPA_0";
|
|
|
OPA1.cfg0OutputPin = "ENABLED";
|
|
OPA1.cfg0OutputPin = "ENABLED";
|
|
|
OPA1.cfg0PSELChannel = "DAC8_OUT";
|
|
OPA1.cfg0PSELChannel = "DAC8_OUT";
|
|
|
-OPA1.cfg0NSELChannel = "RTAP";
|
|
|
|
|
-OPA1.cfg0MSELChannel = "GND";
|
|
|
|
|
|
|
+OPA1.cfg0NSELChannel = "RTOP";
|
|
|
OPA1.peripheral.$assign = "OPA0";
|
|
OPA1.peripheral.$assign = "OPA0";
|
|
|
OPA1.peripheral.OutPin.$assign = "PA22";
|
|
OPA1.peripheral.OutPin.$assign = "PA22";
|
|
|
OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
|
|
|
|
|
|
-OPA2.$name = "OPA_1";
|
|
|
|
|
-OPA2.cfg0PSELChannel = "IN0_POS";
|
|
|
|
|
-OPA2.cfg0NSELChannel = "IN1_NEG";
|
|
|
|
|
-OPA2.cfg0OutputPin = "ENABLED";
|
|
|
|
|
-OPA2.cfg0MSELChannel = "IN1_NEG";
|
|
|
|
|
-OPA2.peripheral.$assign = "OPA1";
|
|
|
|
|
-OPA2.peripheral.In0PosPin.$assign = "PA18";
|
|
|
|
|
-OPA2.peripheral.In1NegPin.$assign = "PA17/OPA1.IN0-";
|
|
|
|
|
-OPA2.peripheral.OutPin.$assign = "PA16";
|
|
|
|
|
-OPA2.In0PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
|
|
|
|
|
-OPA2.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
|
|
|
|
|
-OPA2.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
|
|
|
|
-
|
|
|
|
|
PWM1.$name = "PWM";
|
|
PWM1.$name = "PWM";
|
|
|
PWM1.ccIndex = [1];
|
|
PWM1.ccIndex = [1];
|
|
|
PWM1.timerCount = 320;
|
|
PWM1.timerCount = 320;
|
|
@@ -118,6 +115,7 @@ PWM1.PWM_CHANNEL_1.invert = true;
|
|
|
SYSCTL.disableNRSTPin = true;
|
|
SYSCTL.disableNRSTPin = true;
|
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|
|
|
|
|
|
|
|
|
|
+VREF.basicIntVolt = "DL_VREF_BUFCONFIG_OUTPUT_2_5V";
|
|
|
|
|
|
|
|
ProjectConfig.migrationCondition = true;
|
|
ProjectConfig.migrationCondition = true;
|
|
|
ProjectConfig.genLibIQ = true;
|
|
ProjectConfig.genLibIQ = true;
|