Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
I am using a button to trigger the MSPM0L115 (28 pin variant) on PA1. This is to trigger an interrupt that wakes the MCU from sleep. Here is my config for this GPIO:
I would expect this interrupt is implemented the same as the TIMER0 IRQ I have implemented elsewhere in the design, however pressing the button does not wake the device. My relevant code is below:
int main(void) { SYSCFG_DL_init(); NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN); debugWrite("~ init ~\r\n"); NVIC_DisableIRQ(TIMER_0_INST_INT_IRQN); NVIC_EnableIRQ(CONTROL_INT_IRQN); __WFI(); NVIC_DisableIRQ(CONTROL_INT_IRQN); NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN); debugWrite("~ button pressed ~\r\n");
'Control' here is the pin group I have this GPIO in. __WFI() is not passed when the button is pressed. There does not seem to be any IRQHandler prototype generated like there was for the timer 0 interrupt I have in the design, so I do not have an IRQ handler implemented, but I also don't need code to run when the button is pressed regardless. If I do not disable this timer 0, __WFI() is passed as the interrupt triggers every millisecond. I am staying in SLEEP0. I also have 'Global Wake' enabled.
I feel I am just missing some initialization call. Any ideas?
Lastly, where can I find the documentation that covers using SysConfig generated code for this MCU? The Code Academy for this device is useful, but does not cover most features.
Thanks
Jesse