MagneticSensorSPI and MA730 sensor

Because the as5048 built-in ADC significant bit problem. Because there are significant bits in all ADC circuits, the real effective output accuracy is lower than the physical accuracy due to the influence of op amp noise and nonlinearity in AD sampling processing. For example, the effective precision of 14 bit ADC circuit is 11 bits. The physical ADC bits of as5048 are 14 bits, and the output effective precision is 11 bits. Therefore, the output jitter of the last three bits is normal. If higher precision is needed, the multi sampling data can be added and averaged, such as 20 times of data average, so as to get higher accuracy.
In addition, “magnetic sensor SPI” uses 8bit to read twice, and then reads back the data again. The time efficiency is half as low as that! According to the manual of 5048b, it is 16bit, not 8bit.

I’ve tried another magnetic encoder “tle5012b”, which is better than 5048b.

By the way, thank you again. I got a piece of drv8323. In your simplest way, SPI communication is successful… At present, I refer to the method in VESC project, and use software to simulate SPI, which is also successful! Arduino and STM32, no matter which one, SPI library files are written so that beginners look too difficult to understand.