<?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>nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48087/nrf51822-s130-hardfault-error</link><description>My old question 
 SDK: 12.1.0 
 SOFTDEVICE: s130 
 CHIP: nrf51822_xxac 256KB flash, 32KB ram 
 I have used to store application data in flash using sd_flash_write and erase functions. 
 I get the application data communicating smart phone by ble. 
 First</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jun 2019 09:57:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48087/nrf51822-s130-hardfault-error" /><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/192000?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 09:57:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1192e62c-7c35-4c8a-9dd5-6947584b0961</guid><dc:creator>_maibi</dc:creator><description>&lt;p&gt;Farther debugging, I found something. Could you check this?&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/48438/what-is--fdata-sections-in-gcc"&gt;devzone.nordicsemi.com/.../what-is--fdata-sections-in-gcc&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190782?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 12:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ef7ef6-57b4-4d64-afe0-9b4a42fdccab</guid><dc:creator>_maibi</dc:creator><description>&lt;p&gt;very strange behavior. the error suddenly disappear. I just re-compile and test repeatedly.&lt;/p&gt;
&lt;p&gt;I have been making first and second flash dump&amp;nbsp;files. but... this error never happen..&amp;nbsp;&amp;nbsp;bother me for several days..&lt;/p&gt;
&lt;p&gt;this is related on my old question. only gcc has error but keil. and repeatedly compile with keil. sometimes similar error occur too.&lt;/p&gt;
&lt;p&gt;It is very confusing. Certainly there is a hidden problem.&lt;/p&gt;
&lt;p&gt;Is it possible that something is wrong with using the sd_flash functions?&lt;/p&gt;
&lt;p&gt;Or&amp;nbsp;Could it be a problem caused by a wrong cast?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190765?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 11:57:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7de4c7f6-6e08-45ad-aa5c-ef861d797dfd</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="_maibi"]I get address of function&amp;nbsp;m_conn_params_config.evt_handler: 0x257A9.[/quote]
&lt;p&gt;It looks like a valid address, so my assumption was wrong. Can you upload the flash content before and after the first connection? I.e., a flash dump of when it works, and another when it get the hardfault?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190756?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 11:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcee296d-0836-4c12-8fda-67a2bc8449ff</guid><dc:creator>_maibi</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;212 line in ble_conn_params.c file

// Notify the application that the procedure has succeded
if (m_conn_params_config.evt_handler != NULL)
{
    ble_conn_params_evt_t evt;
    evt.evt_type = BLE_CONN_PARAMS_EVT_SUCCEEDED;
    NRF_LOG_RAW_INFO(&amp;quot;m_conn_params_config.evt_handler: %X\r\n&amp;quot;, (uint32_t) m_conn_params_config.evt_handler);
    NRF_LOG_FLUSH();
    if (m_conn_params_config.evt_handler == (uint32_t*) 0x257A9) {
        m_conn_params_config.evt_handler(&amp;amp;evt);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I get address of function&amp;nbsp;m_conn_params_config.evt_handler: 0x257A9. To make sure function address I&amp;nbsp;add&amp;nbsp;if statement. but same.&lt;/p&gt;
&lt;p&gt;first connection&amp;nbsp;print debug string &amp;quot;&lt;span&gt;m_conn_params_config.evt_handler: 0x257A9.&amp;nbsp;&lt;/span&gt;&amp;quot; two times. but second connection doesn&amp;#39;t print anything in ble_conn_params.c file.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="124" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1559647999450v1.png" width="409" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;#0 0xfffffffe in ?? ()&lt;br /&gt;No symbol table info available.&lt;br /&gt;#1 &amp;lt;signal handler called&amp;gt;&lt;br /&gt;No symbol table info available.&lt;br /&gt;#2 0xffffff00 in ?? ()&lt;br /&gt;No symbol table info available.&lt;/p&gt;
&lt;p&gt;I think.. I have to track these stack address...&lt;/p&gt;
&lt;p&gt;How do you think about?&lt;/p&gt;
&lt;p&gt;and attached flash readout file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8712.flash.txt"&gt;devzone.nordicsemi.com/.../8712.flash.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190660?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 07:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5110580c-1f06-42bf-8374-02bcacc71e05</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The event value should have been &amp;#39;0&amp;#39;&amp;nbsp; (BLE_CONN_PARAMS_EVT_FAILED so something is wrong. Did you try to read out flash?&lt;/p&gt;
&lt;p&gt;I guess the function pointer is invalid (m_conn_params_config.evt_handler) since the next frame is at 0x..FF00.&amp;nbsp; If you want you can try verify this by placing a breakpoint at line 215 in ble_conn_params.c then print out the value.&lt;/p&gt;
&lt;p&gt;1. b ble_conn_params.c:215&lt;/p&gt;
&lt;p&gt;2. print&amp;nbsp; m_conn_params_config.evt_handler&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190639?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 00:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a592e859-0c05-4e27-922d-87b62b3450d4</guid><dc:creator>_maibi</dc:creator><description>&lt;p&gt;&lt;img height="196" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1559608924653v1.png" width="439" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;thanks for your reply! I checked &amp;quot;&lt;span&gt;where full&lt;/span&gt;&amp;quot; command.&lt;/p&gt;
&lt;p&gt;why this error occur? It is related on function&amp;nbsp;&lt;span&gt;conn_params_negotiation in&amp;nbsp;&lt;/span&gt;on_conn_params_update.&lt;/p&gt;
&lt;p&gt;could you help me track this error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 s130 hardfault error</title><link>https://devzone.nordicsemi.com/thread/190552?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 14:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ab701de-0de7-4a5c-919f-fa867d38aeb2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In GDB, try to use &amp;quot;where full&amp;quot; command to get a stack trace. It may show the last function call that caused the hardfault if you&amp;#39;re lucky.&amp;nbsp;&lt;/p&gt;
[quote user=""]what does mean pc value 0xfffffffe? Is it softdevice error?[/quote]
&lt;p&gt;I&amp;#39;m not sure what it means to be honest.&amp;nbsp;It should have been the address of your hardfault handler. I&amp;#39;d suggest that you read out the flash memory before and after the failure, then compare the content to verify that you haven&amp;#39;t erased the application&amp;#39;s vector table, etc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Reading memory with nrfjprog:&lt;/p&gt;
&lt;p&gt;nrfjprog --memrd 0x0 --n&amp;nbsp; 0x40000 &amp;gt; flash.txt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>