TIDUC26A April 2022 – April 2024
The built in CORDIC algorithm uses two magnetic axes to determine the angle data. The linear magnetic axis data can also be used to calculate the angle using an external algorithm as well. For using the internal CORDIC algorithm, the desired magnetic axis need to be selected using the ANGLE_EN bits in the SENSOR_CONFIG_2 register in the device. For this design, the X and Y axis are used to determine the magnet angle so the bits are set to 0x1. In addition to this, it is important to set the magnetic sensing range based on the expected magnetic field strength. Once configured, the magnet angle can be obtained from the CORDIC algorithm by simply reading the ANGLE_RESULT_MSB and ANGLE_RESULT_LSB registers. Lastly, averaging is applied to the sampling of the device by changing the CONV_AVG register setting. This allows for a better SNR performance from the device and gives more accurate angle information from the CORDIC output.