<?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>nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89538/nrf-52840-spim-instance</link><description>Hello! 
 I&amp;#39;m trying to set up data transfer between nRF 52840 dongle and KX134 accelerometer from SparkFun. Currently I&amp;#39;m running the WHO_AM_I test only. The code is derived from an SDK example nrf_spim. When the SPIM instance(SPI_INSTANCE) is set to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Jul 2022 20:14:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89538/nrf-52840-spim-instance" /><item><title>RE: nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/thread/375416?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2022 20:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ea97fb2-9a33-4599-9f96-e366e924521a</guid><dc:creator>JasonZK</dc:creator><description>&lt;p&gt;Hey Jared. SPIM is now working. It seems that link 53 and 54 has to be commented out as well for the program to work. Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/thread/375396?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2022 16:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71863bc4-3075-4977-8c13-2e44086dbb10</guid><dc:creator>JasonZK</dc:creator><description>[quote userid="73165" url="~/f/nordic-q-a/89538/nrf-52840-spim-instance/375274"]Does it return any error codes?&amp;nbsp; Can you specify what you mean by didn&amp;#39;t work[/quote]
&lt;p&gt;It compiles fine. There are no error codes. The code above basically flash a LED if the WHO_AM_I value is correct. It worked using SPIM instance 3 and DCX, but after switching to other instances (I&amp;#39;m using instance 0 as a test) and changing DCX to nrfx_spim_xfer (also deleted the 15 at the end so that it compiles), the LED simply doesn&amp;#39;t flash.&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/89538/nrf-52840-spim-instance/375274"]is there any activity on the SCLK[/quote]
&lt;p&gt;The SCK simply toggles to high for all SPIM instances, whenever the LED is blinking correctly or not blinking at all.&amp;nbsp;&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/89538/nrf-52840-spim-instance/375274"]&lt;p&gt;This feature isn&amp;#39;t supported on the other instances so you shouldn&amp;#39;t use that for instance 0-2.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I also&amp;nbsp;changed the dcx pin on line 52 to&amp;nbsp;NRFX_SPIM_PIN_NOT_USED, which doesn&amp;#39;t really have any effect on the results.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/thread/375274?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2022 09:43:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fec25762-d303-46d6-bfeb-901e4f1b7a36</guid><dc:creator>Jared</dc:creator><description>[quote user="JasonZK"]By DCX, do you mean line 73 in the code? I tried modify that to&amp;nbsp;&lt;span&gt;nrfx_spim_xfer() but it wouldn&amp;#39;t work even with SPIM instance 3, which used to work. I&lt;/span&gt;[/quote]
&lt;p&gt;Strange that it didn&amp;#39;t work. Does it return any error codes?&amp;nbsp; Can you specify what you mean by didn&amp;#39;t work, is there any activity on the SCLK?&lt;/p&gt;
[quote user="JasonZK"] As for the DCX pin at line 52 in spi_init, I didn&amp;#39;t use the pin at all, so I doubt changing it would make a difference anyway.[/quote]
&lt;p&gt;This feature isn&amp;#39;t supported on the other instances so you shouldn&amp;#39;t use that for instance 0-2.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/thread/375161?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 17:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b03d47c-8be1-4bf0-99c2-55ab329c3cf4</guid><dc:creator>JasonZK</dc:creator><description>&lt;p&gt;Hey Jared, thank for such rapid reply! I appreciate the help. By DCX, do you mean line 73 in the code? I tried modify that to&amp;nbsp;&lt;span&gt;nrfx_spim_xfer() but it wouldn&amp;#39;t work even with SPIM instance 3, which used to work. I also tried changing the USE_EASY_DMA in sdk_config.h, which also doesn&amp;#39;t help. As for the DCX pin at line 52 in spi_init, I didn&amp;#39;t use the pin at all, so I doubt changing it would make a difference anyway.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF 52840 SPIM instance</title><link>https://devzone.nordicsemi.com/thread/375075?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 11:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffbc6446-9c6f-4db6-a76a-7a86389921d0</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;DCX functionality is only supported with SPIM3, can you try to use nrfx_spim_xfer() instead?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>