BEMF detection on B-G431B-ESC

There’s also this AN from ST:
https://www.st.com/resource/en/application_note/cd00020086-sensorless-bldc-motor-control-and-bemf-sampling-methods-with--st7mc-stmicroelectronics.pdf

Essentially there seem to be two major ways to go: using ADCs or using comparators. On the B-G431B-ESC it looks like the BEMF pins are all on ADC2 but not on comparators, so I guess that choice has been made for you…

Coordinating the ADC measurements to the PWM is a bit complicated, but STM32 supports it.