<?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>Checking nrf21540-DK registers using SPI3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119277/checking-nrf21540-dk-registers-using-spi3</link><description>I am attempting to do a simple read from the FEM on the nrf21540-DK board. I should be able to use the zephyr driver with spi3 (or fem_spi) to do a simple read/write from the fem chip correct? I seem to be able to get the device - 
 const struct device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2025 16:35:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119277/checking-nrf21540-dk-registers-using-spi3" /><item><title>RE: Checking nrf21540-DK registers using SPI3</title><link>https://devzone.nordicsemi.com/thread/524675?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 16:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:389db323-f630-4170-9f9e-75ead150ed2c</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Yup, added in a few items to point to the FEM on the nrf21540dk/nrf52840 target, enabled the power pin and it appears to work. The HW_REVISION doesn&amp;#39;t match the pdf I have. I received 0x30 and expected a 0x03.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.365,356] &amp;lt;inf&amp;gt; app: Hello World! nrf21540dk/nrf52840
[00:00:00.365,356] &amp;lt;inf&amp;gt; app: spi_is_ready_dt() returned 0x1
[00:00:01.365,661] &amp;lt;inf&amp;gt; app: spi_tranceive_dt() returned 0
[00:00:01.365,692] &amp;lt;inf&amp;gt; app: data returned 80 0c
[00:00:02.365,905] &amp;lt;inf&amp;gt; app: spi_tranceive_dt() returned 0
[00:00:02.365,936] &amp;lt;inf&amp;gt; app: data returned 80 30
[00:00:03.366,180] &amp;lt;inf&amp;gt; app: spi_tranceive_dt() returned 0
[00:00:03.366,210] &amp;lt;inf&amp;gt; app: data returned 80 02
[00:00:04.366,455] &amp;lt;inf&amp;gt; app: spi_tranceive_dt() returned 0
[00:00:04.366,485] &amp;lt;inf&amp;gt; app: data returned 80 1c&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Just for clarity the code (enclosed) is reading registers 0x14,0x15,0x16, and 0x17 from the FEM.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4527.main.c"&gt;devzone.nordicsemi.com/.../4527.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checking nrf21540-DK registers using SPI3</title><link>https://devzone.nordicsemi.com/thread/524633?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 14:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:995b7ebe-f164-4faf-9dc3-a69cd11042d7</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Great, thanks. I will look into this and report back to you ... asap.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checking nrf21540-DK registers using SPI3</title><link>https://devzone.nordicsemi.com/thread/524623?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 13:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85657f71-e505-496b-a532-676c40286dc8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This repository is a bit outdated.&lt;/p&gt;
&lt;p&gt;I will attach an application that sets up basic SPIM functionality, so perhaps you can test this. Look at how it gets the devicetree from main.c.&lt;/p&gt;
&lt;p&gt;There is no overlay for the nRF21540 DK, but you can copy the content from the nrf52840dk_nrf52840.overlay.&lt;/p&gt;
&lt;p&gt;Note that if you want to set the nRF21540 in programming state, you need to set the PDN pin high. Please see:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf21540/page/chapters/device_control/doc/operating_state.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf21540/page/chapters/device_control/doc/operating_state.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To be sure, you should also make sure that the TX_EN and RX_EN are low, so that it doesn&amp;#39;t enter TX or RX mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hello_5F00_world_5F00_spim.zip"&gt;devzone.nordicsemi.com/.../hello_5F00_world_5F00_spim.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checking nrf21540-DK registers using SPI3</title><link>https://devzone.nordicsemi.com/thread/524427?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 18:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62c1c761-a817-43d4-b9d0-70c10adc7740</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;The original code was from here&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example"&gt;GitHub - too1/ncs-spi-master-slave-example&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I removed the slave portion to attempt to read the&amp;nbsp;FEM&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>