<?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>SPI Library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15114/spi-library</link><description>Hello,
I am looking for a SPI library which is simple enough to send and receive a byte from sensor. Something like this. for nRF51 
 spiwrite(ADDRESS, BYTEtoSEND); 
 val = spiread(ADDRESS); 
 is there anyone to help me. I am finding it so hard to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Jan 2017 07:27:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15114/spi-library" /><item><title>RE: SPI Library</title><link>https://devzone.nordicsemi.com/thread/57720?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2017 07:27:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f85e68-8c0a-4217-a884-19a177071701</guid><dc:creator>Harsha</dc:creator><description>&lt;p&gt;Hi Francisco,
Yes I could now read the ADXL362. My VDD is 2.1v so I am not using any logic level shifting. But Even when the VDD is 3.3v you may not require level shifting. What problem are you facing exactly?.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Library</title><link>https://devzone.nordicsemi.com/thread/57719?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 20:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d547842-a564-4e3a-95aa-eacd5820f11f</guid><dc:creator>Francisco Martinez</dc:creator><description>&lt;p&gt;Harsha,&lt;/p&gt;
&lt;p&gt;Did you manage to read from the ADXL362 sensor? I have a similar question and would like to know how you wired the sensor to the chip. Specifically, did you need logic-level shifting or pull-up/pull-down resistors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Library</title><link>https://devzone.nordicsemi.com/thread/57718?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 12:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f616776f-2bf8-49fb-9f22-30b0a16da686</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, as long as you initialize the driver according to the documentation, then to read the XYZ-data registers you would have to do something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t err_code;

uint8_t tx_buffer[8] = {0x0B, 0x0E, 0 , 0 , 0 , 0 , 0 , 0};
uint8_t rx_buffer[8];

err_code = nrf_drv_spi_transfer(&amp;amp;m_spi_master_0, tx_buffer, sizeof(tx_buffer), rx_buffer, sizeof(rx_buffer));
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Library</title><link>https://devzone.nordicsemi.com/thread/57717?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 09:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4de0fef-5e08-48e4-8397-a4a0b6b2ae65</guid><dc:creator>Harsha</dc:creator><description>&lt;p&gt;Thanks. I am trying to read ADXL362 from Analog Devices. Low Power MEMS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Library</title><link>https://devzone.nordicsemi.com/thread/57716?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 09:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c8a22c8-aa07-4eba-a930-dc11f55f634b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I am afraid that the SPI driver is not going to be as easy to use as the pseudocode in your question, but its not that hard to use. I recommend taking a look at the driver documentation on our Infocenter, found here. It contains a couple of code snippets showing how to use the driver.&lt;/p&gt;
&lt;p&gt;BTW: Which sensor are you trying to read from?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>