<?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>Issues With SPI master</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60920/issues-with-spi-master</link><description>Hello! 
 Iam trying to get the spi function to work properly on my thingy 52 device. 
 My problem is that the transfer wont stop when it should in my opinion, i have analyzed the MOSI and SCK (no slave connected yet) on a logic analyzer 
 and can see</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 May 2020 12:27:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60920/issues-with-spi-master" /><item><title>RE: Issues With SPI master</title><link>https://devzone.nordicsemi.com/thread/247861?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 12:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53c70ec6-6e5c-472a-82fc-5b43a2fca286</guid><dc:creator>Rilleaa</dc:creator><description>&lt;p&gt;It works fine now no problem with the event handler, the issue was how i handled the information within the event handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thx for the help :).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues With SPI master</title><link>https://devzone.nordicsemi.com/thread/247718?ContentTypeID=1</link><pubDate>Sat, 02 May 2020 19:03:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14d9a106-ce0b-4da9-ae2e-120d590873d5</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hmm, it shouldn&amp;#39;t behave this way. SPI doesn&amp;#39;t look at sending characters,&amp;nbsp;&lt;span&gt;sizeof(m_tx_buf)-1 should work the same way as&amp;nbsp;sizeof(m_tx_buf). Maybe LA trace could clarify things..&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues With SPI master</title><link>https://devzone.nordicsemi.com/thread/247703?ContentTypeID=1</link><pubDate>Fri, 01 May 2020 21:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:962650ca-3b02-423e-b186-f7031e76c076</guid><dc:creator>Rilleaa</dc:creator><description>&lt;p&gt;Hi Dmitry thx for the reply.&lt;/p&gt;
&lt;p&gt;I will take a look att this tomorrow when i have access to the logic analyzer again.&lt;/p&gt;
&lt;p&gt;What i did notice is when i changed the code to&amp;nbsp; m_length = sizeof(m_tx_buf)-1; the event handler i have for the spi wasn&amp;#39;t called. Could that be because&amp;nbsp;nrf_drv_spi_transfer() is looking for that terminationg zero as a indication that transfer is complete?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues With SPI master</title><link>https://devzone.nordicsemi.com/thread/247697?ContentTypeID=1</link><pubDate>Fri, 01 May 2020 19:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed810d95-9b04-428e-b090-6344502b3a53</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;sizeof() operator returns memory size allocated for an object - in case of string, it includes terminating zero character. You can either simply substract one, or define your string as an array of chars (without trailing zero):&lt;/p&gt;
&lt;p&gt;#define TEST_STRING {&amp;#39;T&amp;#39;,&amp;#39;H&amp;#39;,&amp;#39;I&amp;#39;,&amp;#39;N&amp;#39;,&amp;#39;G&amp;#39;,&amp;#39;Y&amp;#39;}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>