|
@@ -20,6 +20,8 @@ const I2C2 = I2C.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");
|
|
|
|
|
+const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
|
|
|
|
|
+const TIMER1 = TIMER.addInstance();
|
|
|
const WWDT = scripting.addModule("/ti/driverlib/WWDT", {}, false);
|
|
const WWDT = scripting.addModule("/ti/driverlib/WWDT", {}, false);
|
|
|
const WWDT1 = WWDT.addInstance();
|
|
const WWDT1 = WWDT.addInstance();
|
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
@@ -88,12 +90,22 @@ PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
PWM1.PWM_CHANNEL_0.invert = true;
|
|
PWM1.PWM_CHANNEL_0.invert = true;
|
|
|
PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
|
|
|
|
|
-SYSCTL.peripheral.$assign = "SYSCTL";
|
|
|
|
|
|
|
+SYSCTL.clockTreeEn = true;
|
|
|
|
|
+SYSCTL.powerPolicy = "STANDBY0";
|
|
|
|
|
+SYSCTL.forceDefaultClkConfig = true;
|
|
|
|
|
+SYSCTL.validateClkStatus = true;
|
|
|
|
|
|
|
|
-WWDT1.$name = "WWDT0";
|
|
|
|
|
-WWDT1.wwdtMode = "INTERVAL";
|
|
|
|
|
-WWDT1.sleepMode = true;
|
|
|
|
|
-WWDT1.enabledInterrupts = true;
|
|
|
|
|
|
|
+TIMER1.$name = "TIMER_0";
|
|
|
|
|
+TIMER1.timerClkSrc = "LFCLK";
|
|
|
|
|
+TIMER1.timerClkPrescale = 33;
|
|
|
|
|
+TIMER1.timerMode = "PERIODIC";
|
|
|
|
|
+TIMER1.timerPeriod = "300 ms";
|
|
|
|
|
+TIMER1.interrupts = ["ZERO"];
|
|
|
|
|
+TIMER1.peripheral.$assign = "TIMG0";
|
|
|
|
|
+
|
|
|
|
|
+WWDT1.$name = "WWDT0";
|
|
|
|
|
+WWDT1.sleepMode = true;
|
|
|
|
|
+WWDT1.window0ClosedPeriod = "25";
|
|
|
|
|
|
|
|
ProjectConfig.migrationCondition = true;
|
|
ProjectConfig.migrationCondition = true;
|
|
|
|
|
|
|
@@ -102,5 +114,5 @@ ProjectConfig.migrationCondition = true;
|
|
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
|
|
* re-solve from scratch.
|
|
* re-solve from scratch.
|
|
|
*/
|
|
*/
|
|
|
-PWM1.peripheral.$suggestSolution = "TIMG0";
|
|
|
|
|
|
|
+PWM1.peripheral.$suggestSolution = "TIMG6";
|
|
|
WWDT1.peripheral.$suggestSolution = "WWDT0";
|
|
WWDT1.peripheral.$suggestSolution = "WWDT0";
|