Motor is turned off automatically during PWM off ( or LOW ) periods ...
just sample and hold during this moment.
that's how all ESCs current limiting devices work ... they just sample the power mosfets voltage loss ( = Intensity * Rds ON ... ), and compare with a reference.
Here, the "free running" ( PWM LOW state ... ) voltage of your motor is proportionnal to the rotor speed ...
That's all !!!
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks