nRF21540 hardware bringup on custom board

We have a custom board with nRF5340 + nRF21540

I'm going through hardware bringup (checking all the signals with an oscilloscope, etc.) and the nRF21540 is one of the last parts left

Ultimately, I want to update our custom software to include menu options to use the nRF21540 (control RF muxing, hi/lo power, etc.)

But my plan for getting there is start with the nRF21540-DK software provided in this blog

I successfully used the Programmer app in "nRF Connect for Desktop" to program an nRF21540-DK board with the 4747.nRF21540\nRF21540\Pos20dBm\peripheral_nus.hex image provided on the blog (in 4747.nRF21540.zip).  Using the nRF Connect app on my iPhone I can see it advertising at very high power, and LED1 is blinking.  If I power up another nRF21540-DK board configured as central 0dB, LED2 turns on on the peripheral +20dB board.

I tried converting the project in adv_nRF21540_20dBm.zip (downloaded from the blog), update it to nRF Connect SDK v2.2.0 (the version we're currently on), but that didn't work.  It doesn't appear to be transmitting (according to the nRF Connect app on my iPhone).  All 4 LEDs (LED1/2/3/4) are on solid.

I notice that if I include the line "CONFIG_SDC_SLAVE_COUNT=3" in prj.conf I get the error "attempt to assign the value '3' to the undefined symbol SDC_SLAVE_COUNT"

Here is my project

adv_nRF21540_20dBm-20230302.zip

Can you tell what I'm doing wrong?

After I get this working, my plan is to rebuild the project for nRF5340-DK + nRF21540-EK (daughter board)

Once that works I'll try updating our custom firmware.

Parents
  • Let me share what I've learned so far, and I have another 2 follow-up questions.

    I started with the peripheral_uart example, and made the changes to use it on the nRF21540-DK board.

    To make the FEM_MODE pin stay low, add “CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20” to prj.conf

    To make the FEM_MODE pin stay high, add “CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=10” to prj.conf (instead of the line above)

    To use ANT1, use “ant-sel-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;” in app.overlay

    To use ANT2, use “ant-sel-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;” in app.overlay

    Are those the "right" way to manipulate the MODE and ANT_SEL pins?

    Now I've moved on to the nRF5340-DK + nRF21540-EK

    I see that the default way of handling this setup is loading an image into the network core

    (-Dhci_rpmsg_SHIELD=nrf21540_ek, -DSHIELD=nrf21540_ek_fwd)

    After doing that, I didn't see any of the nRF21540 pins "wiggling" (changing state)

    So I added this to to app.overlay

    	nrf_radio_fem: nrf21540_fem {
    		compatible = "nordic,nrf21540-fem";
    		tx-en-gpios = <&arduino_header 11 GPIO_ACTIVE_HIGH>;   /* D5 */
    		rx-en-gpios = <&arduino_header 9 GPIO_ACTIVE_HIGH>;    /* D3 */
    		pdn-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;     /* D9 */
    		ant-sel-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 */
    		mode-gpios = <&arduino_header 8 GPIO_ACTIVE_HIGH>;     /* D2 */
    		supply-voltage-mv = <3000>;
    	};

    Now the pins are wiggling, but I'm getting some build warnings, and I don't seem to be able to manipulate the FEM_MODE and ANT_SEL signals the same.  Is this the right way to implement nRF21540 on nRF5340?

    Where would I find the code, device tree (dts, overlays, etc.) and CONFIG settings for the image that gets loaded in the network core?

    Here is my current project

    peripheral_uart-nRF5340-nRF21540-20230310.zip

Reply
  • Let me share what I've learned so far, and I have another 2 follow-up questions.

    I started with the peripheral_uart example, and made the changes to use it on the nRF21540-DK board.

    To make the FEM_MODE pin stay low, add “CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20” to prj.conf

    To make the FEM_MODE pin stay high, add “CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=10” to prj.conf (instead of the line above)

    To use ANT1, use “ant-sel-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;” in app.overlay

    To use ANT2, use “ant-sel-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;” in app.overlay

    Are those the "right" way to manipulate the MODE and ANT_SEL pins?

    Now I've moved on to the nRF5340-DK + nRF21540-EK

    I see that the default way of handling this setup is loading an image into the network core

    (-Dhci_rpmsg_SHIELD=nrf21540_ek, -DSHIELD=nrf21540_ek_fwd)

    After doing that, I didn't see any of the nRF21540 pins "wiggling" (changing state)

    So I added this to to app.overlay

    	nrf_radio_fem: nrf21540_fem {
    		compatible = "nordic,nrf21540-fem";
    		tx-en-gpios = <&arduino_header 11 GPIO_ACTIVE_HIGH>;   /* D5 */
    		rx-en-gpios = <&arduino_header 9 GPIO_ACTIVE_HIGH>;    /* D3 */
    		pdn-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;     /* D9 */
    		ant-sel-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 */
    		mode-gpios = <&arduino_header 8 GPIO_ACTIVE_HIGH>;     /* D2 */
    		supply-voltage-mv = <3000>;
    	};

    Now the pins are wiggling, but I'm getting some build warnings, and I don't seem to be able to manipulate the FEM_MODE and ANT_SEL signals the same.  Is this the right way to implement nRF21540 on nRF5340?

    Where would I find the code, device tree (dts, overlays, etc.) and CONFIG settings for the image that gets loaded in the network core?

    Here is my current project

    peripheral_uart-nRF5340-nRF21540-20230310.zip

Children
No Data
Related