<?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>problem with serial flash memory interface</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101375/problem-with-serial-flash-memory-interface</link><description>Hi, 
 My board is using nRF52805. I am trying to interface SPI interface serial flash. I modified the sdk_config.h file. My code is as bellow. 
 Code is stuck in nrf_drv_spi_init(); When I put the debug message in nrf_drv_spi_init(), like printf(&amp;quot;nrf_drv_spi_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jul 2023 15:07:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101375/problem-with-serial-flash-memory-interface" /><item><title>RE: problem with serial flash memory interface</title><link>https://devzone.nordicsemi.com/thread/434271?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:07:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7328e32c-2783-4d5e-97d0-8bead9a8040b</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;That should not be a problem&lt;/p&gt;
&lt;p&gt;You may combine spi and ble related code from relevant examples.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with serial flash memory interface</title><link>https://devzone.nordicsemi.com/thread/434047?ContentTypeID=1</link><pubDate>Sat, 01 Jul 2023 07:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20ae75b2-0823-472d-b499-b0bae37249aa</guid><dc:creator>paul0208</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I found that&amp;nbsp;nrf_drv_spi_init() in the&amp;nbsp;example&amp;nbsp;of /peripheral/spi, does return success result.&lt;br /&gt;But my call nrf_drv_spi_init() does not return anything one, stucking in rnf_drv_spi_init().&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;example&amp;nbsp;&lt;/span&gt;&lt;span&gt;of&lt;/span&gt;&lt;span&gt;&amp;nbsp;/peripheral/spi does not use softdevice, but my app use softdevice.&lt;br /&gt;&lt;/span&gt;Is it can be a reason of stucking in nrf_drv_spi_init();?&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with serial flash memory interface</title><link>https://devzone.nordicsemi.com/thread/433910?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 11:07:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bf1ca21-35ba-4dbf-b1c6-be3a5615d351</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello Sangdo Lee,&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;The&lt;strong&gt; spi initializer&lt;/strong&gt; function would take the driver instance, initial configurations, handler function, and the context passed to event handler&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t nrf_drv_spi_init	(   nrf_drv_spi_t const *const 	    p_instance,
                                nrf_drv_spi_config_t const * 	p_config,
                                nrf_drv_spi_evt_handler_t 	    handler,
                                void * 	                        p_context 
                            )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The function would return the code with one of the following values:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SUCCESS	If initialization was successful
NRF_ERROR_INVALID_STATE	If the driver was already initialized
NRF_ERROR_BUSY	If some other peripheral with the same instance ID is already in use&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I suggest not to put printk() and/or any kind of debugging / logging statements in the initializer function and rather check what value the function is returning in your main code.&lt;/p&gt;
&lt;p&gt;Here is an example of checking return value in the nrf5 sdk17.1.0 in the /peripheral/spi/ sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;APP_ERROR_CHECK(nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, spi_event_handler, NULL));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>