Author Topic: MSPM0L1105 gpio interrupts  (Read 757 times)

0 Members and 1 Guest are viewing this topic.

Offline oooTopic starter

  • Newbie
  • Posts: 2
  • Country: se
MSPM0L1105 gpio interrupts
« on: February 06, 2025, 07:42:11 pm »
Hello

I am struggeling with writing interrupt service routine in CCS (code composer studio) for the MSPM0L1105. I want
to generate interrupt if a GPIO is toggled basically. I am pretty sure
how it should be setup in the syscfg GUI.

The problem is that I dont
really know the syntax of how you write the interrup service routine
function (not "inside" the function but how it should be "formed").

Happy for all answers :D

// electronics guy
 

Offline Phoenix

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: au
Re: MSPM0L1105 gpio interrupts
« Reply #1 on: February 08, 2025, 01:29:20 am »
 

Offline Buxtehude

  • Newbie
  • Posts: 1
  • Country: pl
Re: MSPM0L1105 gpio interrupts
« Reply #2 on: February 08, 2025, 10:17:03 am »
In CCS 12.8.1, using ticlang compiler, in project folder I can find interrupt prototypes under Referenced Source / SysConfig / startup_mspm0l110x_ticlang.c.

GPIO0/PORTA interrupt is in INT_GROUP1 for mspm0l1105 so you must use GROUP1_IRQHandler in your code.

Additionally you must enable gpio interrupt in NVIC yourself:

Code: [Select]
//- GPIOA:
//    + Standard Output: PA26 (LED)
//    + Standard Input with internal pull-up: PA16 (BUTTON)

void GROUP1_IRQHandler(void)
{
    DL_GPIO_togglePins(GPIOA, OUTPUT_LED_PIN);
}

int main(void)
{

    SYSCFG_DL_init();

    NVIC_EnableIRQ(GPIOA_INT_IRQn);

    while (1)
    {

    }
}
 

Offline oooTopic starter

  • Newbie
  • Posts: 2
  • Country: se
Re: MSPM0L1105 gpio interrupts
« Reply #3 on: February 08, 2025, 02:04:40 pm »
Yes I managed to fix it thank you   ;D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf