<?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>How to Switch from spi0 to i2c0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/900/how-to-switch-from-spi0-to-i2c0</link><description>Hi 
 i am using NRf51822 custom board. In that i have NOR(spi0) and LED(i2c0). 
 But switching from spi0 to i2c0 is not possible so that i am not able to switch 
 off led. But once i comment the spi_master_init(), led is going to off. 
 I know both</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Nov 2013 11:05:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/900/how-to-switch-from-spi0-to-i2c0" /><item><title>RE: How to Switch from spi0 to i2c0</title><link>https://devzone.nordicsemi.com/thread/4382?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 11:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd1be9a1-b7ad-4001-9434-cd3963c9ffb0</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;As you can see in the instance table (table 3 in the nRF51 Reference Manual), SPI0 and TWI0 share the same register space. You can therefore not use them simultaneously. Instead, I&amp;#39;d recommend you to either use SPI0 and TWI1 (or opposite), or make sure to disable SPI0 by writing the appropriate value to the ENABLE register and only after this initialize TWI0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Switch from spi0 to i2c0</title><link>https://devzone.nordicsemi.com/thread/4381?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2013 15:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e17b114-8907-4af3-8d94-5ca3869746be</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It means for NOR i am using spi0 bus and for LED i am using i2c0 bus.&lt;/p&gt;
&lt;p&gt;Here is Pseudo code:&lt;/p&gt;
&lt;p&gt;twi_master_init();                                                //i2c0 initialization for LED
red_orange_periodicaly_05s();                              //some i2c write calls to blink led.
spi_master_init(SPI0,SPI_MODE0,0);                   //spi0 initialization for NOR
read_Nor_send_to_ble_stack();                           //some spi transfer call to read data from  Nor.
twi_master_init_rgb();                                         //i2c0 initialization for LED
stop_led();                                                        //some i2c write call to stop led.&lt;/p&gt;
&lt;p&gt;But here i am able to switch on LED and able to read data from NOR.&lt;/p&gt;
&lt;p&gt;but not able to switch off LED. but once i comment spi_master_init(SPI0,SPI_MODE0,0); LED is&lt;/p&gt;
&lt;p&gt;going to off.&lt;/p&gt;
&lt;p&gt;Kindly suggest me.&lt;/p&gt;
&lt;p&gt;Regards
Balaji&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Switch from spi0 to i2c0</title><link>https://devzone.nordicsemi.com/thread/4380?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2013 15:36:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0381a482-ad87-425b-8174-3f69c70fe462</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Are you also using custom software?
I don&amp;#39;t recognize your definitions (NOR(spi0) and LED(i2c0)) from any of the Nordic examples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>