Read a potentiometer continuously? on STM32 and analogRead()

It could be related to how slow Arduino analogRead is: https://community.simplefoc.com/t/am-i-understanding-how-to-use-hall-sensors-correctly/4192/4?u=vipqualitypost

On B-G431B-ESC1 boards here (among others) the analog signals are read using an interrupt triggered from the timer running the PWM output to do a read on the ADC (for current sensing). You can add arbitrary other channels to the ADC conversion though. It takes a bit of tinkering in the low level code but it may work better for you as the read should be orders of magnitude faster and you can just store in some variable for when you need it later to serial or whatever. There is example code for this in the SimpleFOC repo.