<?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>Debugging infinite loop on nrf52 DK restart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77624/debugging-infinite-loop-on-nrf52-dk-restart</link><description>Hello, 
 I&amp;#39;m trying to debug an issue where a function I wrote that should only be called under a specific condition is calling in an infinite loop whenever the program runs for the first time after building/resetting. Here is my main code: 
 
 
 When</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Jul 2021 00:35:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77624/debugging-infinite-loop-on-nrf52-dk-restart" /><item><title>RE: Debugging infinite loop on nrf52 DK restart</title><link>https://devzone.nordicsemi.com/thread/320580?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 00:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a54afe42-bbd2-49cb-8ff4-19a06dbe4e94</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;I solved the issue.&amp;nbsp; I realized that the reset counter was incrementing quickly since it was inside a while loop, and changed the condition to only increment based on the number of button presses instead of the number of times the while loop repeated.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>