IMU Pro Mini Unit fails to Init on Core2
-
Summary
Using a U171 IMU Pro Mini with Core2, the U171 fails to initialize, returning error:OSError: [Errno 19] ENODEVRepro Steps
Initialize the bus and U171
i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000) print(i2c0.scan()) imupro_0 = IMUProUnit(i2c0)i2c0.scan()returns BMI270 (0x68) and BMP280 (0x76); the BMM150 is behind the BMI270.Trace for the constructor's failure is :
Traceback (most recent call last): File "main.py", line 24, in <module> File "main.py", line 17, in setup File "unit/imu_pro.py", line 36, in __init__ File "driver/bmi270_bmm150.py", line 720, in __init__ File "driver/bmi270_bmm150.py", line 539, in __init__ File "driver/bmi270_bmm150.py", line 622, in _write_reg OSError: [Errno 19] ENODEVLooking at the underlying code :
Constructor calls:
super().__init__(i2c, address=bmi270_address, aux_address=address)Which does a soft reset, then attempts to write a register:
# Perform initialization sequence. # 0.Soft-reset self.soft_reset() # 1.Disable power save mode. self._write_reg(PWR_CONF, 0x00) time.sleep_ms(10)The write fails:
self._i2c.writeto_mem(self.address, reg, val)I patched the following and added
i2c0.scan()after each i2c write:IMUProUnit.soft_reset IMUProUnit._write_reg IMUProUnit.new_write_burstScanning the bus after each write, stops the ENODEV error. However
initnever completes.Any ideas how to get U171 to work?
-
@ChrisFSB Any ideas here folks? Thx!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login