<?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>ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42389/ble_app_uart-spi-only-works-with-connected-j-link</link><description>Hi, 
 I am working on the ble_app_uart which should forward data to the SPI port of the nRF52832. 
 It all works fine while the J-Link is connected. If I want to run my application without attached debugger it does not work. It gets stuck in SPI transfer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Jan 2019 15:04:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42389/ble_app_uart-spi-only-works-with-connected-j-link" /><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/167987?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 15:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ca989a-b1fe-4859-98ed-9347426d40dc</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Thanks for the feedback.&lt;/p&gt;
&lt;p&gt;For completeness, could you say how that buffer was previously declared?&lt;/p&gt;
&lt;p&gt;ie, what was the &amp;quot;wrong&amp;quot; way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/167981?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 14:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f05af8f-1312-4db9-9056-9f2b17b7c6f8</guid><dc:creator>5IM00N</dc:creator><description>&lt;p&gt;Sorry for the late reply. I found my mistake. I declared the TX buffer the wrong way in my other project. So the firmware probably crashed.&lt;/p&gt;
&lt;p&gt;Right way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t       m_tx_buf[] = TEST_STRING;           /**&amp;lt; TX buffer. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps someone. And thank to all for the help! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165372?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 09:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c9aa6d3-1c1b-4573-bd70-ec3a51ca3166</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&amp;quot;&lt;span&gt;My last data command should be 0x12 (1 Byte) but after that I get an additionally byte with 0xFF. In both cases. But this should not be transfered.&amp;quot;&lt;br /&gt;&lt;br /&gt;I think you&amp;#39;re experiencing PAN&lt;a href="https://www.nordicsemi.com/DocLib/Content/Errata/nRF52832_Rev2/latest/ERR/nRF52832/Rev2/latest/anomaly_832_58"&gt;[58] SPIM: An additional byte is clocked out when RXD.MAXCNT = 1&lt;/a&gt;. Check out the workaround described in the errata doc.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165194?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 14:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e62a3a8c-d612-45bb-a2cd-a4e2519b0f87</guid><dc:creator>5IM00N</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/42389/ble_app_uart-spi-only-works-with-connected-j-link/165169"][/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt; Are you using a Nordic board, or something else?&lt;/p&gt;
&lt;p&gt;I am using the Nordic DK. On my custom PCB the behavior is the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt; What sensor is it? How is it connected to the board? Are you sure that there is a good ground connection between sensor &amp;amp; board?&lt;/p&gt;
&lt;p&gt;I am controlling an e-paper display with 4kByte imagedata.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll check the GND connection. I just soldered 10cm of wire between the two devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165191?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 14:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d21f0707-873a-4f76-bc8e-46c217166239</guid><dc:creator>5IM00N</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/42389/ble_app_uart-spi-only-works-with-connected-j-link/165169"][/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp; What, exactly, do you mean by &amp;quot;connected&amp;quot; ?&lt;/p&gt;
&lt;p&gt;With connected I mean that I choose &amp;quot;Target&amp;quot; &amp;gt; &amp;quot;Connect J-Link&amp;quot;&amp;nbsp; in the SES IDE.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If it is disconnected and I choose &amp;quot;Target&amp;quot; &amp;gt; &amp;quot;Download ble_app...&amp;quot; and push the reset button, it stucks in the SPI routine waiting for the slave to respond after 4kByte data transmission. Then, if I connect J-Link and push the reset button again it starts working fine.&lt;/p&gt;
&lt;p&gt;&amp;gt; Or do you mean it only works when run under the debugger?&lt;/p&gt;
&lt;p&gt;So I think the debugger is running even if I dont step through the code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt; Do you just mean when the cable is physically in place, but the JLink is not in use?&lt;/p&gt;
&lt;p&gt;The USB cable is always plugged in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165188?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 13:59:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42b2c210-090a-4e09-a990-0e46d748673e</guid><dc:creator>5IM00N</dc:creator><description>&lt;p&gt;Yes, I did this the signals looks good.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Working (with J-Link connected): The slave needs about 8 seconds to process the data and respond.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1547225125473v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Not working (without J-Link connected): The slave could not interpret or process the data. Why does this depend on J-Link?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1547225214474v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I just analyzed the last data which was transmitted before it get stuck.&lt;/p&gt;
&lt;p&gt;My last data command should be 0x12 (1 Byte) but after that I get an additionally byte with 0xFF. In both cases. But this should not be transfered.&lt;/p&gt;
&lt;p&gt;Is there a 16 Bit SPI mode? Or something like that?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165169?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 13:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2192ae3e-c0f4-41a0-91e9-9d174e688768</guid><dc:creator>awneil</dc:creator><description>[quote userid="76135" url="~/f/nordic-q-a/42389/ble_app_uart-spi-only-works-with-connected-j-link"]It all works fine while the J-Link is connected[/quote]
&lt;p&gt;What, exactly, do you mean by &amp;quot;connected&amp;quot; ?&lt;/p&gt;
&lt;p&gt;Do you just mean when the cable is physically in place, but the JLink is not in use?&lt;/p&gt;
&lt;p&gt;Or do you mean it only works when run under the debugger?&lt;/p&gt;
&lt;p&gt;Or something else?&lt;/p&gt;
&lt;p&gt;Are you using a Nordic board, or something else?&lt;/p&gt;
&lt;p&gt;What sensor is it? How is it connected to the board? Are you sure that there is a good ground connection between sensor &amp;amp; board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart + spi only works with connected J-Link</title><link>https://devzone.nordicsemi.com/thread/165167?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 13:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c533150f-d919-453b-a974-18c6de71de02</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You need to scope your i/o lines with a digital logic analyzer and compare the two states.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>