<?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>Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109912/building-zigbee-applications-on-nrf5340-with-nrf-fem-module</link><description>Hi, I am building a zigbee application using a custom board with 5340 and 21540. I have the 21540 chip connected with all gpios and SPI pins to the 5340. It also has both antennas connected. First I want to validate the configurations. 
 Do I need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Apr 2024 07:56:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109912/building-zigbee-applications-on-nrf5340-with-nrf-fem-module" /><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477474?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2024 07:56:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e62398f-63aa-44fb-a583-430e826904d9</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Belalshinnawey"]I included all the configurations in google drive file, so the code is more readable.[/quote]
&lt;p&gt;Ain&amp;#39;t the code that was hard to read, but this DevZone ticket. So I took the liberty to edit your comment and add code boxes.&lt;br /&gt;Please use Insert-&amp;gt;Code next time you post code or logs.&lt;/p&gt;
[quote user="Belalshinnawey"]The board does not have an additional uart pin exposed, and it is in a remote location.[/quote]
&lt;p&gt;In that case, it can be hard to debug the remote board.&lt;br /&gt;For debugging, the first thing that we want to know is, &amp;quot;should this work?&amp;quot;. To test this, I suggest that you take your test-board that you have at your location and see if you can reproduce the error on the test-board.It will give us a lot of information to see if this works on the test board or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477113?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 12:56:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f663844-c452-47e7-9025-1537d1254bcc</guid><dc:creator>Belalshinnawey</dc:creator><description>&lt;p&gt;The board does not have an additional uart pin exposed, and it is in a remote location.&lt;br /&gt;&lt;br /&gt;I mentioned that the logs are showing a bus error, they are connected, they work, the debugger shows that the net core is resetting from an error. &lt;br /&gt;&lt;br /&gt;I included all the configurations in google drive file, so the code is more readable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477110?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 12:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3852754c-0211-45f1-b1a1-dc5f4023a32b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Please use &amp;quot;Insert-&amp;gt;Code&amp;quot; when posting code, that will make this ticket a lot more tidy and easy to read. You can edit your reply to do so for the previous reply.&lt;/p&gt;
[quote user="Belalshinnawey"]Again, when I connect my jlink debugger with the target as the net_core, I get spammed bus fault Precise data bus error.[/quote]
&lt;p&gt;Is it possible for you to log over UART instead? That is often a good thing to try if RTT does not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477088?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 11:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c11ddb0a-c860-476f-ae53-536dbe67fa4b</guid><dc:creator>Belalshinnawey</dc:creator><description>&lt;p&gt;Hi, I read all of these docs, I am still having the same issue.&lt;br /&gt;&lt;br /&gt;&amp;lt;err&amp;gt; spinel_ipc_backend: IPC endpoint bind timed out&lt;/p&gt;
&lt;p&gt;I am using both app and net cores, it&amp;#39;s a multi-image application.&lt;br /&gt;&lt;br /&gt;The child image used for the net core is the default /ncs/v2.3.0/zephyr/samples/boards/nrf/ieee802154/802154_rpmsg&lt;/p&gt;
&lt;p&gt;This image turns off logging, I edited the config file to enable logging. I have this in the defconfig of the net_core:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#Enable Logging
CONFIG_LOG=y
CONFIG_LOG_PRINTK=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_MAX_LEVEL=4
CONFIG_LOG_BACKEND_RTT=y

CONFIG_MPSL=y
# CONFIG_MPSL_FEM_ONLY=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
CONFIG_MPSL_FEM_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I also have this in the pinctrl of the net core:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
    spi3_default: spi3_default { //Radio
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 24)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 1, 7)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 9)&amp;gt;;
        };
    };
    spi3_sleep: spi3_sleep {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 24)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 1, 7)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 9)&amp;gt;;
            low-power-enable;
        };
    };

};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;this pinctrl is used in the net core dts:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_radio_fem: nrf_spi_fem_radio {
        compatible = &amp;quot;nordic,nrf21540-fem&amp;quot;;
        tx-en-gpios = &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_HIGH&amp;gt;;
        rx-en-gpios = &amp;lt;&amp;amp;gpio1 11 GPIO_ACTIVE_HIGH&amp;gt;;
        pdn-gpios = &amp;lt;&amp;amp;gpio0 29 GPIO_ACTIVE_HIGH&amp;gt;;
        ant-sel-gpios = &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_HIGH&amp;gt;;
        supply-voltage-mv = &amp;lt;3300&amp;gt;;
        spi-if = &amp;lt;&amp;amp;nrf_radio_fem_spi&amp;gt;;
    };

