<?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>Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105079/data-access-violation-in-zephyr-when-accessing-npm1300-with-nrf52832</link><description>I&amp;#180;m playing around with the nPM1300 on a custom board and Zephyr and get this output when trying to use &amp;quot;regulator_is_enabled&amp;quot; from the Zephyr regulators API. 
 
 The regulator can be accessed by Zephyr and I can measure the configured voltages on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Nov 2023 07:49:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105079/data-access-violation-in-zephyr-when-accessing-npm1300-with-nrf52832" /><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/453883?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 07:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dcbe259-cf48-44e5-a06f-3f73fe9f1c68</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;we&amp;acute;ve figured out the issue. I used the wrong device for the regulator. I have to use&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const struct device* regulators = DEVICE_DT_GET(DT_NODELABEL(npm1300_ek_buck1));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With that, the code is working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/453675?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 10:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09930bc2-c3c9-4877-8dca-fd152ece2798</guid><dc:creator>helsing</dc:creator><description>[quote user="Kampino"]C:/ncs/v2.5.0-rc2/modules/hal/nordic/nrfx/hal/nrf_clock.h:948[/quote][quote user="Kampino"]C:/ncs/v2.5.0-rc2/zephyr/kernel/sched.c:195[/quote]
&lt;p&gt;What do you find when opening these files, checking line 948 and 195?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/453225?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 10:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eccc2188-f757-4c0a-b2e7-d518c73c8aa1</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;no. I tested the latest versions to make sure that this is not an issue of a specific SDK. I had the same issue at the same place with 2.4.1, 2.5.0-rc2 and 2.5.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/453202?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 09:30:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22161d14-8f9c-4628-b469-f7b38d0fdfd7</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;What do you find if you go to that file and line 948?&lt;/p&gt;
[quote user="Kampino"]C:/ncs/v2.5.0-rc2[/quote]
&lt;p&gt;Are you using any special features from c2.5.0-rc2, or could you perhaps try using v2.5.0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452843?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 16:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2398369-b12e-446f-afb5-e235c3a55740</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;I get this output&lt;br /&gt;&lt;br /&gt;\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e zephyr.elf 0x0000c3fd&lt;br /&gt;C:/ncs/v2.5.0-rc2/modules/hal/nordic/nrfx/hal/nrf_clock.h:948&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452841?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 16:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a35ef34-90e1-43e8-94ea-8a6692379d24</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;And what do you get with&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e zephyr.elf 0x0000c3fd&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452840?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 16:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a997df1d-cc15-4105-b4dc-61c92efc02da</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Great. What happens if you check line 195 in &lt;code&gt;C:/ncs/v2.5.0-rc2/zephyr/kernel/sched.c&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452667?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 16:54:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ffa329b-a491-4607-9fdc-049c660aa747</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I got the following output:&lt;/p&gt;
&lt;p&gt;..\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e zephyr.elf 0x00008cf4&lt;br /&gt;C:/ncs/v2.5.0-rc2/zephyr/kernel/sched.c:195&lt;/p&gt;
&lt;p&gt;\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e zephyr.elf 0x000211a8&lt;br /&gt;??:0&lt;br /&gt;\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e zephyr.elf 0x00018b3d&lt;br /&gt;??:0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452610?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 13:28:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:496278ef-56d4-48aa-955d-180ebf8dd034</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Here is a description from another ticket showing how to use addr2line:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="font-family:Calibri;font-size:11pt;margin:0;"&gt;Also for errors like this you can do some investigating with arm-none-eabi-addr2line:&lt;/p&gt;
&lt;ol style="direction:ltr;font-family:Calibri;font-size:11pt;font-style:normal;font-weight:normal;margin-bottom:0;margin-top:0;"&gt;
&lt;li style="margin-bottom:0;margin-top:0;vertical-align:middle;" value="1"&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:normal;font-weight:normal;" lang="en-US"&gt;Check if you have arm-none-eabi-addr2line set up by running &amp;quot;&lt;/span&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:italic;font-weight:normal;" lang="nb-NO"&gt;where arm-none-eabi-addr2line&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:normal;font-weight:normal;" lang="en-US"&gt;in a cmd window. &lt;/span&gt;&lt;ol style="direction:ltr;font-family:Calibri;font-size:11pt;font-style:normal;font-weight:normal;margin-bottom:0;margin-top:0;"&gt;
&lt;li style="margin-bottom:0;margin-top:0;vertical-align:middle;" value="1"&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:normal;font-weight:normal;" lang="en-US"&gt;This should return something like &amp;quot;&lt;/span&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:italic;font-weight:normal;" lang="nb-NO"&gt;C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin\arm-none-eabi-addr2line.exe&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="margin-bottom:0;margin-top:0;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;If it does not return this, then there might be some issues with the gnuarmemb path configuration&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li style="margin-bottom:0;margin-top:0;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;Next step is to investigate what is in the R15/pc and R14/lr addresses &lt;/span&gt;&lt;ol style="direction:ltr;font-family:Calibri;font-size:11pt;font-style:italic;font-weight:normal;margin-bottom:0;margin-top:0;"&gt;
&lt;li style="font-style:italic;margin-bottom:0;margin-top:0;vertical-align:middle;" value="1"&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:italic;font-weight:normal;"&gt;arm-none-eabi-addr2line -e &amp;lt;path to _build\zephyr\zephyr.elf&amp;gt; &amp;lt;0x000211a8&amp;gt; for r15/pc&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-style:italic;margin-bottom:0;margin-top:0;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;font-style:italic;"&gt;arm-none-eabi-addr2line -e &amp;lt;path to _build\zephyr\zephyr.elf&amp;gt; &amp;lt;0x00018b3d&amp;gt; for r14/lr&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="font-family:Calibri;font-size:11pt;margin:0;"&gt;2. Should give you what function call that causes the kernel panic deep down in the stack.&amp;nbsp;Remember to replace &amp;quot;&amp;lt;path to _build\zephyr\zephyr.elf&amp;gt;&amp;quot; with your actual path&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data access violation in Zephyr when accessing nPM1300 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/452609?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 13:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58463536-37db-4f6d-aa2e-c6118d900aa5</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Have you tried arm-none-eabi-addr2line to get the code location? &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span dir="ltr"&gt;&lt;span dir="ltr"&gt;For example:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;&lt;span dir="ltr"&gt;arm-none-eabi-addr2line -e build/zephyr/zephyr.elf 0xFAULTING_ADDRESS&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;And insert 0x00008cf4 like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;&lt;span dir="ltr"&gt;arm-none-eabi-addr2line -e build/zephyr/zephyr.elf 0x00008cf4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;That should give you the code location. What is there should hopefully give us a clue.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;a href="https://manpages.debian.org/testing/binutils-arm-none-eabi/arm-none-eabi-addr2line.1.en.html"&gt;https://manpages.debian.org/testing/binutils-arm-none-eabi/arm-none-eabi-addr2line.1.en.html&lt;/a&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please also see this ticket on how to handle &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75261/ncs-and-zephyr-fatal-errors"&gt;fatal errors in zephyr&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>