<?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 NRF51422?? How can i use err_code to debug my nrf51422??</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7468/debugging-nrf51422-how-can-i-use-err_code-to-debug-my-nrf51422</link><description>I&amp;#39;m a beginner, the question might be simple but its really important for me.
where does this error codes get store??
How to make use of err_code and whats the best way to debug my application?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jun 2015 14:42:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7468/debugging-nrf51422-how-can-i-use-err_code-to-debug-my-nrf51422" /><item><title>RE: Debugging NRF51422?? How can i use err_code to debug my nrf51422??</title><link>https://devzone.nordicsemi.com/thread/26589?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 14:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cce1073-9c9a-4218-a19e-f75a117e51ad</guid><dc:creator>syntroniks</dc:creator><description>&lt;p&gt;I wanted to add that I supplied my own app_error_handler and could not get line number &amp;amp; filename without the DEBUG preprocessor directive. Hope this helps someone in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging NRF51422?? How can i use err_code to debug my nrf51422??</title><link>https://devzone.nordicsemi.com/thread/26590?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 06:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4074485b-9ae7-43fb-8482-cc3fb7f1b7da</guid><dc:creator>Rahul Faizu</dc:creator><description>&lt;p&gt;Thanks Martin for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging NRF51422?? How can i use err_code to debug my nrf51422??</title><link>https://devzone.nordicsemi.com/thread/26588?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2015 11:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a977adc-74cd-4b83-9c76-3f8fbb2483dc</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;One way to use the err_code is to define DEBUG globally, like shown in the image, and hence use &lt;code&gt;APP_ERROR_CHECK(err_code);&lt;/code&gt; to assert the error code. This way, if you get an error, you will end up in a while forever loop in &lt;code&gt;app_error_handler()&lt;/code&gt; (defined in app_error.c) and you can find out in which file and line number your error occurred using the debugger.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2043.Debug.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging NRF51422?? How can i use err_code to debug my nrf51422??</title><link>https://devzone.nordicsemi.com/thread/26591?ContentTypeID=1</link><pubDate>Sat, 06 Jun 2015 19:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8378e711-cb99-434f-b2af-abb33addd71d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The error code does not get stored anywhere.
You have to either print it on serial port
&lt;a href="https://devzone.nordicsemi.com/question/21964/uart-debug-logging/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or Segger RTT
&lt;a href="https://devzone.nordicsemi.com/tutorials/6/debugging-with-real-time-terminal/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or you have to set a break in keil debugger and break at the line error is generated and find out what error code is.
Once you know the error code number, you can find its documentation in the relevant header files.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>