<?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 example code for nRF51822 Eval Kit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2761/spi-example-code-for-nrf51822-eval-kit</link><description>Hi, I tried uploading the example code from \nrf6310\spi_master_example to nRF51822 evaluation kit board, but no matter what I do, I always get SPI error. Not compile or upload code error, but the actual SPI error. 
 I&amp;#39;ve set the ERROR_PIN_SPI0 to LED0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Aug 2014 07:53:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2761/spi-example-code-for-nrf51822-eval-kit" /><item><title>RE: SPI example code for nRF51822 Eval Kit</title><link>https://devzone.nordicsemi.com/thread/10677?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2014 07:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15e31498-01b8-4a85-8793-5f2d749c68bb</guid><dc:creator>max</dc:creator><description>&lt;p&gt;Hi,
How you configured SPI master to use ADXL362?
i use \pca10001 example but i have an error if i take a SPI master example files from /nrf6310&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example code for nRF51822 Eval Kit</title><link>https://devzone.nordicsemi.com/thread/10676?ContentTypeID=1</link><pubDate>Mon, 23 Jun 2014 15:03:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04e93ebf-8675-47e9-aaf2-2b871ef8c0bb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If you&amp;#39;re using the eval-kit, the pins 8/9/10/11 are connected directly to the SEGGER chip, and it will drive some those lines high. Try changing them to other GPIOs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You&amp;#39;re using printf. Have you mapped printf to something? If not, it will crash the program.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have you tried scoping the SPI lines to see if the data going over the bus is sensible?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is good practice to never let a embedded program return from main. add a while(1) in main.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example code for nRF51822 Eval Kit</title><link>https://devzone.nordicsemi.com/thread/10675?ContentTypeID=1</link><pubDate>Sat, 21 Jun 2014 08:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16a572c3-d994-4870-a754-e33c1f79ba58</guid><dc:creator>David</dc:creator><description>&lt;p&gt;I see, I&amp;#39;m currently using that example code (spi_master_example_with_spi_slave). However, my RXD always returns zero even though it was supposed to read a register with value of non-zero.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve made sure to read the accelerometer datasheet (if you are interested here&amp;#39;s the link: &lt;a href="http://www.analog.com/static/imported-files/data_sheets/ADXL362.pdf"&gt;www.analog.com/.../ADXL362.pdf&lt;/a&gt;, page 19 onwards)&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also made sure that I&amp;#39;m using the correct SPI Mode, correct clock, correct pin numbers and tried reversing the bits, but to no avail. I&amp;#39;m truly confused now, because I strongly believe this code should work, unless there is something else I need to do in that example code that I need to change to enable RXD to receive data? I don&amp;#39;t think the component is broken either, although there is no indicator or such, so it is a hard to say in that regard.&lt;/p&gt;
&lt;p&gt;Here is my code, if you don&amp;#39;t mind checking: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SPI-Accel.zip"&gt;SPI Accel.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example code for nRF51822 Eval Kit</title><link>https://devzone.nordicsemi.com/thread/10674?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2014 14:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8524ea6c-f81a-4bc1-8327-e8e1798abaf1</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The spi_master_example in the SDK is a loopback example, meaning that it will send a sequence of data and expect the same data in return. If it does not receive the same data in return, it will return false and set the error LED.
There&amp;#39;s another SPI master example (spi_master_example_with_spi_slave) that works with the SPI Slave example in the SDK, if that is of interest.&lt;/p&gt;
&lt;p&gt;The SPI-examples will not work out-of-the-box with that sensor.
You&amp;#39;ll have to map up the register definitions for your specific accelerometer and use the SPI init/send/receive functions to communicate with the external sensor, as we do not have any examples for that specific accelerometer.&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>