<?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>Merging SPI, TWI and Buttonless dfu</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30584/merging-spi-twi-and-buttonless-dfu</link><description>Hi Everyone 
 I am working on nrf52832 with sdk 14.0.0 on iar IDE. TWI and SPI separately working fine in buttonless_dfu then i merged SPI and TWI in buttonless_dfu itself but due to adding both codes they stuck . . 
 i also try to change the priority</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Mar 2018 09:42:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30584/merging-spi-twi-and-buttonless-dfu" /><item><title>RE: Merging SPI, TWI and Buttonless dfu</title><link>https://devzone.nordicsemi.com/thread/122777?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2018 09:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a22a318-0771-47c4-8620-b5a1c9565c10</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What IRQ level are you calling the SPI functions from? Where does the code get stuck? Is it in a &amp;quot;while (!spi_xfer_done)&amp;quot;? Or is it an APP_ERROR_CHECK() that returns?&lt;/p&gt;
&lt;p&gt;Or does the code run fine, but it is only the transfer of data that is not working? Have you tried to analyse the MOSI pin, using a logic analyzer or an oscilloscope?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Would it be possible to send a stripped down version of the product that can reproduce the issue?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merging SPI, TWI and Buttonless dfu</title><link>https://devzone.nordicsemi.com/thread/122235?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 08:55:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0460d9ee-29ab-4d17-afa0-48b15ba47f89</guid><dc:creator>adityaj</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for&amp;nbsp;reply,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We&amp;nbsp;were using same instance of i2c and spi and same priority for both that causing device stuck. Now we are using twi0 and spi1 now it working and changed the priority also.&lt;/p&gt;
&lt;p&gt;Now the problem is as described below:&lt;/p&gt;
&lt;p&gt;in our application we are trying to write a chunk of 4.8k bytes to external spi flash w25q32fw (winbond flash),&amp;nbsp;collected from sensors interfaced with I2C lines. The SPI behavior is very random as some time all the commands and data goes well into external flash and sometime it fails. It seems likes MOSI line is not working properly. We also debugged the issue on CRO and saw same behavior.&lt;/p&gt;
&lt;p&gt;The SPI code is as follows&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_flash.c"&gt;devzone.nordicsemi.com/.../spi_5F00_flash.c&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merging SPI, TWI and Buttonless dfu</title><link>https://devzone.nordicsemi.com/thread/121195?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 08:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd65e9d5-6409-4f94-9e9b-f8ba2c52e100</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Could you please describe in what way it is &amp;quot;stuck&amp;quot;? Does the code compile? Does it run, but you can&amp;#39;t see anything on the SPI or TWI (or both), or does it crash due to an APP_ERROR_CHECK()? If you set a breakpoint on the last line before the for (;;) loop, does it hit, or does it stop before this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you also try to define &amp;quot;DEBUG&amp;quot; in your preprocessor defines, set optimization to 0 (-O0), and set a breakpoint in app_error.c on line 73, and see if it breaks there?&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>