<?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>NRF52832 SPI Driver  Issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47851/nrf52832-spi-driver-issue</link><description>Hi: 
 When I recently debugged the SPI driver, I found that when I used nrf_drv_spi_transfer to read the SPI to receive the return value, the first byte was always 0xFF. Actually, starting from the second byte was the correct value I wanted. According</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 May 2019 06:07:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47851/nrf52832-spi-driver-issue" /><item><title>RE: NRF52832 SPI Driver  Issue</title><link>https://devzone.nordicsemi.com/thread/190018?ContentTypeID=1</link><pubDate>Thu, 30 May 2019 06:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e59f3c07-fac6-4750-b95b-3e53958f4394</guid><dc:creator>bevis</dc:creator><description>&lt;p&gt;Thank you very much!&amp;nbsp;After many days of repeated comparisons, the root cause of the problem was finally found. The SPI will have a return value of 0xFF immediately after the Tx data starts. If the SPI library function provided by MCU platform is read-write integration, read BUFF must be set to NULL at the beginning of TX, TX BUFF must be set to NULL at the time of need to read, if not for NULL, it will trigger the receiving of extra bytes and cause program errors. For example, I want 0x4016. If BUFF is not NULL when I write instructions, I will get 0xFF4016 when I read real instructions. Like STM32, there is a SPI interface that provides a single write byte or read a single byte at the bottom of the library function. All debugging does not find these details. Attention should be paid to some drivers that provide good secondary packaging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SPI Driver  Issue</title><link>https://devzone.nordicsemi.com/thread/189816?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 09:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adf1fb9f-5e3a-469f-a7a9-a6d66afd9276</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Is the first TX byte a read command? If that&amp;#39;s the case then the RX buffer will be filled with whatever the state of the rx pin is during the first byte.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>