<?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>adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126135/adding-softdevice-ble-s140-with-gpio-attached-coprocessor-to-project-without-softdevice-hardfault-calling-existing-code-after-softdevice-active</link><description>I am extending one of Qorvo&amp;#39;s UWB platforms.. adding Softdevice BLE functions.. (which work ok) (this is on sdk 17_1_0) 
 the coprocessor uses a GPIO connected signaling mechanism, using interrupts.. 
 calling the existing code after BLE is active causes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Mar 2026 20:31:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126135/adding-softdevice-ble-s140-with-gpio-attached-coprocessor-to-project-without-softdevice-hardfault-calling-existing-code-after-softdevice-active" /><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/562357?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2026 20:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd3f181-adc5-4875-b82d-859527cc0d5b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;br /&gt;I haven&amp;#39;t looked deep into the function but you can find the documentation in nrfx_spim.h file in&amp;nbsp;\modules\nrfx\drivers\include in our SDK. The source code is in src\nrfx_spim.c .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My understanding is that the function will do both reading and writing at the same time as SPI can do full duplex.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/562239?ContentTypeID=1</link><pubDate>Fri, 27 Feb 2026 15:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6be79fb6-fcaa-4f3c-a89b-e02c47c0190a</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;ok, I am now at the spot where I think I have to implement this..&amp;nbsp; the buffer and&amp;nbsp;link time placement is easy..&lt;br /&gt;&lt;br /&gt;usage is not so much&lt;br /&gt;&lt;br /&gt;they are using&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;#if NRFX_SPIM_ENABLED
		nrf_spim_enable(spi-&amp;gt;type.spim.p_reg);

		const nrfx_spim_xfer_desc_t xfer_desc = { xfer-&amp;gt;tx_buf, xfer-&amp;gt;tx_size, xfer-&amp;gt;rx_buf,
							  xfer-&amp;gt;rx_size };
		result = nrfx_spim_xfer(&amp;amp;spi-&amp;gt;type.spim, &amp;amp;xfer_desc, xfer-&amp;gt;flags);
