What is an accurate manner to calculate the rotational speed of a bldc motor using hall sensors and microcontroller units, considering both floating point operations and length of the observed period (between rising and falling of the same sensor and then 180°, between two rising sensors and then 120°, or 1 electrical cycle and then 360°) ? I have found this application from microchip where a constant MINPERIOD and the time between two transitions of the same hall are used. Is it a good way? I am doubtful that without averaging with the other sensors the measurement is not really accurate or that maybe the measured period is too short, but I do not have experience with that.
Depends on what you want and how you will use the reading. Stable reading or accurate reading. Readings taken over a small arc of revolution will be more representative of what is happening but only over short time spans or arc distances, but result in a less stable reading. Extrapolate that angular speed to the entire rotation can introduce inaccuracy since individual variations over that small angular span are extrapolated and applied to the entire rotation which may not be true, though inertia helps even things out.