<?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>Using 5 instances of SPI/I2C - nRF5340DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80637/using-5-instances-of-spi-i2c---nrf5340dk</link><description>Hello all, 
 I would like to know if it would be possible to simultaneously use 3 instances of I2C and 2 of I2C for the nRF5340DK. As stated in the data sheet, the application core can use at the same time 4 instances of the serial peripherals (UARTE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Oct 2021 12:48:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80637/using-5-instances-of-spi-i2c---nrf5340dk" /><item><title>RE: Using 5 instances of SPI/I2C - nRF5340DK</title><link>https://devzone.nordicsemi.com/thread/334160?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 12:48:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63a18c83-e429-4d72-95d0-e28b00fba80d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user=""]Is that configuration possible at all? What happens with UART? As far as I know, UARTE0 is enabled by default for both debugging and logging (e.g. with prinkt).[/quote]
&lt;p&gt;This configuration is possible, yes, but it is true that you won&amp;#39;t have any UART&amp;#39;s available for the application core and will have to resort to other means for logging etc.&lt;/p&gt;
&lt;p&gt;If this was your actual configuration I would ask&amp;nbsp;if you could combine some of the TWIM or SPIM interfaces into one (since I2C master and SPI master support multiple slaves on the same bus), but I assume it is more of a theoretical question?&lt;/p&gt;
[quote user=""]If I disable the UART as follows, am I right to assume that I can then use SPIM0/SPIS0/TWIM0/TWIS0, as the base address for the serial peripheral instance 0 is now free?[/quote]
&lt;p&gt;That is correct.&amp;nbsp;&lt;/p&gt;
[quote user=""]What should the prj.conf look like? I just added CONFIG_DEBUG_OPTIMIZATIONS=y to be able to debug. Do I need to add some option to disable UART as well?[/quote]
&lt;p&gt;In order to disable the serial driver, and ensure that the log interface uses the RTT backend instead of UART, you can add the following to your configuration file:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;em&gt;CONFIG_SERIAL=n&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;em&gt;CONFIG_LOG=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;CONFIG_LOG_BACKEND_RTT=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;CONFIG_LOG_BACKEND_UART=n&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
[quote user=""]What would we lose by disabling the UART? I understand that logging would be lost ( RTT could be used instead) but what happens with the debugging functionality? If the debugging functionality was also lost, I assume we should use something like an external JTAG (e.g. J-Link Plus)[/quote]
&lt;p&gt;For most projects all you lose is the logging. The SWD interface used for debugging and RTT is using dedicated pins (called SWDIO and SWDCLK in the pinout), and will always be available regardless of how many peripherals you are using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>