<?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>nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58895/nrf52840-as-i2c-slave-twis</link><description>Hello Nordic, 
 
 I have a sparkfun nRF52840 mini and I want to know which project from nRF5_SDK_15.3.0_59ac345 should I use to have my nRF52840 slave in the TWI communcation? 
 I tried to modify &amp;#39;twi_master_with_twis_slave&amp;#39;, but it doesn&amp;#39;t work. I don</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Mar 2020 10:11:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58895/nrf52840-as-i2c-slave-twis" /><item><title>RE: nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/thread/239487?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 10:11:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e09ac5f6-7506-4838-9746-b3e3ae399f44</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I am happy to hear that you think so!&lt;br /&gt;Absolutely, I will help you achieve this.&lt;br /&gt;First, could you tell me more about your setup? Which devices do you have(apart from the sparkfun nRF52840 mini)? Which device will be the SPI Master, and how are they connected?&lt;br /&gt;Is the other device running the SPI Master example? If so, the blinking you are seeing is correct, as described in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/spi_slave_example.html"&gt;SPI Slave example documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="BMG"]Can you help me, please, to solve the led which is toggling even if my main function is empty?[/quote]
&lt;p&gt;Are you talking about the main function of the SPI Slave example? Have you made any modifications to the example?&lt;br /&gt;The led is supposed to toggle every time an SPI transfer completes. If you see the very last line of the main while-loop, you will see the function call to toggle the led.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/thread/239394?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 16:09:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c581aa9-a0a6-437c-aaea-1ece3eb65f76</guid><dc:creator>BMG</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;No, not at all. I was glad that you told me about SPI slave because when I saw that I can&amp;#39;t manage to make TWI slave to work, i&amp;#39;ve tried with SPI slave. I want to concentrate now on SPI because you have an explicit example in SDK. Can you help me, please, to solve the led which is toggling even if my main function is empty?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/thread/239387?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 15:42:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e100d5a1-3a19-494e-9805-e5df7fb78c0c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I am terribly sorry, but it seems I replied to your question about TWI with information about SPI instead. My mistake.&lt;br /&gt;We do&amp;nbsp;not have any examples demonstrating the nRF52840 in a TWI Slave configuration directly.&lt;br /&gt;&lt;br /&gt;The TWIS API Reference can be seen &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__twis.html"&gt;here&lt;/a&gt;. &lt;br /&gt;What you will need to do to set it up as a TWI Slave is to first add the source files &lt;em&gt;nrf_drv_twi&lt;/em&gt;, &lt;em&gt;nrfx_twi&lt;/em&gt;, and &lt;em&gt;nrfx_twis,&amp;nbsp;&lt;/em&gt;to your project.&lt;br /&gt;Then you need to use the &lt;em&gt;nrfx_twis_enable&lt;/em&gt; and&amp;nbsp;&lt;em&gt;nrfx_twis_init&lt;/em&gt; functions to configure the device as a TWI slave.&lt;br /&gt;The TWI address and all the other TWI parameters are set during initialization. Please see the TWIS API Reference for a description of required input to these functions. You could also have a look at the code for any of the TWI_* examples, to see how to use the TWI interface.&lt;br /&gt;&lt;br /&gt;I am sorry that my initial reply only contained information about SPIS, when you were asking for TWIS. I hope this did not cause you any&amp;nbsp;frustration or confusion.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/thread/239374?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 14:50:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87887f3a-aa25-41ed-b33d-7e152761f018</guid><dc:creator>BMG</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for the answer. I&amp;#39;ve tried&amp;nbsp;SPI slave project, but I think I get a reset because the led is blinking even if in the main function it&amp;#39;s written nothing. I don&amp;#39;t know why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 as I2C slave (TWIS)</title><link>https://devzone.nordicsemi.com/thread/238880?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 14:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95f25b62-b1ce-4a46-8ade-bcbb09d32cd6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Have you seen the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/spi_slave_example.html"&gt;SPI Slave example, from the SDK v15.3.0&lt;/a&gt;?&lt;br /&gt;It configures the device as an SPI slave. You can verify this by programming another device with the SPI Master(SPIM) example, also found in the SDK.&lt;br /&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__spis.html"&gt;SPIS API Reference&lt;/a&gt; might also be useful to you.&lt;/p&gt;
[quote user=""]I tried to modify &amp;#39;twi_master_with_twis_slave&amp;#39;, but it doesn&amp;#39;t work. I don&amp;#39;t know which are the correct pins, the correct TWIS address.[/quote]
&lt;p&gt;The pins are defined in the sdk_config.h file, if this is what you are asking. You would however need to see where each pin is accessible on your sparkfun mini.&lt;/p&gt;
[quote user=""]Please be aware of the fact the the pins from sparkfun nRF52840 mini are different from nRf52840 DK.[/quote]
&lt;p&gt;You may change the pins as you would like, but keep in mind the recommended uses as described in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html"&gt;Pin Assignment&lt;/a&gt; part of the nRF52840 documentation.&lt;br /&gt;&lt;br /&gt;Is this what you were looking for?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>