Systems, methods, and computer-readable media are disclosed for error-compensated
counting of Hall states for motor position feedback and/or commutation. An indicated
Hall state is detected by digital Hall state sensors and a duration of the Hall
state is compared to a specified time period. When the duration exceeds the specified
time period, the indicated Hall state is compared to one or more valid Hall states
and a position counter is changed for valid states. When the indicated Hall state
is invalid, the position counter is not changed. The Hall state sensors may be
connected to logic means and may detect the position of a rotor of a permanent
magnet motor relative to a stator. When noise induces a change in an indicated
Hall state, corresponding noise-induced effects on the position counter may be
may be removed through error-compensated counting.