<?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>nRF52832: 3 x SPI Master instances</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112290/nrf52832-3-x-spi-master-instances</link><description>Hello, 
 In an existing device using the nRF52832 I have 2 SPI Master instances. Please, may you confirm that is possible to create a third SPI Master instance? 
 By the way, for optimizing pinout I would like to share the CLK,MOSI snd MISO signals and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jun 2024 20:57:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112290/nrf52832-3-x-spi-master-instances" /><item><title>RE: nRF52832: 3 x SPI Master instances</title><link>https://devzone.nordicsemi.com/thread/489826?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 20:57:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56de272a-1a04-4771-9478-d5311a49fd31</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Thank you Kenneth.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: 3 x SPI Master instances</title><link>https://devzone.nordicsemi.com/thread/489805?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 15:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ea0d596-61a7-492b-a93d-54cc1e1aba7d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Just quickly looking at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/spi_master_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/spi_master_example.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In main() I would have changed to:&lt;br /&gt;spi_config.ss_pin&amp;nbsp; &amp;nbsp;= NRF_DRV_SPI_PIN_NOT_USED;&lt;/p&gt;
&lt;p&gt;Then each time you want to write to a spi slave device you simply do something like:&lt;/p&gt;
&lt;p&gt;// spi device #1&lt;/p&gt;
&lt;p&gt;csn_pin1 = 0;&lt;br /&gt;&lt;span&gt;nrf_drv_spi_transfer&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;m_tx_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;m_length&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;m_rx_buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;m_length&lt;/span&gt;&lt;span&gt;))&lt;br /&gt;csn_pin1 = 1;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;// spi device #2&lt;/p&gt;
&lt;p&gt;csn_pin2 = 0;&lt;br /&gt;&lt;span&gt;nrf_drv_spi_transfer&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;m_tx_buf&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;m_length&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;m_rx_buf&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;m_length&lt;/span&gt;&lt;span&gt;))&lt;br /&gt;csn_pin2 = 1;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and so on.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: 3 x SPI Master instances</title><link>https://devzone.nordicsemi.com/thread/489792?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 14:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1fd5370-03b9-43fd-a035-7a6420d9cdc9</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hello Kenneth,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;Do you have any example code? In my case I would use the SDK 17.1.0 and the Segger IDE.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: 3 x SPI Master instances</title><link>https://devzone.nordicsemi.com/thread/489759?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 13:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a69056b0-dcce-461a-8f69-a959937e9ac7</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The nRF52832 have up to 3 SPIM instances:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/peripheral_interface.html#d932e91"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52832/page/peripheral_interface.html#d932e91&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note however that these instances overlap with other types of peripherals (e.g. twi, uart), so that is something you may need to consider if you are using any those already.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to share CLK, MISO and MOSI signales between several slaves, as long as only one of the slaves is selected by the Chip Select (CS) pin at any time. In such case the most common is to use only one SPIM instance, and then only change the CS# pin between transfer.&lt;/p&gt;
&lt;p&gt;Kenenth&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>