2025-12-11 7:20 PM
Hardware: EVLSERVO1 official motor evaluation board
In the "ENC Calc Angle" function, there is a step to perform bitwise AND operation 0x7ffffff on TIM ->CNT, multiply it by the unsigned 32-bit maximum value divided by the polar logarithm. Its left value is a number of type uint32/t, which can cause data overflow. I don't quite understand how it converts pulse values into electrical angles. As shown in the following figure