Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
I want to wake up my MCU using a GPIO. I have configured GPIO PA12 for wake-up in the SysConfig file.
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --device "MSPM0G350X" --part "Default" --package "LQFP-64(PM)" --product "mspm0_sdk@2.05.01.01" * @v2CliArgs --device "MSPM0G3507" --package "LQFP-64(PM)" --product "mspm0_sdk@2.05.01.01" * @versions {"tool":"1.24.0+4110"} */ /** * Import the modules used in this configuration. */ const Board = scripting.addModule("/ti/driverlib/Board"); const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false); const GPIO1 = GPIO.addInstance(); const GPIO2 = GPIO.addInstance(); const RTC = scripting.addModule("/ti/driverlib/RTC"); const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL"); /** * Write custom configuration values to the imported modules. */ GPIO1.$name = "GPIO_LEDS"; GPIO1.associatedPins.create(2); GPIO1.associatedPins[0].assignedPort = "PORTA"; GPIO1.associatedPins[0].internalResistor = "PULL_UP"; GPIO1.associatedPins[0].$name = "USER_LED_1"; GPIO1.associatedPins[0].launchPadShortcut = "LED1En"; GPIO1.associatedPins[1].assignedPort = "PORTA"; GPIO1.associatedPins[1].assignedPortSegment = "Lower"; GPIO1.associatedPins[1].$name = "USER_TEST"; GPIO1.associatedPins[1].internalResistor = "PULL_UP"; GPIO1.associatedPins[1].pin.$assign = "PA15"; GPIO2.$name = "WakeUp"; GPIO2.port = "PORTA"; GPIO2.portSegment = "Lower"; GPIO2.associatedPins[0].$name = "PIN_0"; GPIO2.associatedPins[0].direction = "INPUT"; GPIO2.associatedPins[0].interruptEn = true; GPIO2.associatedPins[0].internalResistor = "PULL_DOWN"; GPIO2.associatedPins[0].fastWakeEn = true; GPIO2.associatedPins[0].polarity = "RISE"; GPIO2.associatedPins[0].pin.$assign = "PA12"; RTC.intervalAlarmEvent = "HOURCHANGE"; RTC.calDOW = "1"; RTC.calMin = 32; RTC.calHour = 10; RTC.calYear = 2021; RTC.calMonth = "4"; RTC.calDOM = 5; RTC.calAlarm1Min = 33; RTC.calAlarm1Hour = 10; RTC.calAlarm1DOW = "1"; RTC.calAlarm1DOM = 5; RTC.calSec = 58; RTC.enPerAlarm1 = true; RTC.enabledInterrupts = ["PRESCALER1"]; SYSCTL.validateClkStatus = true; SYSCTL.clockTreeEn = true; SYSCTL.enableSleepOnExit = true; SYSCTL.SYSOSC_Freq = 4000000; SYSCTL.powerPolicy = "STANDBY0"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * 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. */ Board.peripheral.$suggestSolution = "DEBUGSS"; Board.peripheral.swclkPin.$suggestSolution = "PA20"; Board.peripheral.swdioPin.$suggestSolution = "PA19"; GPIO1.associatedPins[0].pin.$suggestSolution = "PA0"; RTC.peripheral.$suggestSolution = "RTC";
Let me know the correction to implement the above.
Regrads,
Abhijeet D