cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, for some reason I cannot enable the comparator interrupt, I believe this happened after an update. I'm using STM32L476-RG https://imgur.com/a/T7FXngv

Vertinhol
Associate III
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Vertinhol​ ,

By just putting the cursor on the small square where you can enable the interrupt,STM32CubeMX will show this message:

"COMP_IRQn forced to disabled as no comparator Trigger Mode parameter is set to Interrupt."

So you will need set one of the comparator Trigger Mode to an Interrupt Mode.

Hope that this solve your issue!

View solution in original post

4 REPLIES 4
Houssem CHAABANI
Senior II

Hi @Vertinhol​ ,

Could you share your .ioc file and add more details?

I didn't do anything yet, just started a new project and selected INP & INM of COMP1, and when I tried to enable the interrupter, the checkbox was grayed as shown in the image. I did the same thing with COMP2 and I still encounter the same issue.

Hello @Vertinhol​ ,

By just putting the cursor on the small square where you can enable the interrupt,STM32CubeMX will show this message:

"COMP_IRQn forced to disabled as no comparator Trigger Mode parameter is set to Interrupt."

So you will need set one of the comparator Trigger Mode to an Interrupt Mode.

Hope that this solve your issue!

Thank you, problem solved, is there a better way to change the trigger mode and the inverting input without calling the "HAL_COMP_Init(&hcomp1)" function when the program is already running?