<?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>Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80416/save-register-information-when-watchdog-reset</link><description>Hi, I use NRF52833 and SW: NCS version 1.4.1 and its zephyr version is 2.4.0. 
 I would like to know if there is method to record program counter, stack pointer information when watchdog reset occurs? 
 I know there is thread mentioned an example on dumping</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Oct 2021 09:09:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80416/save-register-information-when-watchdog-reset" /><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334796?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 09:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed77a7f6-c3d1-4f9e-a306-9069e7f46c32</guid><dc:creator>jay2242</dc:creator><description>&lt;p&gt;Hi Swathy,&lt;/p&gt;
&lt;p&gt;Thanks for your reminding. Its works now.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334391?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 14:09:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b81578ef-9568-48dc-9b5c-8568318cc3e1</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like you are declaring the esf and the esf_crc variable in wdt_stack.h. So the variables get duplicated in main.c and watchdog.c. The variable declaration should be in one of the source files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334286?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 09:08:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7359b6a3-3c9f-4b9d-981a-e770c05e5813</guid><dc:creator>jay2242</dc:creator><description>&lt;p&gt;Hi Swathy,&lt;/p&gt;
&lt;p&gt;I attached zephyr_map.zip. Please unzip it.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zephyr_5F00_map.zip"&gt;devzone.nordicsemi.com/.../zephyr_5F00_map.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334270?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 07:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:403e2817-6e36-4bf4-a848-403844fab1eb</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;Could you provide the map file that is located in&amp;nbsp;&lt;span&gt;&amp;lt;build directory&amp;gt;/zephyr/zephyr.map ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334250?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 03:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1180de44-729b-41ab-b36f-1450214212f7</guid><dc:creator>jay2242</dc:creator><description>&lt;p&gt;Hi Swathy&lt;br /&gt;Thanks for your example: watchdog.zip.&lt;/p&gt;
&lt;p&gt;I tested it on my code. During test, I always get printk message &amp;quot;CRC mismatch&amp;quot;.&lt;br /&gt;Then I print computed_crc, esf_crc and esf as below for your checking.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;computed_crc: 420107693 esf_crc: 0&lt;br /&gt;Exception stack frame:&lt;br /&gt;r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000&lt;br /&gt;r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000000&lt;br /&gt;xpsr: 0x00000000 pc: 0x00000000&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;jay2242&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/334194?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 13:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e326815-239b-41a2-9d76-6ab35eb24ea2</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The experts in our team has been working on this case and have managed to come out with a way to do this. However, it is not fully tested, but it should be ok for debugging purpose. You can take a look at the file I am attaching.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/watchdog.zip"&gt;devzone.nordicsemi.com/.../watchdog.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/333966?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 13:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b48bd6cc-3992-4ed5-8a9f-52c5c16eddff</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I contacted the experts and it is unlikely to do this. Right now, it is not possible to unwind the stack&amp;nbsp;from the WDT callback as there are no helper functions in zephyr to do this. So my answer is that it is not supported.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save register information when watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/333248?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 11:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d513cf49-8eef-41a2-9abc-e5de2aab6162</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;The watchdog example in that thread is run using nRF5 SDK while you are using nRF Connect SDK(NCS). In NCS, you can find a Watchdog example in&amp;nbsp; &lt;strong&gt;NCS\v1.7.0\zephyr\samples\drivers\watchdog.&lt;/strong&gt; However, the example doesn&amp;#39;t demonstrate how to record the stack pointer information when watchdog reset occurs. I will look into it and get back to you on Monday.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>