<?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>SPIM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128020/spim</link><description>Hi everyone, 
 I am trying to use SPIM for an external DAC. The DAC does not require MISO, only SCK, MOSI, and CS. 
 I configured SPIM like this: 
 
 #define SPI_DAC NRF_SPIM2 
 
 SPI_DAC-&amp;gt;ENABLE = SPIM_ENABLE_ENABLE_Enabled;
SPI_DAC-&amp;gt;FREQUENCY = SPIM_FREQUENCY_FREQUENCY_M8</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 May 2026 17:23:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128020/spim" /><item><title>RE: SPIM</title><link>https://devzone.nordicsemi.com/thread/565911?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 17:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff13eb1-b773-46bf-8a05-cc684e56fa25</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Maybe try disabling SPIM before setting up the pins:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  // Manual says disable SPI before changing pins, but actually doesn&amp;#39;t matter
  NRF_DAC0-&amp;gt;ENABLE = 0;               // disable SPI
  
  // Set up pins here
  
  NRF_DAC0-&amp;gt;ENABLE = 7;               // enable SPI
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also use an actual pin for CSN (if using SPIM to drive CSN) and be sure to set pin output mode:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;This won&amp;#39;t work:
  SPI_DAC-&amp;gt;PSEL.CSN = NRF_SPIM_PIN_NOT_CONNECTED;
  
  Maybe try something like:
  NRF_GPIO-&amp;gt;PIN_CNF[CSPIN]   = 0x301;  // output, high drive high and low H0H1
  NRF_GPIO-&amp;gt;PIN_CNF[SCKPIN]  = 0x301;  // output, high drive high and low H0H1
  NRF_GPIO-&amp;gt;PIN_CNF[MOSIPIN] = 1;      // output, standard drive S0S1
  SPI_DAC-&amp;gt;PSEL.CSN = CSPIN;
  SPI_DAC-&amp;gt;PSEL.SCK = NRF_GPIO_PIN_MAP(0, 29);
  SPI_DAC-&amp;gt;PSEL.MOSI = NRF_GPIO_PIN_MAP(1, 10);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM</title><link>https://devzone.nordicsemi.com/thread/565898?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 12:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a034c76-8a9a-41c2-b8c8-20da4acd53f4</guid><dc:creator>Petar02</dc:creator><description>&lt;p&gt;Sorry same problem stil.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>