<?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>nRF52833 TWI function as Slave</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92741/nrf52833-twi-function-as-slave</link><description>Hi, 
 I am using TWI channel0 on my nRF52833 as master to get readings from a few sensors. 
 I need my nRF52833 to communicate with another microcontroller over TWI/I2C so that the microcontroller is master sending some configuration data to nRF52833</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Oct 2022 08:37:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92741/nrf52833-twi-function-as-slave" /><item><title>RE: nRF52833 TWI function as Slave</title><link>https://devzone.nordicsemi.com/thread/390192?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 08:37:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0e8d661-a1b0-4cd6-ae85-ae419fde1ee1</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First of all you should look at the instantiation table in the nRF52833 datasheet:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/memory.html#topic"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52833/memory.html#topic&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can see from the&amp;nbsp;table that some hardware peripheral share base address, for instance:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5123.pastedimage1665477134121v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This means that if you use TWIM0 master to connect to sensors, then you can&amp;#39;t use SPI0, SPIM0, SPIS0, TWI0, TWIS0.&lt;/p&gt;
&lt;p&gt;So if you need a TWIS slave, then I suggest to use TWIS1 for slave, note that you can&amp;#39;t use SPI1, SPIM1, SPIS1, TWI1, TWIM1 then.&lt;/p&gt;
&lt;p&gt;There is no dependency between TWIM0 and TWIS1, so you just configure TWIM0 using 2 pins and TWIS1 using 2 other pins.&lt;/p&gt;
&lt;p&gt;There is one example in the nRF5 SDK that setup both TWI Master and TWI slave, the example is used to demonstrate communication between TWI Master and TWI Slave by emulating an I2C EEPROM:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/twi_master_with_twis_slave_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/twi_master_with_twis_slave_example.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But you should be able to look at the example as reference on how to setup TWIM and TWIS.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>