<?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>Unable to access EGU registers on NRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100541/unable-to-access-egu-registers-on-nrf9160</link><description>Attempting to read or write to any of the EGU instances on the NRF9160 generates a bus fault. For example, using the Zephyr shell to read the NS EGU0-&amp;gt;INTEN register: 
 
 
 The MPU is in the default Zephyr configuration and accesses to the surrounding</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Jun 2023 17:34:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100541/unable-to-access-egu-registers-on-nrf9160" /><item><title>RE: Unable to access EGU registers on NRF9160</title><link>https://devzone.nordicsemi.com/thread/429839?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2023 17:34:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ec95642-00ac-459c-8bdd-55dac501a931</guid><dc:creator>Nick Ewalt</dc:creator><description>&lt;p&gt;Ah, excellent. We are still&amp;nbsp;using SPM from&amp;nbsp;NCS v1.7.1.&amp;nbsp;I&amp;#39;ll backport &lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/010d7ea0e6076d846f1304b897739ca8b0a6bed9"&gt;010d7ea0&lt;/a&gt;&amp;nbsp;to&amp;nbsp;switch the other EGUs to NS. It&amp;#39;s reassuring to know that TF-M does the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to access EGU registers on NRF9160</title><link>https://devzone.nordicsemi.com/thread/429701?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2023 08:02:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e84b544b-57db-49a2-9bba-86c7df701aad</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which NCS version are you using? Since you mention SPM directly, I assume you&amp;#39;re using NCS v2.1 or older.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the code that sets the permission(s) for the EGU instances:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.1.4/subsys/spm/spm.c#L368-L385"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.1.4/subsys/spm/spm.c#L368-L385&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These are by default set to non-secure in ncs v2.1.x:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.1.99-ncs1-3  ***
Flash regions           Domain          Permissions
00 01 0x00000 0x10000   Secure          rwxl
02 31 0x10000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region             Domain          Permissions
00 03 0x00000 0x08000   Secure          rwxl
04 31 0x08000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Non-Secure      OK
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU0             Non-Secure      OK
22 NRF_EGU1             Non-Secure      OK
23 NRF_EGU2             Non-Secure      OK
24 NRF_EGU3             Non-Secure      OK
25 NRF_EGU4             Non-Secure      OK
26 NRF_EGU5             Non-Secure      OK
27 NRF_DPPIC            Non-Secure      OK
28 NRF_REGULATORS       Non-Secure      OK
29 NRF_PDM              Non-Secure      OK
30 NRF_I2S              Non-Secure      OK
31 NRF_GPIOTE1          Non-Secure      OK
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using TF-M? If yes, the zephyr/samples/subsys/shell/devmem_load sample is able read the address successfully in ncs v2.3.0:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs2 ***
uart:~$ devmem 4001b300 32
Using data width 32
Read value 0x0
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to access EGU registers on NRF9160</title><link>https://devzone.nordicsemi.com/thread/429661?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2023 23:42:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b10a52-de87-410c-a92a-5864f6649b75</guid><dc:creator>Nick Ewalt</dc:creator><description>&lt;p&gt;It turns out that I actually can access EGU1 and EGU2,&amp;nbsp;but none of the others. The underlying&amp;nbsp;cause was that SPM only configures EGU1 and EGU2 to be&amp;nbsp;non-secure in the SPU, leaving the rest as secure by default. It seems like the modem lib uses those two instances for application and tracing IRQs respectively.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s unclear why&amp;nbsp;SPM doesn&amp;#39;t configure the others to be accessible to the NS application, does anyone know the reason? I assume it will be fine if I modify SPM to do so.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>