Hi,
Thanks for your inquiry.
Yes, BMI270 is pin-to-pin compatible with BMG250 and you can use BMI270 gyro without the accelerometer to replace BMG250. The difference is that after you power on BMI270 you need to download 8KB config file to BMI270 and then you can enable gyro only and get gyro data from BMI270.
Please refer to BMI270 API source code at https://github.com/BoschSensortec/BMI270-Sensor-API. Then you can click the link "bmi270_examples" -> "gyro" to see the file "gyro.c".
Thanks.
... View more