<?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>Issue integrating SPI peripheral with BLE peripheral (nRF52840, SDK 17.1.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123934/issue-integrating-spi-peripheral-with-ble-peripheral-nrf52840-sdk-17-1-0</link><description>Hello, 
 I have developed a BLE Peripheral application on the nRF52840 (SDK 17.1.0) which works correctly. Later, I tried to integrate/port an SPI peripheral example into the same project. 
 After merging the two, I started getting the following error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Aug 2025 13:06:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123934/issue-integrating-spi-peripheral-with-ble-peripheral-nrf52840-sdk-17-1-0" /><item><title>RE: Issue integrating SPI peripheral with BLE peripheral (nRF52840, SDK 17.1.0)</title><link>https://devzone.nordicsemi.com/thread/546924?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2025 13:06:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac809d60-34ac-48c3-b042-bba932b9e24b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Please be aware that NRF5 SDK is deprecated and has no development since 2020. We strongly suggest to move to our new platform nRF Connect SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to step into the code and debug. For example you can check what at line&amp;nbsp;282 in main.c . You can step into the code and check why it returns&amp;nbsp;NRF_ERROR_INVALID_STATE . Most likely the function was called multiple times (The driver was already initialized) causing the error. But in that case you can just ignore the error or remove the second call. See the description of the function here:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1756299958205v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>