cancel
Showing results for 
Search instead for 
Did you mean: 

Where does CubeMX puts the code for interrupt configuration

benjamin Gräf
Associate II

Hello.

I was using CubeMX to configure an ADC and a comparator both with enabled interrupt. After the code generation I looked into the init functions but I could not find any interrupt configuration (priority setting and enabeling). In the HAL_COMP_START_IT function there is the starting of the interrupt. But not the priority setting.

So my question is, where is the code generated by CubeMX which does set the interrupt priority? Or do I have to set that manually?

best regards, Benjamin.

1 ACCEPTED SOLUTION

Accepted Solutions
David SIORPAES
ST Employee

You want to look at the file stm32yyxx_hal_msp.c.

Here are the functions that enable clocks, initialize GPIOs and configure interrupts for each peripheral.

View solution in original post

2 REPLIES 2
David SIORPAES
ST Employee

You want to look at the file stm32yyxx_hal_msp.c.

Here are the functions that enable clocks, initialize GPIOs and configure interrupts for each peripheral.

Oh ok, I see. Thanks !