<?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>compiling issue for ble_app_uart + spi + TWI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43803/compiling-issue-for-ble_app_uart-spi-twi</link><description>Hi, 
 I am trying to combine TWI and SPI peripherals to the ble_app_uart exmaple in SDK 15.2 
 I am facing the following error 
 .\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler multiply defined (by nrfx_spi</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Feb 2019 16:50:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43803/compiling-issue-for-ble_app_uart-spi-twi" /><item><title>RE: compiling issue for ble_app_uart + spi + TWI</title><link>https://devzone.nordicsemi.com/thread/172361?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 16:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09400fbd-48f8-4c5c-8685-a1c09482b42d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;With nRF52840 you have two TWI peripherals and three SPI&amp;nbsp;peripherals available. However, SPI0 and TWI0&amp;nbsp;shares the same base address and SPI1 and TWI1&amp;nbsp;shares the same base address, and can not be used simultaneously.&lt;/p&gt;
&lt;p&gt;Here are some solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use TWI0, TWI1 and SPI2 (if you only need one SPI port)&lt;/li&gt;
&lt;li&gt;Let the I2C devices share the TWI0 instance (switch between them by changing address) and use SPI2 and SPI2 (if you need two SPI ports)&lt;/li&gt;
&lt;li&gt;Use TWI0, TWI1, SPI1 and SPI2, and turn on and off the instances that shares base address, as suggested by Jørgen &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34074/two-spi-and-one-i2c-master-on-nrf51/131164#131164"&gt;here&lt;/a&gt;&amp;nbsp;&lt;span&gt;(if you need two SPI ports)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compiling issue for ble_app_uart + spi + TWI</title><link>https://devzone.nordicsemi.com/thread/172016?ContentTypeID=1</link><pubDate>Wed, 20 Feb 2019 07:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b06af9ae-d136-42dd-bd57-08ce3f20e2d2</guid><dc:creator>gauthamranganathan</dc:creator><description>&lt;p&gt;Hello Simon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My project is currently using 2 TWI instaces. (nrfx_twi drivers)&lt;/p&gt;
&lt;p&gt;I am using the SD card library which uses nrf_drv_spi drivers.&lt;/p&gt;
&lt;p&gt;I need an another SPI port. be it using nrfx_spi or nrf_drv_spi .&lt;/p&gt;
&lt;p&gt;I went through several posts and i was unable to find an answer.&lt;/p&gt;
&lt;p&gt;Preferably without using DMA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried adding an instance of SPIM&amp;nbsp; to my main file. and i get the following error&amp;nbsp;&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_spim_init (referred from main.o).&lt;/p&gt;
&lt;p&gt;I have included nrfx_spim.h and added the respective C file to my project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am able to successfully compile and link&amp;nbsp; this line&amp;nbsp;&lt;/p&gt;
&lt;p&gt;const nrfx_spim_t m_spi_bus_2 = NRFX_SPIM_INSTANCE(3);&lt;/p&gt;
&lt;p&gt;but unable to link nrf_spim_init. I will upload the main file and sdk_config. Please tell me what i can do further&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8562.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../8562.sdk_5F00_config.h&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2248.main.c"&gt;devzone.nordicsemi.com/.../2248.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compiling issue for ble_app_uart + spi + TWI</title><link>https://devzone.nordicsemi.com/thread/171883?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 12:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:636e6980-7755-4a72-b74a-3d90c43bd3d2</guid><dc:creator>gauthamranganathan</dc:creator><description>&lt;p&gt;Thank you for your reply Simon. I need 2 instances of SPI and 2 instances of TWI. Could you suggest a solution for this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do not want to use DMA as this increases current consumption.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compiling issue for ble_app_uart + spi + TWI</title><link>https://devzone.nordicsemi.com/thread/171875?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 12:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b01bb3b-3c75-4816-978a-2eb1ee9cbb1f</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Have you seen&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16771/spi-and-twi-error"&gt; this&lt;/a&gt; case, it mentions that&amp;nbsp;&lt;span&gt;SPIM0, SPIS0, TWIM0, TWIS0, SPI0 and TWI0 uses the same registers, and can not be used simultaneously. In your application you have defined both&amp;nbsp;NRF_DRV_SPI_INSTANCE(0) and&amp;nbsp;NRFX_TWI_INSTANCE(0), and is probably what causes this error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>