#else
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t find any doc on this.(nrfx_spim_xfer) . my assumption is this could be write then read, (depending on flags)&lt;br /&gt;so I set the spim_buffer I created as write from, and copy the write data there, set the read buffer same place, and copy the read data from there to the address specified by caller&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/561126?ContentTypeID=1</link><pubDate>Fri, 13 Feb 2026 14:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3ca6fc5-9690-4dd0-801e-d61ff15f1540</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;no answer from Qorvo.. ill add the manual workaround..&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558742?ContentTypeID=1</link><pubDate>Wed, 14 Jan 2026 23:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38eb1f43-8634-4e1c-a5f9-ed8effefe598</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;I have asked Qorvo if they NEED spim3..&lt;/p&gt;
&lt;p&gt;waiting&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558565?ContentTypeID=1</link><pubDate>Tue, 13 Jan 2026 09:17:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dcf3d4a-40b1-45db-a9bd-e9c6afb52a2d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;br /&gt;The sample I provided is the workaround for the issue that the default workaround for Anomaly 198 will cause a crash when using with softdevice. You need to define a dedicated RAM block for SPIM3 that doesn&amp;#39;t overlap the RAM reserved by the softdevice.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you try to implement the memory configuration similar to what showed in the example ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558527?ContentTypeID=1</link><pubDate>Mon, 12 Jan 2026 15:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24a67499-9766-4047-aa23-6c0c3a05e7c4</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;not my firmware, so I don&amp;#39;t know..&lt;/p&gt;
&lt;p&gt;they have another package on this card that uses the same build model and mostly source, but with SoftDevice and the setting is off.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the spim_buffer (from your link map)&amp;nbsp; is not defined in either build, on the same 52840.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so I don&amp;#39;t know if that is a bug in their code or ...&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and its the old SDK 17&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;oh, they use SD 113 (perf only), I use 140 (as I need central too)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558497?ContentTypeID=1</link><pubDate>Mon, 12 Jan 2026 11:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45a2baad-7c08-4945-a493-68adbfd178b3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You mentioned earlier &amp;quot;if I comment out the 198 anomaly test it hardfaults in the nrfx_spim, irq_handler,&amp;quot;&amp;nbsp;&lt;br /&gt;Could you explain what has been changed ?&amp;nbsp;&lt;br /&gt;My understanding now is that you have it working both BLE and SPIM3 ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Is there any option to use other SPIM instead of SPIM3 ? So that we can avoid errata 198. Please find this note in the SDK&amp;#39;s release note (Known issue):&amp;nbsp;&lt;br /&gt;&lt;em&gt;- The workaround for Anomaly 198 for nRF52840 SPIM3 peripheral&lt;/em&gt;&lt;br /&gt;&lt;em&gt; that has been implemented in nrfx_spim cannot be used with a SoftDevice.&lt;/em&gt;&lt;br /&gt;&lt;em&gt; Flag NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED must be set to zero.&lt;/em&gt;&lt;br /&gt;&lt;em&gt; The workaround based on a dedicated RAM block for SPIM3 must be used instead.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;If SPIM3 is a must, then you will have to use the solution to use dedicated RAM block for SPIM3.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One my coworkers have made an example a few years back. I attached the project (SDK v17.1.0) and the instruction here:&amp;nbsp;&lt;br /&gt;=========&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_beacon_5F00_spim.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_beacon_5F00_spim.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Look at the flash placement file:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643899919993v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;To see how this reserves one RAM block for the SPI, and then in main.c how it allocates the spim buffer to be within this block.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Then you should use this buffer for your SPI when you initialize it. The softdevice will not touch the allocated ram block.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Give it a go, and let me know how it works in your application. Please note that you can see where this RAM block ends up (this is dynamic). If the application grows too big, then it will go into ram block 8, and things may start to get messy with the callstack and so on. You should see this after compiling:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643900092775v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558423?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2026 16:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2fc4093-8216-419d-a540-25825c58bad7</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;I went thru all the code, found one place setting power state, only used for SPI, not SPIM, also not loaded in binary&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I put a stop of the code that fails,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;using the table link above&amp;nbsp;&lt;/p&gt;
&lt;p&gt;R0 = 0x4002F000&lt;br /&gt;&lt;br /&gt;which says SPIM3&lt;/p&gt;
&lt;p&gt;if I run from there, another stop at the same place, like the interrupt is not cleared.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if I disable the stop, I get a hard fault.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so, added more debug info..&amp;nbsp; i save the spim object address and as the interrupts are redirected to a common interrupt handler I save the spim number all prior to the code causing the fault.&lt;/p&gt;
&lt;p&gt;the number is 3 (spim3)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and the saved spim pointer is the same as above , in LSB format&amp;nbsp;00 F0 02 40&lt;br /&gt;&lt;br /&gt;anyhow.. still confused.. and in the latest fault it was saving the spim pointer address that faulted..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;interesting..&amp;nbsp; &amp;nbsp;directly before the fault location is this in nrfx_spim.c&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#if NRFX_CHECK(NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;if (p_spim == NRF_SPIM3)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;anomaly_198_disable();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I commented it out.. and now no fault..&amp;nbsp; I can run my BLE operations..&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68556/enabling-workaround-for-anomaly-198-crashes-softdevice"&gt;devzone.nordicsemi.com/.../enabling-workaround-for-anomaly-198-crashes-softdevice&lt;br /&gt;&lt;br /&gt;I&lt;/a&gt;&amp;nbsp;have changed the define in sdk_config.h to 0 instead of 1&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558265?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2026 12:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a9a349e-2025-4567-9302-38d7fb37d192</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;br /&gt;I&amp;#39;m looking at this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;app_error_fault_handler id=1001, pc=75B0C, info =1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Error ID=1001 means&amp;nbsp;NRF_FAULT_ID_APP_MEMACC. Here is the description for this error:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Application invalid memory access. The info parameter will contain 0x00000000,
in case of SoftDevice RAM access violation. In case of SoftDevice peripheral
register violation the info parameter will contain the sub-region number of
PREGION[0], on whose address range the disallowed write access caused the
memory access fault.&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The info =&amp;nbsp; 1 so it match with bit number 0 in the table:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52840/page/memory.html#topic"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52840/page/memory.html#topic&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I suspect it either CLOCK control or POWER control. You can try to disable the protection of the subregion to see it&amp;#39;s actually the cause of the fault :&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_MWU-&amp;gt;PREGION[0].SUBS &amp;amp;= ~(MWU_PREGION_SUBS_SR0_Include &amp;lt;&amp;lt; MWU_PREGION_SUBS_SR0_Pos);
__DSB(); // barrier to ensure register is set before accessing NVMC or ACL.&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Both CLOCK and POWER is restricted access when the softdevice is active (see 7.1 in the softdevice SDS .pdf file) . You may want to check if you have&amp;nbsp;SOFTDEVICE_PRESENT defined in your preprocessor definitions.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558087?ContentTypeID=1</link><pubDate>Tue, 06 Jan 2026 23:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85eb927e-f83e-4885-89e3-5996997db0f0</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;this IS one of the functions I called out before as having code optimization problems however&lt;/p&gt;
&lt;p&gt;this line of code generated&amp;nbsp; a pointer of 2 for p_cb&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; spim_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx];&lt;/p&gt;
&lt;p&gt;I have to change it like this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;spim_control_block_t * p_cb = m_cb+p_instance-&amp;gt;drv_inst_idx;&lt;br /&gt;&lt;br /&gt;I reported this in Qorvo forums,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;p_instance-&amp;gt;drv_inst_idx = 2&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;rfx_err_t nrfx_spim_xfer(nrfx_spim_t const * const p_instance,&lt;br /&gt;nrfx_spim_xfer_desc_t const * p_xfer_desc,&lt;br /&gt;uint32_t flags)&lt;br /&gt;{&lt;br /&gt;spim_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx]; &amp;lt;---- this sets the p_cb pointer to 2!!&lt;/p&gt;
&lt;div class="codeblock-button-wrapper"&gt;&lt;/div&gt;
&lt;pre class="codeblock-buttons"&gt;&lt;code class="hljs language-css" data-highlighted="yes"&gt;change &lt;span class="hljs-selector-tag"&gt;to&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="codeblock-button-wrapper"&gt;&lt;/div&gt;
&lt;pre class="codeblock-buttons"&gt;&lt;code&gt;spim_control_block_t * p_cb = m_cb+p_instance-&amp;gt;drv_inst_idx;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;&lt;a id="" href="https://forum.qorvo.com/t/dw3-qm33-sdk-bug-and-some-code-optimization-questions/24569"&gt;https://forum.qorvo.com/t/dw3-qm33-sdk-bug-and-some-code-optimization-questions/24569&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have fixed all of those m_cb pointers in nrfx_spim.c, but same value in r3&amp;nbsp;at fault time&lt;br /&gt;and its repeatable,&amp;nbsp; across buils, so its not a random value.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/558075?ContentTypeID=1</link><pubDate>Tue, 06 Jan 2026 17:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12a30a63-f2b5-4058-8587-9c3459d58d33</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;thanks..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the config data looks like 20035CC0&lt;/p&gt;
&lt;p&gt;10 11 17 14 00 03 FF 00&amp;nbsp; 00 00 00 40 00 00 00 00&amp;nbsp; 00 00 00 00 00 00 00 01&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;sck = 10&lt;/p&gt;
&lt;p&gt;mosi = 11&lt;/p&gt;
&lt;p&gt;miso = 17&lt;/p&gt;
&lt;p&gt;ss_pin = 14&lt;/p&gt;
&lt;p&gt;ss_active_high = 00&lt;/p&gt;
&lt;p&gt;irq_priority = 03, which matches the define used,&amp;nbsp; CONFIG_SPI_UWB_IRQ_PRIORITY=3&lt;/p&gt;
&lt;p&gt;fill char&amp;nbsp; = FF&lt;/p&gt;
&lt;p&gt;the hard fault is a write access fault at 75B0C , app_error_fault_handler id=1001, pc=75B0C, info =1&lt;/p&gt;
&lt;p&gt;from the link map that is&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;irq_handler&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000075aec&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x5c&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_spim.c.obj)&amp;nbsp; &amp;lt;----- here&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.text.SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000075b48&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x10&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_spim.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;disassembly window&lt;/p&gt;
&lt;p&gt;00075AFE MOV.W R3, #0&lt;br /&gt;anomaly_198_disable();&lt;br /&gt;static void anomaly_198_disable(void)&lt;br /&gt;*((volatile uint32_t *)0x40000E00) = m_anomaly_198_preserved_value;&lt;br /&gt; 00075B02 IT EQ&lt;br /&gt; 00075B04 STREQ.W R3, [R2, #0x0E00]&lt;br /&gt;nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_END);&lt;br /&gt;__STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_reg,&lt;br /&gt;*((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL;&lt;br /&gt; 00075B08 STR.W R3, [R0, #0x0118]&lt;br /&gt;volatile uint32_t dummy = *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event));&lt;br /&gt; 00075B0C LDR.W R3, [R0, #0x0118]&amp;nbsp; &amp;lt;---------------------&amp;nbsp; here&amp;nbsp;&lt;br /&gt; 00075B10 LDRB R0, [R1, #31]&lt;br /&gt; 00075B12 STR R3, [SP, #4]&lt;br /&gt;(void)dummy;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;r3 at the time is 0x00047335, which is in the flash section of the image&amp;nbsp;&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;RAM&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020013000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x000000000002d000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;xrw&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;FLASH&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000027000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x000000000007b000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;xrw&amp;nbsp; &amp;nbsp;&amp;lt;----- here&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CALIB_SHA&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x00000000000fc000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000001000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;rw&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CALIB&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x00000000000fd000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000001000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;rw&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;*default*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000000000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0xffffffffffffffff&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;I added a call to log entry to this function&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;enum&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qerr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;spi_config_master&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qspi&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;spi&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qspi_config&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfx_err_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; NRFX_ERROR_INVALID_PARAM;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;QLOGD&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;spi_config_master.&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;but don&amp;#39;t see that in the&amp;nbsp;ozone terminal window&lt;br /&gt;in the disassembly window that function is not present in memory, but the&amp;nbsp; one following it is&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;here are the IRQ priorities as defined in one of the make files&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: NRFX_CLOCK_CONFIG_IRQ_PRIORITY=6&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: CLOCK_CONFIG_IRQ_PRIORITY=6&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: TIMER_DEFAULT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: RTC_DEFAULT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: WDT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: NRFX_WDT_CONFIG_IRQ_PRIORITY=7&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: NRFX_USBD_CONFIG_IRQ_PRIORITY=5&lt;br /&gt;./Projects/DW3_QM33_SDK/FreeRTOS/Type2AB_EVB-new/ProjectDefinition/uwb_stack_llhw.cmake: USBD_CONFIG_IRQ_PRIORITY=5&lt;br /&gt;&lt;br /&gt;the sdk_config.h only has IRQ priority 6 or 7 as selected&amp;nbsp;&lt;br /&gt;none of those appear to conflict with SD&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;the code before SD inclusion used timer0, but that was changed to timer1 as timer0 is used by SD.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;here is the macros at the end of the ld for overflow checking, etc&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;.heap&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; __HeapBase &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; .&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; __end__ &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; .&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;PROVIDE&lt;/span&gt;&lt;span&gt; (end &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; .)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;.heap&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.heap&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(gcc_startup_nrf52840.S.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; __HeapLimit &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; .&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;.stack_dummy&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x4000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;.stack&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.stack&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020038480&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x4000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(gcc_startup_nrf52840.S.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020040000&lt;/span&gt;&lt;span&gt; __StackTop &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (ORIGIN (RAM) &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; LENGTH (RAM))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x000000002003c000&lt;/span&gt;&lt;span&gt; __StackLimit &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (__StackTop &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;SIZEOF&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;.stack_dummy&lt;/span&gt;&lt;span&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000020040000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;PROVIDE&lt;/span&gt;&lt;span&gt; (__stack &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; __StackTop)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000000001&lt;/span&gt;&lt;span&gt; ASSERT ((__StackLimit &lt;/span&gt;&lt;span&gt;&amp;gt;=&lt;/span&gt;&lt;span&gt; __HeapLimit), region RAM overflowed with stack)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000000fb0&lt;/span&gt;&lt;span&gt; DataInitFlashUsed &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (__bss_start__ &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; __data_start__)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000067ba4&lt;/span&gt;&lt;span&gt; CodeFlashUsed &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (__etext &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ORIGIN (FLASH))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000068b54&lt;/span&gt;&lt;span&gt; TotalFlashUsed &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (CodeFlashUsed &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; DataInitFlashUsed)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000000001&lt;/span&gt;&lt;span&gt; ASSERT ((TotalFlashUsed &lt;/span&gt;&lt;span&gt;&amp;lt;=&lt;/span&gt;&lt;span&gt; LENGTH (FLASH)), region FLASH overflowed with &lt;/span&gt;&lt;span&gt;.data&lt;/span&gt;&lt;span&gt; and user data)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000000020&lt;/span&gt;&lt;span&gt; CONFIG_SECURE_PARTITIONS_UWB_L1_CONFIG_SHA256_SIZE &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x20&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000001000&lt;/span&gt;&lt;span&gt; CONFIG_SECURE_PARTITIONS_UWB_L1_CONFIG_SIZE &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x1000&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557990?ContentTypeID=1</link><pubDate>Tue, 06 Jan 2026 09:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94851170-0ad5-4a8e-8101-29becfc6dbb0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know more about &amp;quot;&lt;span&gt;but I can&amp;#39;t tell which interrupt invoked the handler.&amp;quot;&amp;nbsp; ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you checked how the interrupt for SPIM is enabled ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It&amp;#39;s in this struct when nrfx_spim_init() is called:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;typedef struct
{
    uint8_t sck_pin;      ///&amp;lt; SCK pin number.
    uint8_t mosi_pin;     ///&amp;lt; MOSI pin number (optional).
                          /**&amp;lt; Set to @ref NRFX_SPIM_PIN_NOT_USED
                           *   if this signal is not needed. */
    uint8_t miso_pin;     ///&amp;lt; MISO pin number (optional).
                          /**&amp;lt; Set to @ref NRFX_SPIM_PIN_NOT_USED
                           *   if this signal is not needed. */
    uint8_t ss_pin;       ///&amp;lt; Slave Select pin number (optional).
                          /**&amp;lt; Set to @ref NRFX_SPIM_PIN_NOT_USED
                           *   if this signal is not needed. */
    bool ss_active_high;  ///&amp;lt; Polarity of the Slave Select pin during transmission.
    uint8_t irq_priority; ///&amp;lt; Interrupt priority.
    uint8_t orc;          ///&amp;lt; Overrun character.
                          /**&amp;lt; This character is used when all bytes from the TX buffer are sent,
                               but the transfer continues due to RX. */
    nrf_spim_frequency_t frequency; ///&amp;lt; SPIM frequency.
    nrf_spim_mode_t      mode;      ///&amp;lt; SPIM mode.
    nrf_spim_bit_order_t bit_order; ///&amp;lt; SPIM bit order.
#if NRFX_CHECK(NRFX_SPIM_EXTENDED_ENABLED) || defined(__NRFX_DOXYGEN__)
    uint8_t              dcx_pin;     ///&amp;lt; D/CX pin number (optional).
    uint8_t              rx_delay;    ///&amp;lt; Sample delay for input serial data on MISO.
                                      /**&amp;lt; The value specifies the delay, in number of 64 MHz clock cycles
                                       *   (15.625 ns), from the the sampling edge of SCK (leading edge for
                                       *   CONFIG.CPHA = 0, trailing edge for CONFIG.CPHA = 1) until
                                       *   the input serial data is sampled. */
    bool                 use_hw_ss;   ///&amp;lt; Indication to use software or hardware controlled Slave Select pin.
    uint8_t              ss_duration; ///&amp;lt; Slave Select duration before and after transmission.
                                      /**&amp;lt; Minimum duration between the edge of CSN and the edge of SCK and minimum
                                       *   duration of CSN must stay inactive between transactions.
                                       *   The value is specified in number of 64 MHz clock cycles (15.625 ns).
                                       *   Supported only for hardware-controlled Slave Select. */
#endif
} nrfx_spim_config_t;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you narrowed it down to exactly SPIM interrupt handling causing the crash ? You mentioned &amp;quot;I get an access fault trying to write to the flash in code space&amp;quot; what is it about ? Is it the internal flash or external flash ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding the interrupt priority check, please note that the softdevice crash most likely&amp;nbsp;not because of the new interrupt handler added but more likely of the ones that already configured (but violate the softdevice requirement) so you may want to post the whole list of interrupt priority configuration here.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557863?ContentTypeID=1</link><pubDate>Sun, 04 Jan 2026 17:19:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67140f04-fd25-4bce-bc65-0c5fcc5abbcd</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;so, more investigation&lt;br /&gt;&lt;br /&gt;i&amp;#39;m pretty sure this is an interrupt priority problem, but I can&amp;#39;t find id.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;if U run the routine that fails after SD init,&amp;nbsp; BEFORE Sd init, it starts, no problem.&lt;/p&gt;
&lt;p&gt;when I get to the next step on using the backend chip&lt;/p&gt;
&lt;p&gt;I still get the same nrf_spim_event_clear write protection crash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;in the nrfx_spim.c , in the irq_handler&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the call stack in Ozone doesn&amp;#39;t tell me where the code was before.. I can see it thru the pc address&lt;/p&gt;
&lt;p&gt;but I can&amp;#39;t tell which interrupt invoked the handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;init_log: Backends initialized&lt;br /&gt;create_log_processing_task: init_log completed&lt;br /&gt;create_log_processing_task: Stack allocated&lt;br /&gt;create_log_processing_task: Task created&lt;br /&gt;TEST RTT OUTPUT&lt;br /&gt;board_interface_init: START&lt;br /&gt;board_interface_init: About to init BLE&lt;br /&gt;Role: RoleController&lt;br /&gt;WARNING: UWB MAC initialization skipped - incompatible with SoftDevice&lt;br /&gt;Calling ble_stack_manager_init...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[BLE] === SCANNING ALL INTERRUPTS FOR CONFLICTS ===&lt;br /&gt;[BLE] IRQ 0: priority=6, enabled=1 &lt;br /&gt;[BLE] IRQ 9: priority=7, enabled=1 &lt;br /&gt; &lt;br /&gt;[Fira Init] qplatform_init ok&amp;nbsp; &amp;lt;--- this is the code that failed AFTER sd was started&lt;br /&gt;[Fira Init] l1_config_init ok&lt;br /&gt;[Fira Init] llhw_init ok&lt;br /&gt;[Fira Init] done rc=0&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[BLE] ble_stack_manager_init: 1-nrf_sdh_enable_request&lt;br /&gt;[BLE] ble_stack_manager_init: 2-Configuring SoftDevice for concurrent connections&lt;br /&gt;[BLE] nrf_sdh_ble_default_cfg_set returned: 0, ram_start=0x20013000&lt;br /&gt;[BLE] sd_ble_cfg_set(CONN_CFG_GAP) returned: 0, ram_start=0x20013000 (conn_count=8)&lt;br /&gt;[BLE] ble_stack_manager_init: 3-nrf_sdh_ble_enable&lt;br /&gt;[BLE] Enabling central role: 1 peripheral + 7 central = 8 total connections&lt;br /&gt;[BLE] sd_ble_cfg_set(ROLE_COUNT) returned: 0, ram_start=0x20013000&lt;br /&gt;[BLE] nrf_sdh_ble_enable returned: 0 (0x0)&lt;br /&gt;[BLE] gap_params_init: COMPLETE&lt;br /&gt;[BLE] BLE stack initialized successfully - observer priority=3&lt;br /&gt;ble_stack_manager_init returned: TRUE&lt;br /&gt;BLE init SUCCESS - starting advertising&lt;br /&gt;[BLE] Using manual advertising data encoding...&lt;br /&gt;[BLE] *** BUILDING SCAN RESPONSE: role=1, name=&amp;#39;CN_Controller&amp;#39;, len=13 ***&lt;br /&gt;[BLE] Advertising data: 3 bytes, Scan response: 15 bytes (type=0x09, name=&amp;#39;CN_Controller&amp;#39;)&lt;br /&gt;[BLE] sd_ble_gap_adv_start returned: 0 (handle=0x00)&lt;br /&gt;[BLE] BLE advertising started successfully!&lt;/p&gt;
&lt;p&gt;advertising_start called&amp;nbsp; &amp;lt;--- I can see the BLE device in nrf_connect app&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;now start up the UWB device&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Initializing UCI BLE commands...&lt;br /&gt;[UCI_BLE] uci_ble_commands_init() CALLED&lt;br /&gt;[UCI_BLE] CONTROLLER: Creating UCI manager task...&lt;br /&gt;[UCI_BLE] CONTROLLER: UCI manager task created successfully&lt;br /&gt;UCI BLE commands initialized successfully&lt;br /&gt;=== BLE Init Complete ===&lt;br /&gt;[CTRL_TASK] *** TASK STARTED ***&lt;br /&gt;[CTRL_TASK] Mutex initialized&lt;br /&gt;[CTRL_TASK] Entering main loop, signal=2002C510&lt;br /&gt;[TASK_UCI] calling uci_open_backends&lt;br /&gt;in open_backends&lt;br /&gt;in open_backends uwbmac init ok&lt;br /&gt;in open_backends uci_init ok&lt;br /&gt;in open_backends init coordinator&lt;/p&gt;
&lt;p&gt;[00:00:00.021,847] &amp;lt;debug&amp;gt; nrf_sdh: State request: 0x00000000&lt;br /&gt;[00:00:00.021,854] &amp;lt;debug&amp;gt; nrf_sdh: State change: 0x00000000&lt;br /&gt;[00:00:00.279,301] &amp;lt;debug&amp;gt; nrf_sdh: State change: 0x00000001&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;if the app_error_handler goes all the way thru&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[00:01:01.659,109] &amp;lt;error&amp;gt; app: Fatal error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if I don&amp;#39;t execute that open_backends&lt;/p&gt;
&lt;p&gt;I see this from SD (and can connect thru NRF_Connect)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;[CTRL_TASK] Entering main loop, signal=2002C4C0&lt;br /&gt;[TASK UCI] on entry&lt;br /&gt;[UCI_BLE] *** UCI MANAGER TASK STARTED (CONTROLLER MODE) ***&lt;br /&gt;[UCI_BLE] Performing late initialization in UCI manager task...&lt;br /&gt;[UCI_BLE] Late initialization: Creating UCI BLE queues and tasks...&lt;br /&gt;[UCI_BLE] Notification task started&lt;br /&gt;[UCI_BLE] Ranging continuation task created successfully&lt;br /&gt;[UCI_BLE] Ranging queue and task initialization complete&lt;br /&gt;[UCI_BLE] Ranging continuation task started - will process queued ranging requests&lt;br /&gt;log_processing_task: Started&lt;br /&gt;[UCI_BLE] Beacon notification semaphore created&lt;br /&gt;[UCI_BLE] UCI execution queue created successfully at 20030E58&lt;br /&gt;[UCI_BLE] CONTROLLER: UCI execution task already running (created in init)&lt;br /&gt;[UCI_BLE] Task handle: 2002BE30&lt;br /&gt;[UCI_BLE] Free heap: 14704 bytes&lt;br /&gt;[UCI_BLE] ***** UCI execution queue initialization COMPLETE *****&lt;br /&gt;[UCI_BLE] Late initialization complete - queue=20030E58&lt;br /&gt;[UCI_BLE] *** UCI_EXEC task ready to process messages from queue ***&lt;br /&gt;[UCI_BLE] Delaying 50ms before entering main loop...&lt;br /&gt;[UCI_BLE] *** ENTERING MAIN LOOP - will check queue and flags every 100ms ***&lt;br /&gt;[BLE] scan_evt_handler called! evt_id=6&lt;br /&gt;[BLE] QWR module assigned to connection handle 0x0007&lt;br /&gt;[BLE] BEACON: Initializing system attributes (for QWR)&lt;br /&gt;[BLE] BEACON: System attributes initialized successfully&lt;br /&gt;[BLE] CONTROLLER: Connection accepted from phone app&lt;br /&gt;[BLE] Conn handle: 0x0007, Peer address: 7B:D3:06:09:B6:4E (type 2)&lt;br /&gt;[BLE] Connection allowed - waiting for commands from phone&lt;br /&gt;[BLE] WRITE EVENT: handle=0x000D, op=1, len=2&lt;br /&gt;[BLE] Command char value=0x0010, CCCD=0x0011&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so, SD is up and running, and the IRQ setup BEFORE sd worked.&amp;nbsp;&lt;br /&gt;but turning it on , causes the fault in spim.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added an u=interrupt enabled checker before and after the one call&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;irq&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;irq&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;48&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;irq&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;span&gt; // nRF52840 has 48 interrupts&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; priority &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NVIC_GetPriority&lt;/span&gt;&lt;span&gt;((IRQn_Type)irq);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; enabled1 &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NVIC_GetEnableIRQ&lt;/span&gt;&lt;span&gt;((IRQn_Type)irq);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;// Only report enabled interrupts or those with problematic priorities&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (enabled1){&lt;/span&gt;&lt;span&gt; //} (priority == 0 || priority == 1 || priority == 4)) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;SEGGER_RTT_printf&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;&amp;quot;IRQ &lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt;: priority=&lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt;, enabled=&lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;%s&lt;/span&gt;&lt;span&gt;\r\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;//QLOGD(&amp;quot;IRQ %d: priority=%d, enabled=%d %s&amp;quot;, &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;irq&lt;/span&gt;&lt;span&gt;, priority, enabled1,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; (priority &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;||&lt;/span&gt;&lt;span&gt; priority &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;||&lt;/span&gt;&lt;span&gt; priority &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;?&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;*** CONFLICT ***&amp;quot;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;[BLE] before 1 === SCANNING ALL INTERRUPTS FOR CONFLICTS ===&lt;br /&gt;IRQ 0: priority=6, enabled=1 &lt;br /&gt;IRQ 9: priority=7, enabled=1&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[Fira Init] qplatform_init ok&lt;br /&gt;[Fira Init] l1_config_init ok&lt;br /&gt;[Fira Init] llhw_init ok&lt;br /&gt;[Fira Init] done rc=0&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[BLE] after === SCANNING ALL INTERRUPTS FOR CONFLICTS ===&lt;br /&gt;IRQ 0: priority=6, enabled=1&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;IRQ 9: priority=7, enabled=1&lt;/p&gt;
&lt;p&gt;all these are newly enabled, but very low priority&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;IRQ 6: priority=7, enabled=1&lt;/p&gt;
&lt;p&gt;IRQ 10: priority=7, enabled=1&lt;/p&gt;
&lt;p&gt;IRQ 27: priority=7, enabled=1 &lt;br /&gt;IRQ 36: priority=7, enabled=1 &lt;br /&gt;IRQ 39: priority=5, enabled=1 &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557742?ContentTypeID=1</link><pubDate>Tue, 30 Dec 2025 14:24:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:215f5a5f-d79e-40a8-9c65-f0ccf372d5a1</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;BLE thru softdevice works great. Pair w phone, scan and connect downstream peripherals, send/receive data, notifications&lt;/p&gt;
&lt;p&gt;now I want to execute other code, unchanged from the Qorvo distribution. have found two code optimization problems, and this crash in the interrupt handler looks similar , if I stop in ozone there the pointer looks good,&lt;/p&gt;
&lt;p&gt;course sd is unhappy with the delay&amp;nbsp;&lt;/p&gt;
&lt;p style="text-align:left;"&gt;if I don&amp;rsquo;t stop I get an access fault trying to write to the flash in code space. &amp;nbsp;Makes no sense. Tried different compiler versions, optimization settings. &amp;nbsp;Weird&lt;br /&gt;&lt;br /&gt;also, if I do this setup BEFORE SD init, then SD fails, BUT the other code does NOT..&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t see any shared resources.. interrupts, levels, ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557713?ContentTypeID=1</link><pubDate>Tue, 30 Dec 2025 09:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42d173a2-350f-46b0-b5c6-d27646d4cc11</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&lt;br /&gt;Let&amp;#39;s us know if you find out something wrong with the SPIM interrupt handler. Again, check the interrupt priority level and check if there is anything not expected calling inside that handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To narrow down the root cause I would suggest to try turning off SPIM to see if you can start the softdevice and do BLE correctly first.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Happy holidays !&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557440?ContentTypeID=1</link><pubDate>Fri, 19 Dec 2025 14:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6b4f3a7-6f89-454c-82e5-46544be9342f</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;after thinking about it overnight, I don&amp;#39;t think FDS is involved..&amp;nbsp; I am debugging again now.. I think there might be another address optimization problem.. cause we fault in the SPIM interrupt handler&lt;/p&gt;
&lt;p&gt;I WILL need FDS and have adjusted the ld file to reserve the space when I get there..&lt;/p&gt;
&lt;p&gt;and I understand about using the fstorage api and letting the backend handle it..&amp;nbsp;&lt;br /&gt;&lt;br /&gt;happy holidays.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557434?ContentTypeID=1</link><pubDate>Fri, 19 Dec 2025 13:45:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2bb7461-2490-4327-8b60-2cc84ea5bb75</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;br /&gt;Could you explain more why SPIM related to flash ? Maybe check the interrupt priority of SPI interrupt?&lt;br /&gt;&lt;br /&gt;Note that the requirement is only about internal flash. The reason I mentioned that is that I noticed &amp;quot;&lt;span&gt;nrfx_nvmc_page_erase&amp;nbsp;&amp;quot; call in your log.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note that FDS uses fstorage under the hood and you can choose between fstorage and fstorage_sd when you use it without or with Softdevice.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I will be a away for vacation until the end of the year. So there will be delay in the answer unfortunately. &lt;br /&gt;Wish you a Merry Xmas !&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557367?ContentTypeID=1</link><pubDate>Thu, 18 Dec 2025 19:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:622767bb-f982-45ef-96a0-ad8eed89bd57</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;the title&amp;nbsp; is more correct..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;oh, spim relates to flash.. ??&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I can only assume that the project I built on does not have&amp;nbsp;FDS enabled, and checking the sdk_config.h that is true.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;a lot of knowledge needed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;they have a project that has SD peripheral mode, and put the FDS segments at 7D000-800000&lt;/p&gt;
&lt;p&gt;but that is in the middle of the large 52840 flash space..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;on the non-SD project, they don&amp;#39;t have any space for FDS so I&amp;#39;ll have to figure out&amp;nbsp; all that and how to indicate to use the SD apis for it.&amp;nbsp; part of my extensions need small amount of persistent storage&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557329?ContentTypeID=1</link><pubDate>Thu, 18 Dec 2025 13:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e0fcaf8-0988-48b7-9961-c578306f4364</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam,&amp;nbsp;&lt;br /&gt;So it seems that it didn&amp;#39;t crash in&amp;nbsp;&lt;span&gt;nrfx_gpiote_is_init() ?&amp;nbsp;&lt;br /&gt;But it has something with the SPI&amp;nbsp;transfer/IRQ handler&amp;nbsp;instead ?&amp;nbsp;&lt;br /&gt;Could you check what&amp;#39;s the context (interrupt priority) when this function is called ?&amp;nbsp;&lt;br /&gt;Also could you check&amp;nbsp;how flash is handled in the code ? Note that when the softdevice is enabled, flash operation has to be handled by Softdevice&amp;#39;s flash API&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557218?ContentTypeID=1</link><pubDate>Wed, 17 Dec 2025 13:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b7e7d3-93e6-415d-a9b1-902cf79e6fbd</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;if I comment out the 198 anomaly test&lt;/p&gt;
&lt;p&gt;it hardfaults in the nrfx_spim, irq_handler,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_END))
__STATIC_INLINE bool nrf_spim_event_check(NRF_SPIM_Type * p_reg,
return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event);
00079E94 F8D0 3118 LDR.W R3, [R0, #0x0118]
00079E98 2B00 CMP R3, #0
00079E9A D03A BEQ 0x00079F12 ; &amp;lt;irq_handler&amp;gt;+0x7E
00079E9C B500 PUSH {LR}
00079E9E B083 SUB SP, SP, #12
if (p_spim == NRF_SPIM3)
00079EA0 4B1C LDR R3, =0x4002F000 ; [PC, #112] [0x00079F14]
00079EA2 4298 CMP R0, R3
00079EA4 D022 BEQ 0x00079EEC ; &amp;lt;irq_handler&amp;gt;+0x58
nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_END);
__STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_reg,
*((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL;
00079EA6 2300 MOVS R3, #0
00079EA8 F8C0 3118 STR.W R3, [R0, #0x0118] &amp;lt;-------- hardfault here&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557142?ContentTypeID=1</link><pubDate>Tue, 16 Dec 2025 22:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea4eb3f0-f94a-492d-a12d-50850507250c</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;redoing the code&amp;nbsp; for * p_cb&amp;nbsp; like this&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;spim_control_block_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; p_cb &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; m_cb&lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;p_instance&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;drv_inst_idx&lt;/span&gt;&lt;span&gt;; // array +type increment vs [index]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;if I step thru I get a hardfault from SD, id=1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;br /&gt;if I don&amp;#39;t step thru, I get the memory access error again, pc 7a34c&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;still in&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;from the map&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;.text.nrfx_spim_xfer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0007a294&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x204&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_spim.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0007a294&lt;/span&gt;&lt;span&gt; nrfx_spim_xfer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;from the code disassembly window&amp;nbsp; at the pc of the fault&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; {&lt;br /&gt; anomaly_198_enable(p_xfer_desc-&amp;gt;p_tx_buffer, p_xfer_desc-&amp;gt;tx_length);&lt;br /&gt; 0007A3C0 LDR.W R5, [LR]&lt;br /&gt; 0007A3C4 LDR.W R1, [LR, #4]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;source&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#if&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_CHECK&lt;/span&gt;&lt;span&gt;(NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (p_spim &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; NRF_SPIM3)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;anomaly_198_enable&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;p_xfer_desc&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;p_tx_buffer&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;p_xfer_desc&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;tx_length&lt;/span&gt;&lt;span&gt;);&amp;nbsp; &amp;lt;---- fault here&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557122?ContentTypeID=1</link><pubDate>Tue, 16 Dec 2025 15:55:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c59e1ebb-3b27-498b-90c6-adddf0e38bf0</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;I moved the code around,&amp;nbsp; memset the whole buffer, then copied in the data, didnt increment the pointer as its not used after that&amp;nbsp;&lt;br /&gt;and got all the way to qplatform&amp;nbsp;qspi_transceive&lt;/p&gt;
&lt;p&gt;and&amp;nbsp;nrfx_spim_xfer(&amp;amp;spi-&amp;gt;type.spim, &amp;amp;xfer_desc, xfer-&amp;gt;flags);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;which faults, per the above&amp;nbsp; item 1.&amp;nbsp; &amp;nbsp;the send and receive buffers are valid.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;if I step in more&amp;nbsp;&lt;/p&gt;
&lt;p&gt;rfx_err_t nrfx_spim_xfer(nrfx_spim_t const * const p_instance,&lt;br /&gt; nrfx_spim_xfer_desc_t const * p_xfer_desc,&lt;br /&gt; uint32_t flags)&lt;br /&gt;{&lt;br /&gt; spim_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx];&amp;nbsp; &amp;lt;-------- this drv_inst_idx member doesn&amp;#39;t appear in the popup for p_instance, I can see it before the call to&amp;nbsp; xfer&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; NRFX_ASSERT(p_cb-&amp;gt;state != NRFX_DRV_STATE_UNINITIALIZED);&lt;br /&gt; NRFX_ASSERT(p_xfer_desc-&amp;gt;p_tx_buffer != NULL || p_xfer_desc-&amp;gt;tx_length == 0);&lt;br /&gt; NRFX_ASSERT(p_xfer_desc-&amp;gt;p_rx_buffer != NULL || p_xfer_desc-&amp;gt;rx_length == 0);&lt;br /&gt; NRFX_ASSERT(SPIM_LENGTH_VALIDATE(p_instance-&amp;gt;drv_inst_idx,&lt;br /&gt; p_xfer_desc-&amp;gt;rx_length,&lt;br /&gt; p_xfer_desc-&amp;gt;tx_length));&lt;/p&gt;
&lt;p&gt;nrfx_err_t err_code = NRFX_SUCCESS;&lt;/p&gt;
&lt;p&gt;if (p_cb-&amp;gt;transfer_in_progress)&amp;nbsp; &amp;lt;---- p_cb = 0x00000002&lt;br /&gt; {&lt;br /&gt; err_code = NRFX_ERROR_BUSY;&lt;br /&gt; NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,&lt;br /&gt; __func__,&lt;br /&gt; NRFX_LOG_ERROR_STRING_GET(err_code));&lt;br /&gt; return err_code;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; if (p_cb-&amp;gt;handler &amp;amp;&amp;amp; !(flags &amp;amp; (NRFX_SPIM_FLAG_REPEATED_XFER |&lt;br /&gt; NRFX_SPIM_FLAG_NO_XFER_EVT_HANDLER)))&lt;br /&gt; {&lt;br /&gt; p_cb-&amp;gt;transfer_in_progress = true;&amp;nbsp; &amp;nbsp;// this faults... setting low memory.(0x00000002).&amp;nbsp;&lt;br /&gt; }&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/spim.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see in the popup, its m_cb[2].. so it saw drv_inst_idx&lt;/p&gt;
&lt;p&gt;but p_cb ends up being 2?????&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/spim2.jpeg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557115?ContentTypeID=1</link><pubDate>Tue, 16 Dec 2025 15:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ee450ad-6b23-4b54-865b-29fa2225ce5c</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;Qorvo doesn&amp;#39;t provide support for single startup developers like me..&amp;nbsp;&lt;br /&gt;&lt;br /&gt;i have two different results from debugging&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;1.&lt;/p&gt;
&lt;p&gt;so, if I stop in the weak&amp;nbsp;app_error_fault_handler&lt;br /&gt;id = 0x1001&amp;nbsp; =&amp;nbsp;NRF_FAULT_ID_APP_MEMACC&lt;br /&gt;and the PC s 8093a , which is about halfway thru&amp;nbsp;nrfx_spim_xfer&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the info value is 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;from the build link map&amp;nbsp;&lt;/p&gt;
&lt;p&gt;```text&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.text.nrfx_spim_uninit&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x00000000000807b8&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0xc8&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_spim.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x00000000000807b8&lt;/span&gt;&lt;span&gt; nrfx_spim_uninit&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.text.nrfx_spim_xfer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000080880&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x218&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_spim.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000080880&lt;/span&gt;&lt;span&gt; nrfx_spim_xfer &amp;lt;------- after 80880&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.text.nrfx_nvmc_page_erase&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000080a98&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x38&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Nordic/libSDK.a&lt;/span&gt;&lt;span&gt;(nrfx_nvmc.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x0000000000080a98&lt;/span&gt;&lt;span&gt; nrfx_nvmc_page_erase &amp;lt;----- before here&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.text.nrfx_nvmc_words_write&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;```&lt;br /&gt;&lt;br /&gt;interesting.. but&amp;nbsp;&lt;br /&gt;2.&lt;br /&gt;&amp;nbsp; I step thru the code and get to this routine.&amp;nbsp;&lt;br /&gt;```&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;int32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qplatform_uwb_spi_read&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uint16_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;header_length&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;header_buffer&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint16_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;read_length&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;read_buffer&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; /* Read always bring header length on return. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;rxtx_size&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;read_length&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;header_length&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;temp_tx_buf&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;enum&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qerr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;rxtx_size&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DATA_BUFFER_SIZE&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;QERR_ENOMEM&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;memcpy&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;header_buffer&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;header_length&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;+=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;header_length&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;memset&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;read_length&lt;/span&gt;&lt;span&gt;);&amp;nbsp; &amp;lt;-------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qplatform_uwb_spi_transfer&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;rxtx_size&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;temp_tx_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;rxtx_size&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;temp_rx_buf&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;temp_rx_buf&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;header_length&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; /* Remove received address character. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;memcpy&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;read_buffer&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;temp_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;read_length&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;QERR_SUCCESS&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;}&lt;br /&gt;```&lt;br /&gt;&lt;br /&gt;on entry, header_length=1, read_length=4&lt;br /&gt;at the&amp;nbsp;if&amp;nbsp;(rxtx_size , rxtx_size = 4 ????? say what , should be 5???&lt;br /&gt;at the&amp;nbsp;memcpy(temp_buf,&amp;nbsp;header_buffer,&amp;nbsp; &amp;nbsp; &amp;nbsp;temp_buf&amp;nbsp;points to the variable&amp;nbsp;temp_tx_buf , found in the link map at&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;```&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.bss.temp_tx_buf&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x00000000200271e4&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0xc8&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;qplatform/libqplatform.a&lt;/span&gt;&lt;span&gt;(qplatform.c.obj)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;```&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span&gt;```&lt;br /&gt;at the&amp;nbsp;memset(temp_buf,&amp;nbsp;0x00, temp_buf is 0x00000001!!!!!! &amp;lt;--------===========&lt;br /&gt;and causes a memory access fault.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;EVERY SINGLE TIME...&amp;nbsp;&lt;br /&gt;I cannot stop at the temp_buf+=, so I think this is a code optimization problem.&amp;nbsp; &amp;nbsp;I changed build def to -o1 from -o3, but no change in results..&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I just updated my gcc from 10.3 to 14.3..&amp;nbsp; &amp;nbsp;no change&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;as these variables are on the stack, I increased this FREETOS stack size to 7k from 6, no change&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557077?ContentTypeID=1</link><pubDate>Tue, 16 Dec 2025 11:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b56e2a1-a691-4646-ac65-1f97e30eca4e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Sam, th&lt;br /&gt;As showed in the documentation there are some requirement on how interrupt handling should be implemented when using softdevice. You would need to check if there is any other interrupt that may violate the requirement.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try to step the code or use log to see what exactly cause the problem. Have you checked the hardfault handling instruction that I pointed to ?&amp;nbsp;&lt;br /&gt;I would suggest to get Qorvo support involved as they should have sample that has Softdevice included.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding Softdevice BLE (S140) with GPIO attached coprocessor to project without softdevice.  hardfault calling existing code after Softdevice active</title><link>https://devzone.nordicsemi.com/thread/557019?ContentTypeID=1</link><pubDate>Mon, 15 Dec 2025 20:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b755295b-6ed9-4732-afd4-9e97d8165420</guid><dc:creator>rexxdad</dc:creator><description>&lt;p&gt;I don&amp;#39;t know, not my code.. it is the Qorvo UWB handling code which works..&lt;br /&gt;another implementation has BLE Softdevice using S113 sd..&amp;nbsp; &amp;nbsp;uses a different approach to interrupt setup, but that source is not provided..&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>