<?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>Softdevice : Memory and timing protection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38229/softdevice-memory-and-timing-protection</link><description>I have a question related to memory protection and configuration of device in relevance to soft device. 
 nrf52832, sdk15, soft device S132 
 
 Question 1 : How can I be sure that soft device will not corrupt flash/ROM of application during operation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Sep 2018 21:07:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38229/softdevice-memory-and-timing-protection" /><item><title>RE: Softdevice : Memory and timing protection</title><link>https://devzone.nordicsemi.com/thread/148292?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 21:07:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a689b71-f79b-4fd4-a19d-3fcc27cc8119</guid><dc:creator>himanshu pande</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;Thank you for your quick feedback. It helps. BPROT as protection mechanism is clear as wont allow contents of Flash to be changed. But I am unclear on MWU. Is it equivalent to MPU? What is the basis on which MWU generates an event(like priveledge or program status register settings in case of MPU)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, can I take the interrupt handler of MWU(MWU_IRQHandler) in application control instead of softdevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice : Memory and timing protection</title><link>https://devzone.nordicsemi.com/thread/147585?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 12:26:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b672fd73-ae8c-4836-b0c0-47172f0872bc</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Himanshu,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q1: The SoftDevice and the application have separated FLASH and RAM sections, but share the call stack, so the application will not use the SD regions and vice versa for the SoftDevice.&amp;nbsp; &amp;nbsp;However, if you are concerned then the application code can be protected from the Softdevice using the&amp;nbsp;&lt;a class="active" title="BPROT &amp;mdash; Block protection" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/bprot.html?cp=2_1_0_11#concept_gdr_qlx_vr"&gt;BPROT &amp;mdash; Block protection&lt;/a&gt;&lt;span&gt;&amp;nbsp;peripheral and the&amp;nbsp;&lt;a class="active" title="MWU &amp;mdash; Memory watch unit" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/mwu.html?cp=2_1_0_44#concept_hqv_lq2_1s"&gt;MWU &amp;mdash; Memory watch unit&lt;/a&gt;&amp;nbsp;can be used to protect the RAM.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No, the SoftDevice reserves the highest interrupt levels for its timing critical operations, hence it will always preemt the application, see &lt;a class="" title="Interrupt model and processor availability" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/processor_avail_interrupt_latency.html?cp=2_3_1_0_15"&gt;Interrupt model and processor availability&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a class="active" title="Interrupt priority levels" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=2_3_1_0_15_1"&gt;nterrupt priority levels&lt;/a&gt;&amp;nbsp;in the S132 SDS.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Q2: The SoftDevice uses the Memory Watch Unit(MWU) to sandbox the RAM and peripherals used by the SoftDevice, see &lt;a class="active" title="Memory isolation and runtime protection" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/sd_mgr/mem_isolation_runtime_protection.html?cp=2_3_1_0_4_3"&gt;Memory isolation and runtime protection&lt;/a&gt;&amp;nbsp;in the S132 SoftDevice Specification. The SoftDevice flash region can be protected using the &lt;a class="active" title="BPROT &amp;mdash; Block protection" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/bprot.html?cp=2_1_0_11#concept_gdr_qlx_vr"&gt;BPROT &amp;mdash; Block protection&lt;/a&gt; peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q3: As far as I know the Softdevice is not execution time bound. Once scenario where the SD would hang is if you initialize if with the incorrect LFCLK soucr, i.e. if you configure it to use an external LFXO as the source, but this is not present in the PCB. Otherwise all unrecoverable failures (faults) detected by the SoftDevice will be reported to the application and hten handled accordingly.&amp;nbsp; Yes,&amp;nbsp; you can enable the WDT to recover from stuck code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bj&amp;oslash;rn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>