Skip to main content
Vertinhol
Associate III
August 26, 2022
Solved

Comparator trigger mode register

  • August 26, 2022
  • 3 replies
  • 1194 views

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.

This topic has been closed for replies.
Best answer by Vertinhol

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.

3 replies

waclawek.jan
Super User
August 26, 2022

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

Vertinhol
VertinholAuthor
Associate III
August 26, 2022

I mean the interruption mode, rising, falling or both edge.

Vertinhol
VertinholAuthorBest answer
Associate III
August 27, 2022

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.