<?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>Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90870/where-do-i-configure-nrfx-internae</link><description>I am used to nRF5 SDK through SES when using nRF52, but for this new project we use the nRF Connect SDK on an nRF5340 (and thus switched to a CMake/VSC development environment). 
 This project uses an LCD that requires a C/D line on SPI to differentiate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Feb 2024 05:53:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90870/where-do-i-configure-nrfx-internae" /><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/467453?ContentTypeID=1</link><pubDate>Sat, 03 Feb 2024 05:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22a1dc38-bb3f-4b36-8a5c-2b2c36c269a7</guid><dc:creator>lvh831</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using ncs nrf5340. Where do I set&amp;nbsp;&lt;span&gt;CONFIG_SPI_4_NRF_RX_DELAY ? I don&amp;#39;t see this is a valid setting for proj.conf. Though I did set CONFIG_NRFX_SPIM4=y in proj.conf. Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381898?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 07:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f21e3fa-e172-4bb9-b476-80fa88a4fe01</guid><dc:creator>Joost Voorhaar</dc:creator><description>&lt;p&gt;Wait, what? O man, you saved the day! Dunno how I could have missed that... SPIM4 indeed is the only one that supports DCX (and SPIM0 on the network core apparently, but that lacks CS support). Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;//Reminder to myself: always check the PS, not once, not twice, ... tripple, at least.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381827?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2022 15:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e20f515f-c4f1-42f0-bc19-7181f9d8e84e</guid><dc:creator>Didrik Rokhaug</dc:creator><description>[quote user="Joost Voorhaar"]It is a bit weird to have that set on an RX setting ofcourse, there MISO is not even connected to the LCD, it does not send anything back.[/quote]
&lt;p&gt;Yes, the option doesn&amp;#39;t have the most fitting name. The reason for it is that another feature of the &amp;quot;extended&amp;quot; SPIM peripheral is that you have better control over when the MISO is sampled.&lt;/p&gt;
&lt;p&gt;I looked some more into the config options, and it looks like CONFIG_SPI_3_NRF_RX_DELAY is only supported on the nRF52840 and nRF52833, while CONFIG_SPI_4_NRF_RX_DELAY is only supported on the nRF5340.&lt;/p&gt;
&lt;p&gt;The attached project worked for me on a nRF5340 DK.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_dc.zip"&gt;devzone.nordicsemi.com/.../spi_5F00_dc.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381793?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2022 13:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db53e4d3-dafd-4eb6-a64d-c25bb647b544</guid><dc:creator>Joost Voorhaar</dc:creator><description>&lt;p&gt;Thanks Didrik. Unfortunately, it doesn&amp;#39;t work. The functions to use the DCX are overridden by hal prototypes that don&amp;#39;t do anything but are marked inline (check nrfx_spim_xfer_dcx()). That means the linker cannot find the function... I checked and NRFX_CHECK(NRFX_SPIM_EXTENDED_ENABLED )&amp;nbsp;fails (set it to 1 on my local sdk_config.h *and* tried the&amp;nbsp;&lt;span&gt;CONFIG_SPI_3_NRF_RX_DELAY&amp;nbsp;there... nope). It is a bit weird to have that set on an RX setting ofcourse, there MISO is not even connected to the LCD, it does not send anything back.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381613?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 14:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7262364c-10a9-44f6-8daf-af5d4bb216af</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;I&amp;#39;ll admit I did not know about that feature. But I also have to admit that I have not worked much with our low level drivers or the nRF5340.&lt;/p&gt;
&lt;p&gt;Anyway, some digging (and help from a colleague), turned up this: &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.0.99-ncs1/modules/hal_nordic/nrfx/nrfx_config.h#L231"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.0.99-ncs1/modules/hal_nordic/nrfx/nrfx_config.h#L231&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So, if you set either CONFIG_SPI_3_NRF_RX_DELAY or CONFIG_SPI_4_NRF_RX_DELAY (depending on which SPIM you are using), you should be able to use the DCX control functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381224?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 14:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dad88b4-a494-44a1-8266-1d6e44efacdb</guid><dc:creator>Joost Voorhaar</dc:creator><description>&lt;p&gt;Hmm... nRF5340&amp;#39;s SPIM actually provides DCX control in the hardware and there is support for it in the nrfx spim driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is my goal to have the hardware handle as much as possible. This driver will need to run with minimal software penalties in both, runtime and footprint. The idea is to use DPPI as much as possible so that both cores&amp;nbsp;can do what they need to do without spending significant resources running the display. Thus the choice for plain old nrfx.&lt;/p&gt;
&lt;p&gt;Anyway, I digged even more into the documentation and it seems I should be able to add it in a customized nrfx_config.h and put that in my local directories. So I copied the template and added&amp;nbsp;its directory to the include directories through CMakefiles.txt. Had to copy nrfx_config_5340_application.h too, okay. Unfortunately, the build system now complains of missing definitions that are generated from prj.conf now that it didn&amp;#39;t complain about before: &amp;quot;/home/jev/ncs/modules/hal/nordic/nrfx/drivers/include/nrfx_spim.h:84:35: error: &amp;#39;NRFX_SPIM0_INST_IDX&amp;#39; undeclared here&amp;nbsp; ...&amp;quot;. *sigh*&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t generate that error when using the copies located in the template directories. Weird.&lt;/p&gt;
&lt;p&gt;By the way, what&amp;#39;s up with the interrupt handlers not working without adding some very obscure IRQ_CONNECT() stuff?&lt;/p&gt;
&lt;p&gt;If I read the documentation correctly, it should&amp;#39;ve been enough to just enable the&amp;nbsp;&lt;span class="c1"&gt;#include &amp;lt;soc/nrfx_irqs.h&amp;gt; into a local copied nrfx_glue.h, but that opens a whole can of worms with files not being found anymore.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where do I configure nrfx internae?</title><link>https://devzone.nordicsemi.com/thread/381196?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 12:33:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6415280a-9933-482a-875c-c608eed02d13</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Regardless of if you use the Zephyr driver or the nrfx driver, you would have to control the C/D line as a normal GPIO anyway.&lt;/p&gt;
&lt;p&gt;So I would recommend that you stick to the Zephyr driver, as it is easier to use.&lt;/p&gt;
&lt;p&gt;Also, what display are you using? Zephyr already have drivers for several displays (take a look in the zephyr/drivers/display folder). You might not have to write a driver yourself. Or, if you do, you can look at the existing ones as inspiration.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>