Skip to main content
benjamin Gräf
Associate III
April 17, 2019
Solved

Where does CubeMX puts the code for interrupt configuration

  • April 17, 2019
  • 2 replies
  • 931 views

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.

This topic has been closed for replies.
Best answer by David SIORPAES

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.

2 replies

David SIORPAES
David SIORPAESBest answer
ST Employee
April 17, 2019

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.

benjamin Gräf
Associate III
April 17, 2019

Oh ok, I see. Thanks !