&amp;amp;spi0 {
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi3_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi3_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio1 8 GPIO_ACTIVE_LOW&amp;gt;;

    nrf_radio_fem_spi: nrf21540_fem_spi@0 {
        compatible = &amp;quot;nordic,nrf21540-fem-spi&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;8000000&amp;gt;;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in the app core dts:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;gpio_fwd: nrf-gpio-forwarder {
        compatible = &amp;quot;nordic,nrf-gpio-forwarder&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        nrf21540-gpio-if {
            gpios = &amp;lt;&amp;amp;gpio0 30 0&amp;gt;, // TX_EN
                    &amp;lt;&amp;amp;gpio0 31 0&amp;gt;, // ANT_SEL
                    &amp;lt;&amp;amp;gpio0 29 0&amp;gt;, // PDN
                    &amp;lt;&amp;amp;gpio1 11 0&amp;gt;; // RX_EN
                    
        };
        nrf21540-spi-if {
            gpios = &amp;lt;&amp;amp;gpio0 24 0&amp;gt;, //SCK
            &amp;lt;&amp;amp;gpio1 7 0&amp;gt;, //MISO
            &amp;lt;&amp;amp;gpio1 9 0&amp;gt;, //MOSI
            &amp;lt;&amp;amp;gpio1 8 0&amp;gt;; //CSN
        };
 };

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Again, when I connect my jlink debugger with the target as the net_core, I get spammed bus fault Precise data bus error.&lt;/p&gt;
&lt;p&gt;When I connect to the app core, Its the timeout error then hangs, the rest of my application does not run. even unrelated parts.&lt;/p&gt;
&lt;p&gt;the full board file is supplied below, please help, I already read the docs, still, can&amp;#39;t get it to work.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1C7vREKAlRH3Yu7lcqXmnE8LmblQmdrwX/view?usp=drive_link"&gt;drive.google.com/.../view&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477038?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 08:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82820590-7983-4276-bcda-5be4d491a4ee</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;But the Radio test builds for the network core.&lt;/p&gt;
&lt;p&gt;If you want something for the application core, and also for zigbee, see &lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/light_bulb/README.html#fem-support"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/light_bulb/README.html#fem-support&lt;/a&gt; &lt;br /&gt;Many of our samples have this FEM-support section, so look for that in the docs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Zigbee applications on nrf5340 with nrf-FEM module</title><link>https://devzone.nordicsemi.com/thread/477037?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 08:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17a56b99-4747-40e9-a2f3-cb1920fa34c5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]How do I enable logging on the network core to validate that the 21540 works?[/quote]
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf53/nrf5340.html#getting-logging-output"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf53/nrf5340.html#getting-logging-output&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the rest of the questions, see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_fem.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_fem.html&lt;/a&gt;.&lt;/p&gt;
[quote user=""]If you have configurations on how to&amp;nbsp; do this or a skelaton app with only the configs and directions to build it you can share it and ignore all my questions. Thank you[/quote]
&lt;p&gt;From &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/radio_test/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/radio_test/README.html&lt;/a&gt;: &lt;/p&gt;
&lt;h3&gt;&amp;quot;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/peripheral/radio_test/README.html#id6"&gt;nRF21540 front-end module&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For example, to build the sample from the command line for an nRF5340 DK with an attached nRF21540 EK, invoke the following command within the sample directory:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;west build -b nrf5340dk_nrf5340_cpunet -- -DSHIELD=nrf21540ek&lt;br /&gt;&amp;quot;&lt;br /&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>