<?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>App timer hard fault when running without debugger</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97119/app-timer-hard-fault-when-running-without-debugger</link><description>NRF52 on custom hardware 
 SDK 17.0.1 
 SoftDevice 7.2 
 
 I have a timer running, one shot or repeated, that blinks an LED. 
 It works just fine when run from the debugger but if I hit stop, or try to run disconnected from the Segger it hard faults.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Mar 2023 13:41:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97119/app-timer-hard-fault-when-running-without-debugger" /><item><title>RE: App timer hard fault when running without debugger</title><link>https://devzone.nordicsemi.com/thread/413041?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 13:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40afeea1-d84b-4c77-852e-147e1b19b287</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;When you get a hardfault, does the program end up in the&amp;nbsp;HardFault_Handler() function? I do not understand what it could be that causes a hardfault when don&amp;#39;t have BLE or constant latency mode enabled.&amp;nbsp;&lt;/p&gt;
[quote user="Keith V"]I had turn all that off trying to get lower power to work, I&amp;#39;m seeing 500ua average with no advertising. So I&amp;#39;m back to that issue[/quote]
&lt;p&gt;500 uA indicates that a peripheral is requesting the HF clock source in idle. You will also get this if you still have constant latency enabled. Do you have any peripherals apart from RTC enabled in this test?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer hard fault when running without debugger</title><link>https://devzone.nordicsemi.com/thread/412797?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 15:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2459b147-5489-4ead-9105-81b0d918c6ee</guid><dc:creator>Keith V</dc:creator><description>&lt;p&gt;Adding&amp;nbsp;NRF_POWER-&amp;gt;TASKS_CONSTLAT = 1; does fix the hard fault, the decoupling caps are correct.&lt;/p&gt;
&lt;p&gt;But, the real problem is I had all that BLE code commented out When I turn it back on I don&amp;#39;t get hard faults either.&lt;/p&gt;
&lt;p&gt;I had turn all that off trying to get lower power to work, I&amp;#39;m seeing 500ua average with no advertising. So I&amp;#39;m back to that issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer hard fault when running without debugger</title><link>https://devzone.nordicsemi.com/thread/412510?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 13:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f56bccd-fa51-4f83-93fc-385bd886dad6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As a test to help narrow down the problem, can you please try to enable the constant latency power mode (&lt;a title="Sub power modes" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=5_2_0_17_2_0#unique_1754445551"&gt;Sub power modes&lt;/a&gt;) at the beginning of main() to see if it has the same effect as running the chip in debug interface mode?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Constant latency mode can be enabled by writing the following register (Note: must be done prior to softdevice enable):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; int main(void)
 {
        NRF_POWER-&amp;gt;TASKS_CONSTLAT = 1;
        ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I wonder if what you are seeing&amp;nbsp;could be related to&amp;nbsp;wrong decoupling capacitors on your board, same as discussed in this thread:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75722/wierd-hardfault/315447"&gt;RE: Wierd hardfault&lt;/a&gt;&amp;nbsp;.&amp;nbsp;This could explain why you&amp;nbsp;are not experiencing the issue in debug interface mode, as this mode will prevent the chip from entering its lowest power saving modes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>