<?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>Code crashed inside &amp;quot;otMessageRead&amp;quot; in otCoapSendRequest&amp;#39;s callback function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84731/code-crashed-inside-otmessageread-in-otcoapsendrequest-s-callback-function</link><description>Hi, 
 I am using &amp;quot;otCoapSendRequest&amp;quot; to send data to my coap server. 
 Inside the callback, I am using otMessageRead, to read the response. 
 But my code crashed inside otMessageRead. If I comment this line then my code runs smoothly. 
 Following is the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Feb 2022 14:51:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84731/code-crashed-inside-otmessageread-in-otcoapsendrequest-s-callback-function" /><item><title>RE: Code crashed inside "otMessageRead" in otCoapSendRequest's callback function</title><link>https://devzone.nordicsemi.com/thread/352936?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 14:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5491abf5-6867-436d-821d-e58aaca74b98</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Do you know exactly what function that you added that trigger this fatal error?&lt;/p&gt;
&lt;p&gt;If not, you can look into the tool addr2line from&amp;nbsp;GNU Arm Embedded Toolchain (which you probably have installed, but may not be in your PATH.&lt;/p&gt;
&lt;p&gt;The addresses you want to check using this tool is the address from r15/pc (the actual address may change when you recompile, so check your latest log). In this case it was 0x00056520. To check it, use this in your command line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-none-eabi-addr2line -e zephyr\zephyr.elf 0x00056520&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;from inside your build folder.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also check the address in r14/lr, which is the address of the function calling the function that triggered the error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What line/function is it pointing to?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>