<?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>nRF52840 SPIM cannot get input data, while oscilloscope signals are right.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76575/nrf52840-spim-cannot-get-input-data-while-oscilloscope-signals-are-right</link><description>Hi everybody! My application is based on SDK 17.02. I try to communicate with an spi device using spim driver and the code is basically based on the nrfx-spim example. 
 After some effort, now I managed to get the right signals on a oscilloscope. But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jun 2021 04:28:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76575/nrf52840-spim-cannot-get-input-data-while-oscilloscope-signals-are-right" /><item><title>RE: nRF52840 SPIM cannot get input data, while oscilloscope signals are right.</title><link>https://devzone.nordicsemi.com/thread/316581?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 04:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65f9b3d8-6bf3-408d-908e-ebd40a1f74b5</guid><dc:creator>SuirenEngineer</dc:creator><description>&lt;p&gt;Thanks for reply. I have just solved the problem. just look at&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;NRF_LOG_HEXDUMP_INFO(m_rx_buf, strlen((const char *)m_rx_buf));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When the fisrt byte received by the spim driver is 0x00, strlen((const char *)m_rx_buf)) will return 0. Thus the callback will print nothing for ever. So I tried to print m_rx_buf[1] and finally I got the device ID. Maybe the sdk examples should fix this emmm...bug?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPIM cannot get input data, while oscilloscope signals are right.</title><link>https://devzone.nordicsemi.com/thread/316490?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 13:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd55802-673b-4178-8b5e-75e133f0c198</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]After some effort, now I managed to get the right signals on a oscilloscope.[/quote]
&lt;p&gt;I am not sure I understand your issue correctly; could you confirm for me whether this means that you are able to see the right output signals by your device (but not receiving a reply from your SPIS device), or if you mean that you are seeing correct outbound and inbound communication on the bus, but it is not showing up in your application?&lt;br /&gt;&lt;br /&gt;Are you entering into the callback handler every time a transfer is complete?&lt;br /&gt;Is this part of an application that uses BLE in addition to the SPIM communication (i.e is there a SoftDevice present and enabled)?&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>