Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

Use AS5600 auto increment suppress

Open tikonen opened this issue 7 months ago • 2 comments

This IC does not increment I2C read pointer when the angle is read for performance reasons. There is no need to rewrite the register address on an every request.

This makes angle query practically almost twice as fast. I've tested this only on AS5600 so feature is disabled by default for other I2C comms based sensors.

tikonen avatar Apr 19 '25 11:04 tikonen

Hi @tikonen , thank you for contributing this but actually we already support this in our dedicated driver for the AS5600:

https://github.com/simplefoc/Arduino-FOC-drivers/tree/master/src/encoders/as5600

This driver additionally keeps the I2C transactions open and in my tests achieves significantly higher read rates than our regular driver. It also has the advantage of being able to read/write the sensors other registers. So I think I’d prefer to keep the MagneticSensorI2C driver really basic and free of hardware-specific functions, since we have the dedicated drivers for the people who want them.

runger1101001 avatar Apr 21 '25 14:04 runger1101001

No problem. My thinking was as the driver had explicit configuration for AS5600 this might go in as optional functionality but it makes sense to keep it simple if there is already dedicated high performance driver available.

tikonen avatar Apr 21 '25 20:04 tikonen

Then I will close this one, thank you!

runger1101001 avatar Sep 24 '25 12:09 runger1101001