In other words: to trigger an interrupt on an ADC measuring above, or below a configurable threshold?
From: STM32F767 Datasheet
No additional components2.41 Analog-to-digital converters (ADCs)
The ADC can be served by the DMA controller. An analog watchdog feature allows very precise monitoring of the converted voltage of one, some or all selected channels. An interrupt is generated when the converted voltage is outside the programmed thresholds.
I'd much rather avoid a PCB change requiring new components, as that will incur another round of EMC testing.
Otherwise the ESP8266 forum discussion: On analog pin change? would be an option.