<?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>Timer not initialized after waking up from sleep mode - NRF52833</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90087/timer-not-initialized-after-waking-up-from-sleep-mode---nrf52833</link><description>Hi All, 
 I have implemented sleep mode in the firmware. I am using NRF52833 in my project. When the device is in idle state it goes in sleep mode. I am able to wakeup my device through GPIO interrupt. After waking up I have observed that the device is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Jul 2022 19:14:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90087/timer-not-initialized-after-waking-up-from-sleep-mode---nrf52833" /><item><title>RE: Timer not initialized after waking up from sleep mode - NRF52833</title><link>https://devzone.nordicsemi.com/thread/377469?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 19:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c671b33-5061-4a59-80f3-0e98386408ab</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&lt;span&gt;sd_power_system_off will put the device in deep sleep. Wakeup from system off will reset the chip and hence your timer will be created again as the chip that wakes from system off executes code from the very beginning (rest handler)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer not initialized after waking up from sleep mode - NRF52833</title><link>https://devzone.nordicsemi.com/thread/377414?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 12:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e838ad9b-5411-4e9f-9cf9-08404369231e</guid><dc:creator>sne_333</dc:creator><description>&lt;p&gt;Hi Susheel,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for your reply.According to your suggesstion I started the timer again using the following commands:-&lt;/p&gt;
&lt;p&gt;if(xTimerStart(max17211_handle, 0 ) != pdPASS ) {&lt;br /&gt; // The timer could not be set into the Active state.&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But still I was not able to see the timer running.&lt;/p&gt;
&lt;p&gt;Does &amp;quot;sd_power_system_off&amp;quot; put the device in deep sleep? And if timers cannot be initialted after deep sleep do we have to reset the controller?/&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;/p&gt;
&lt;p&gt;Snehal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer not initialized after waking up from sleep mode - NRF52833</title><link>https://devzone.nordicsemi.com/thread/377406?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 12:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:046cbf92-8905-4266-a5bf-0384b0fa713c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Snehal,&lt;/p&gt;
[quote user=""] I am using NRF52833 in my project. When the device is in idle state it goes in sleep mode[/quote]
&lt;p&gt;I am assuming that you are talking about the idle sleep (and now system off sleep) and also assuming that you are using tickless idle feature in the freertos to sleep.&lt;/p&gt;
&lt;p&gt;The timer is created only once at startup. Unless you are &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52833%2Fpower.html&amp;amp;cp=4_1_0_4_2_5_2&amp;amp;anchor=unique_1252125978"&gt;waking up from deep sleep&lt;/a&gt; (System OFF sleep) you do not need to recreate the timer. The timer_handle is still valid after waking up from idle sleep.&lt;/p&gt;
&lt;p&gt;Since you have created a one-shot timer (uxAutoReload = 0), you just start the timer again if you want to start the timer again using the same timerHandle you got from xTimerCreateStatic into &lt;a href="https://www.freertos.org/FreeRTOS-timers-xTimerStart.html"&gt;xTimerStart&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>