Arm Mbed OS support forum

AHRS without setting sample frequency

I am slowly moving my libraries to mbed6 and wanted to share this one because I like how it works and assume people better than me at firmware could make improvements. It just sends time to Madgwick so you don’t need set a timer interrupt to maintain consistent updates. I tested it on a NUCLEO-L432KC and the average update is about 500hz and the units seem to be right because there is no drift after aggressive movements. I kept the IMU and AHRS separate to allow for different sensors but I did modify ICM20948 to be configured in the main.

https://os.mbed.com/users/ericleal/code/AHRS_to_BT_OS6/