Part Number: MSPM0-SDK
I'm a newbee running the labs in "MSPM0 Fundamentals Workshop with Code Composer Studio".
Builds & runs great. Now I try to add interrupt capability with the code below:
void GROUP1_IRQHandler(void)
{
switch (DL_Interrupt_getPendingGroup(DL_INTERRUPT_GROUP_1)) {
case GPIO_BUTTONS_INT_IIDX:
if (led_on_off_cycles == 312500) { /* Reset to original frequency when limit reached */
led_on_off_cycles = 10000000;
} else if (led_on_off_cycles >= 625000) { /* Double LED frequency: LED delay currently >= 625000 cycles; can halve */
led_on_off_cycles /= 2;
}
else { /* limit LED cycles to 312500 min */
led_on_off_cycles = 312500;
}
/* Toggle LED4 */
DL_GPIO_togglePins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_4_PIN);
break;
}
}
Compiles fine, no complaints but interrupts via the pushbutton on my launchpad (LP-MSPM0G3519) are ignored.
Verified the hardware with a scope - pushbutton behaves correctly. No change in variables, no breakpoint hits.
I can manually set the "led_on_off_cycles" value, which also behaves correctly.