<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117378/pm_device_action_run-gives-mpu-fault-if-bme280-id-is-bad-0x00</link><description>In my project I have a BME280 that starts OFF, and I interface with SPI. 
 The system then turns the power supply and the bme280 is powered. 
 At this stage the bme280 needs to be configurated, with the devicetree and .conf configurations. 
 To do this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 22 Feb 2025 22:48:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117378/pm_device_action_run-gives-mpu-fault-if-bme280-id-is-bad-0x00" /><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/524189?ContentTypeID=1</link><pubDate>Sat, 22 Feb 2025 22:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:904127a1-c3db-4561-93b2-a9593d128863</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;After testing the new layout works.&lt;/p&gt;
&lt;p&gt;In it the BME280 starts ON and its power is not controllable.&lt;br /&gt;Meaning its directly connected to the battery.&lt;/p&gt;
&lt;p&gt;Summarizing.&lt;br /&gt;The BME280 zephyr drivers are has of now ready to handle the hardware SPIM problem 58 of the nRF52832.&lt;br /&gt;The work around developed (SPI) works in normal situations.&lt;br /&gt;However, in some edge cases like the one in this thread it may fail inexplicably.&lt;br /&gt;So, the solutions is that when developing with the nRF52832&amp;#39;s SPI either:&lt;br /&gt;- Try to avoid hardware complications, especially with the power of the BME280 (this is what i did)&lt;br /&gt;- If this are necessary, make the BME280 start ON (this seams to work for me)&lt;br /&gt;A less useful solutions is to alter the SoC, for example, to the new nRF54 line (not sponsored).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/524175?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2025 23:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a24c0857-2147-4327-b435-1f7e5c4f9020</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Reopening since after further testing found that the BME280 drivers are not compatible with the SPIM for the nRF52832.&lt;/p&gt;
&lt;p&gt;This is due to them not complying with workarround 58, of 1 byte transfers.&lt;/p&gt;
&lt;p&gt;My only chance now is altering the PCB layout and hopping for the best with the normal SPI. I guess.&lt;/p&gt;
&lt;p&gt;Will know tomorrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/520947?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2025 20:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b77525c5-5ac8-4a72-805f-5c129a10a179</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Ok I shall do that.&lt;/p&gt;
&lt;p&gt;But in relation to this statement:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Although I can&amp;#39;t find any documentation of it, I believe I have heard something like the SPI driver is deprecated, and you should use the SPIM driver instead, as it has no disadvantages compared to the SPI driver.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The DevZone academy intermediate course show that for the nrf52 dk (nrf52832) the SPI module is the indicated to use because of the errata 58. This might need fixing.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-5-serial-peripheral-interface-spi/topic/exercise-1-10/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-5-serial-peripheral-interface-spi/topic/exercise-1-10/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:293px;max-width:296px;" height="293" src="https://devzone.nordicsemi.com/resized-image/__size/592x586/__key/communityserver-discussions-components-files/4/pastedimage1738356801229v1.png" width="296" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/520671?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2025 09:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d4d1ca-f088-4ee5-894f-80300ee1e3a4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;The SPI doesn&amp;#39;t have DMA, which handles your queues/buffers without the need of the CPU. Therefore, in most cases, the SPIM driver is preferred.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you say that the nrfx_spi_xfer() finishes too quickly, it may be that it is not blocking, and hence only queues the transaction. Then your application goes on to the next SPI xfer before the first one finishes, messing up the data flow. Although I can&amp;#39;t find any documentation of it, I believe I have heard something like the SPI driver is deprecated, and you should use the SPIM driver instead, as it has no disadvantages compared to the SPI driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I believe the case is that since the SPI driver is not blocking, other drivers may not wait for a transaction to finish before calling the next transaction, causing the next transaction to return an error.&amp;nbsp;&lt;/p&gt;
[quote user="TheLittleFish"]&lt;strong&gt;nrfx_spi_xfer()&lt;/strong&gt; function in spi_nrfx_spi.c is finishing too quickly.[/quote]
&lt;p&gt;Indeed. It will finish/return before the transaction is complete, looking at the source code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (p_cb-&amp;gt;transfer_in_progress)
    {
        err_code = NRFX_ERROR_BUSY;
        NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;
    }
    else
    {
        ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So if it is not a problem, I suggest you use the SPIM driver. Since this uses DMA, it is capable of handling the buffer, adding to it instead of trying to hijack it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/520032?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2025 17:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf64b073-378a-4802-89d2-cdf0848da92f</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Any idea why this could be happening?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/517737?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 14:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92bc33ee-4606-4087-9c53-520060281aa5</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Just tried the spim and it works, so its a spi problem.&lt;br /&gt;&lt;br /&gt;My guess, the&amp;nbsp;&lt;strong&gt;transfer_next_chunk()&lt;/strong&gt; &lt;strong&gt;&amp;gt;&lt;/strong&gt; &lt;strong&gt;nrfx_spi_xfer()&lt;/strong&gt; function in spi_nrfx_spi.c is finishing too quickly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/517112?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 03:52:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0abba5fd-77f8-473a-af0f-5c56a7bb982b</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Will try to use the SPIM.&lt;/p&gt;
&lt;p&gt;Also, my bad, I&amp;#39;m not using P0.10 to control de CS of the BME, its the P0.11.&lt;/p&gt;
&lt;p&gt;P0.10 and P0.09 are in use but for other stuff.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516966?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 12:00:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba29eda-78d8-4352-8e3c-b085945c5865</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you try to use the SPIM driver instead of the SPI, for debugging purposes?&lt;/p&gt;
&lt;p&gt;Also, note that the P0.10 is the NFC pin. I don&amp;#39;t understand why it would behave any different. Do you happen&amp;nbsp; use P0.09 for anything?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516838?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 15:59:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c17c8a7-3327-40cb-baec-de4e7270931d</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;What pin do you use for your SPI - CS?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;P0.10 with Active low, open drain. &amp;lt;&amp;amp;gpio0 10 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)&amp;gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And is that being used by the other connection to the dongle?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How do you connect this dongle/second board?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;USB-C, but only the connector the protocol is not utilized.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What protocol does that and the nRF use to communicate?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The other dongle contains an RTD Wheatstone bridge so the &amp;quot;connection&amp;quot; is made with an ADC. Meaning that the voltage divider points of the bridge pass through the connector directly to an analog pin for the ADC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And particularly, what SPI instance are you using for the bme, and what instance of the peripheral used in your dongle connection are you using?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;spi instance 1. &amp;quot;compatible = &amp;quot;nordic,nrf-spi&amp;quot;&amp;quot;, so normal SPI not SPIM.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And did you add&amp;nbsp;CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 to your prj.conf? Or is it included in your build\zephyr\.config file?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since im utilizing SPI and not SPIM did not see this. Checking the &amp;quot;spi_nrfx_spi.c&amp;quot; and the &amp;quot;spi_nrfx_spim.c&amp;quot; this config is present only in the spim file. Will still try and see if it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516829?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 14:14:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a9ef53-2bfe-4789-8a1a-50b51fcbff8b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;And did you add&amp;nbsp;CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 to your prj.conf? Or is it included in your build\zephyr\.config file?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516828?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 14:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80194f07-3d6b-4d44-8819-d4922e92dfcc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What pin do you use for your SPI - CS? And is that being used by the other connection to the dongle? How do you connect this dongle/second board? What protocol does that and the nRF use to communicate?&lt;/p&gt;
&lt;p&gt;And particularly, what SPI instance are you using for the bme, and what instance of the peripheral used in your dongle connection are you using?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516036?ContentTypeID=1</link><pubDate>Sat, 21 Dec 2024 21:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86bd95b5-575b-473b-bca4-2b2f44f42988</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;I found this bug, that exist in the version im using (2.7.0).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112685/asynchronous-spi-chip-select-deasserts-early"&gt;Asynchronous spi chip select deasserts early&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Will try it and say something.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516019?ContentTypeID=1</link><pubDate>Sat, 21 Dec 2024 01:04:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1d9abe7-eb8e-40b5-a9c2-de0cd086e56e</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Adding &lt;strong&gt;CONFIG_NRFX_SPI_LOG=y&lt;/strong&gt; &lt;strong&gt;&lt;/strong&gt;to the configs makes it work for some reason.&lt;/p&gt;
&lt;p&gt;Maybe the extra logs are stopping the SPI form doing something, idk...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516015?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 23:15:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b820c368-80eb-4fd8-8cd2-c1219cdc1e89</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;My bad the -134 appeared after some debugging, its the &lt;strong&gt;PM_DEVICE_ACTION_RESUME.&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After some time of looking at the code i noticed that the problem is getting more complex so i am going to give extra information.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; My system (main board) contains a port, that I utilize to connect a second board&amp;nbsp;(dongle) with an Wheatstone bridge with a RTD to measure temperature. When the main board and dongle are disconnected, the bme280 fine, but if they are connected the bme280 does not answer on the main board power-up. To note that if the dongle is connected after the power-up stuff is complete the bme280 keeps working with no issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I placed the board in a data analyzer and verified the SPI connections. The results show that without the dongle the SPI works correctly, but with the dongle the SPI&amp;#39;s CS pin dies mid way.&lt;/p&gt;
&lt;p&gt;Without dongle:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:428px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x856/__key/communityserver-discussions-components-files/4/pastedimage1734736175792v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;With dongle:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:426px;max-width:758px;" alt=" " height="426" src="https://devzone.nordicsemi.com/resized-image/__size/1516x852/__key/communityserver-discussions-components-files/4/pastedimage1734736252415v2.png" width="758" /&gt;&lt;/p&gt;
&lt;p&gt;What seems weird is that the rest of the SPI pins seem fine since they continue transmitting even with the CS dying.&lt;/p&gt;
&lt;p&gt;Will continue looking...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/516002?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 21:43:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6813194c-d429-4db8-b133-13902d74765a</guid><dc:creator>Edvin</dc:creator><description>[quote user="TheLittleFish"]&lt;p&gt;Removing the suspend gives the error -120 or EALREADY meaning the socket is already connected&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;Sorry for not being precise. I meant if you remove both the suspend and resume, so that it should be active. Does the issue occur if you do not disable it and re-enable it? Or only when you suspend and resume it?&lt;/p&gt;
[quote user="TheLittleFish"]The EIO means that the spi is not ready, so i placed a k_sleep(K_MSEC(500)) in between the pm_device_action_run() functions and we are back to the previous -134 error[/quote]
&lt;p&gt;What -134 error is this? I can&amp;#39;t see any mentions of it earlier. What function is it that returns -134?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note that I will be out of office until the beginning of January. I am sorry for the inconvenience, but I will not be able to reply before that. The same goes for most of our team, so if you create a new ticket, I can&amp;#39;t guarantee that someone will be able to look into it before January.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/515838?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 01:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04f3b3cb-d6d8-439d-bd06-c5d500728a11</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Also the error as evolved now its a &lt;strong&gt;spi_transcive &lt;/strong&gt;error of value -5 (EIO)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.004,058] &amp;lt;inf&amp;gt; Log_Main: Starting Beacon Demo

Bluetooth initialized
Beacon started, advertising as D9:3C:7C:7D:A5:CE (random)
DONE
[00:00:00.507,934] &amp;lt;dbg&amp;gt; BME280: bme280_reg_read_spi: spi_transceive FAIL -5

[00:00:00.507,965] &amp;lt;dbg&amp;gt; BME280: bme280_chip_init: ID read failed: -5
[00:00:00.507,995] &amp;lt;err&amp;gt; Log_Main: BME device pm RESUME failed: -5
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT: &lt;/strong&gt;The EIO means that the spi is not ready, so i placed a k_sleep(K_MSEC(500)) in between the pm_device_action_run() functions and we are back to the previous -134 error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/515836?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 01:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e29ac70-75e3-4faf-abd8-acd4a0bfd0ac</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;It seems I found the problem.&lt;/p&gt;
&lt;p&gt;Enabling &lt;strong&gt;CONFIG_BT_DEBUG_LOG=y &lt;/strong&gt;in the configurations causes the issue.&lt;/p&gt;
&lt;p&gt;When to check and noticed that it is deprecated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found the &lt;strong&gt;CONFIG_BT_LOG_LEVEL_CHOICE, &lt;/strong&gt;for an alternative.&lt;/p&gt;
&lt;p&gt;I enabled &lt;strong&gt;CONFIG_BT_HCI&lt;/strong&gt;, &lt;strong&gt;CONFIG_LOG&lt;/strong&gt;, and &lt;strong&gt;CONFIG_BT_LOG_LEVEL_INF &lt;/strong&gt;to maintain the Logs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The error still persists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/515614?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 00:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90c1e924-b5fa-4a6f-a955-748ed1fa89fc</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you comment out the sensor_channel_get(), do you still see this in the log?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes commenting any code after the pm RESUME still gives this error&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And what happens if you do not suspend and resume the BME device?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Removing the suspend gives the error -120 or EALREADY meaning the socket is already connected&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;arm-none-eabi-addr2line stuff&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This points to line 297 of the v2.7.0/modules/hal/nordic/nrfx/drivers/src/nrfx_spi.c in function &lt;strong&gt;transfer_byte &lt;/strong&gt;and this function is called in the &lt;strong&gt;irq_handler &lt;/strong&gt;(same file) line 455.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I don&amp;#39;t suppose you are able to replicate the same behavior without the actual sensor, just using a DK?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No clue, will try tomorrow&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_device_action_run gives MPU FAULT if bme280 ID is bad (0x00)</title><link>https://devzone.nordicsemi.com/thread/515604?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 21:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33a0a1a6-1418-495e-bdb9-decb7bd97537</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;p&gt;My problem is that the MPU FAULT only happens when the while is ran as is. If a &lt;strong&gt;sensor_channel_get(...) &lt;/strong&gt;function or the ble function are commented the MPU FAULT no longer appears.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;If you comment out the sensor_channel_get(), do you still see this in the log?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;dbg&amp;gt; BME280: bme280_chip_init: bad chip id 0x0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And what happens if you do not suspend and resume the BME device?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And if you run the application as is one more time, and take note of the r14/lr and r15/pc registers (in this log, they were 0x00017881 and 0x00017820, respectively. If you then, without re-building the application, run the command:&lt;/p&gt;
&lt;p&gt;arm-none-eabi-addr2line -e build\zephyr\zephyr.elf 0x00017881&lt;/p&gt;
&lt;p&gt;arm-none-eabi-addr2line -e build\zephyr\zephyr.elf 0x00017820&lt;/p&gt;
&lt;p&gt;(but with the addresses from the latest log). What does it say? You may need to adjust the path to the .elf file if you are using sysbuild, and you need to install armgcc to use arm-none-eabi-addr2line. Alternatively, if you have a terminal with the toolchain from NCS, you can use arm-zephyr-eabi-addr2line. If you can&amp;#39;t get the addr2line tool working, you can send me your build folder, and the addresses from the log in that build.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t suppose you are able to replicate the same behavior without the actual sensor, just using a DK?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>