<?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 salve and  i2c slave</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90242/spi-salve-and-i2c-slave</link><description>Sorry I need to emulate a device using an nrf52840. as a 24c01 (I2C memory). 
 I need also to emulate using an nrf52840 and spi slave sensore . 
 There sare some samples that can be helpfull for me ? 
 Best Regards 
 Novello G.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Jul 2022 07:45:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90242/spi-salve-and-i2c-slave" /><item><title>RE: spi salve and  i2c slave</title><link>https://devzone.nordicsemi.com/thread/378230?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2022 07:45:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3e0c6be-f5d8-4424-874d-eeff3f0b88b4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Did you start looking into any of our SDKs? If so, what version are you using?&lt;/p&gt;
&lt;p&gt;Depending on whether you are using the nRF5 SDK or NCS, the examples to link you to is a bit different.&lt;/p&gt;
&lt;p&gt;If you are using the nRF5 SDK, you can look into SDK\examples\peripheral\spis and SDK\examples\peripheral\twi_master_with_twis_slave (TWI - Two Wire Interface - is the same as I2C. It is just a naming convention / copyright matter).&lt;/p&gt;
&lt;p&gt;The twi_master_with_twis_slave is an example using both an instance of TWI master and an instance of TWI slave. You can strip away the TWI master part if you like.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For NCS we don&amp;#39;t have any official examples, but you can check out my colleague&amp;#39;s github containing some custom peripheral samples.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/sigurdnev/ncs-playground/tree/master/samples"&gt;https://github.com/sigurdnev/ncs-playground/tree/master/samples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I see that it doesn&amp;#39;t contain an I2C slave example, but I found this blog post. I didn&amp;#39;t test it, but perhaps you can give it a go (if you are using NCS):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/twi-ic2-implementation-with-nrfx-twis-driver"&gt;https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/twi-ic2-implementation-with-nrfx-twis-driver&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>