<?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>Segger Ozone causes a soft device error when trying to debug or reset during debugging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47464/segger-ozone-causes-a-soft-device-error-when-trying-to-debug-or-reset-during-debugging</link><description>Utilizing SDK 15.2 and Softdevice S132, when debugging with Segger Ozone and starting from main or after triggering a reset to restart at main an ERROR 8 [NRF_ERROR_INVALID_STATE] is produced when nrf_sdh_enable_request is called. I have reproduced this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Feb 2021 16:38:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47464/segger-ozone-causes-a-soft-device-error-when-trying-to-debug-or-reset-during-debugging" /><item><title>RE: Segger Ozone causes a soft device error when trying to debug or reset during debugging</title><link>https://devzone.nordicsemi.com/thread/294049?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 16:38:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d95a799d-9f25-4307-b116-34cd9c8cf8ab</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;I found that I also needed to adjust PC =&amp;nbsp;Elf.GetEntryPointPC(); to PC = Target.ReadU32(VectorTableAddr + 4);&lt;/p&gt;
&lt;p&gt;This thread plus this wiki entry on Segger site helped solved the problem properly for me.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.segger.com/Ozone_detects_wrong_application_entry_point"&gt;wiki.segger.com/Ozone_detects_wrong_application_entry_point&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Ozone causes a soft device error when trying to debug or reset during debugging</title><link>https://devzone.nordicsemi.com/thread/203130?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 14:39:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd0a4087-f3b4-4e0a-be1a-c97c47b07ae3</guid><dc:creator>Bertram</dc:creator><description>&lt;p&gt;Thanks for that answer.. solved the problem for me.&lt;/p&gt;
&lt;p&gt;I am using FreeRTOS and it hardfaulted shortly into the SVC handler triggered by FreeRTOS function vPortStartFirstTask() during RTOS startup. Until i applied this solution.&lt;/p&gt;
&lt;p&gt;Just for those not fluent in Ozone (like me who had to research where and what the line &amp;quot;VectorTableAddr = Elf.GetBaseAddr()&amp;quot; is about), its the ozone project .jdebug file. It contains a C like script program, it is a bunch of functions that is run on different events in Ozone.&lt;/p&gt;
&lt;p&gt;Search replace &amp;quot;VectorTableAddr = Elf.GetBaseAddr();&amp;quot; to &amp;quot;&lt;span&gt;VectorTableAddr = 0;&amp;quot; - restart Ozone and you should be good to go.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Ozone causes a soft device error when trying to debug or reset during debugging</title><link>https://devzone.nordicsemi.com/thread/187777?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 07:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8451f19a-b25a-4da6-b8fa-c283705ca1c0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is great to hear the root cause is found.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Ozone causes a soft device error when trying to debug or reset during debugging</title><link>https://devzone.nordicsemi.com/thread/187734?ContentTypeID=1</link><pubDate>Sat, 18 May 2019 23:44:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:264a2297-7d42-400e-ad3a-55bec78128a5</guid><dc:creator>dlip</dc:creator><description>&lt;p&gt;Root issue is that ozone is starting execution at the reset_handler of the app rather than the looking to the vector table at the base of flash and running whatever it points to (i.e. reset code for sd).&amp;nbsp; Simplest fix is to change the line VectorTableAddr = Elf.GetBaseAddr() to VectorTableAddr = 0 in both AfterTargetReset and AfterTargetLoad.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>