<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IMU Pro Mini Unit fails to Init on Core2]]></title><description><![CDATA[<p dir="auto"><strong>Summary</strong><br />
Using a U171 IMU Pro Mini with Core2, the U171 fails to initialize, returning error:</p>
<pre><code>OSError: [Errno 19] ENODEV
</code></pre>
<p dir="auto"><strong>Repro Steps</strong></p>
<p dir="auto">Initialize the bus and U171</p>
<pre><code>i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)
print(i2c0.scan())
imupro_0 = IMUProUnit(i2c0)
</code></pre>
<p dir="auto"><code>i2c0.scan()</code> returns BMI270 (0x68) and BMP280 (0x76); the BMM150 is behind the BMI270.</p>
<p dir="auto">Trace for the constructor's failure is :</p>
<pre><code>Traceback (most recent call last):
  File "main.py", line 24, in &lt;module&gt;
  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] ENODEV
</code></pre>
<p dir="auto">Looking at the underlying <a href="https://github.com/m5stack/uiflow-micropython/blob/master/m5stack/libs/driver/bmi270_bmm150.py" target="_blank" rel="noopener noreferrer nofollow ugc">code</a> :</p>
<p dir="auto">Constructor calls:</p>
<pre><code>super().__init__(i2c, address=bmi270_address, aux_address=address)
</code></pre>
<p dir="auto">Which does a soft reset, then attempts to write a register:</p>
<pre><code># Perform initialization sequence.
# 0.Soft-reset
self.soft_reset()

# 1.Disable power save mode.
self._write_reg(PWR_CONF, 0x00)
time.sleep_ms(10)
</code></pre>
<p dir="auto">The write fails:</p>
<pre><code>self._i2c.writeto_mem(self.address, reg, val)
</code></pre>
<p dir="auto">I patched the following and added <code>i2c0.scan()</code> after each i2c write:</p>
<pre><code>IMUProUnit.soft_reset
IMUProUnit._write_reg
IMUProUnit.new_write_burst
</code></pre>
<p dir="auto">Scanning the bus after each write, stops the ENODEV error.  However <code>init</code> never completes.</p>
<p dir="auto">Any ideas how to get U171 to work?</p>
]]></description><link>https://community.m5stack.com/topic/7389/imu-pro-mini-unit-fails-to-init-on-core2</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 05:31:48 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7389.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Mar 2025 00:48:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IMU Pro Mini Unit fails to Init on Core2 on Thu, 20 Mar 2025 00:40:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfsb" aria-label="Profile: ChrisFSB">@<bdi>ChrisFSB</bdi></a> Any ideas here folks?  Thx!</p>
]]></description><link>https://community.m5stack.com/post/28559</link><guid isPermaLink="true">https://community.m5stack.com/post/28559</guid><dc:creator><![CDATA[ChrisFSB]]></dc:creator><pubDate>Thu, 20 Mar 2025 00:40:44 GMT</pubDate></item></channel></rss>