2022-08-26 10:59 AM
Hello I have a Nucleo board L476RG and I would like to change the trigger mode of the comparator on the fly, the problem is that I cannot find the register responsible of this in the datasheet.
I guess it's not related to the comparator but to the EXTI lines if I'm not mistaken.
Any help please.
Solved! Go to Solution.
2022-08-27 04:36 AM
Anyway I found it, the register name is "EXTI_FTSR1" for falling edge and EXTI_RTSR1" for rising edge, depending on the which interruption line you're using you have just to enable or disable the bit which is in my case 21.
2022-08-26 11:36 AM
What do you mean by "trigger mode of comparator"? The COMP chapter of RM0351 mentions "trigger" only as source of BREAK of timers, and there's no "mode" for that. Comparator outputs can also be used as input for TIMx_CHx or TIMx_ETR.
Comparator's output polarity can also be flipped by using the COMPx_CSR.POLARITY bit.
JW
2022-08-26 12:37 PM
I mean the interruption mode, rising, falling or both edge.
2022-08-27 04:36 AM
Anyway I found it, the register name is "EXTI_FTSR1" for falling edge and EXTI_RTSR1" for rising edge, depending on the which interruption line you're using you have just to enable or disable the bit which is in my case 21.