I can't build firmware with sample ubx_bmd345eval

Hi,

We tried to build firmware sample ubx_bmd345eval_nrf52840 to ublox bmd-345 with the template nrf/samples/openthread/coprocessor unsuccessfully. 

Added the next lines in the CMakeLists.txt:

set(OVERLAY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/overlay-usb.conf")
set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/usb.overlay")
Finally, the command executed to build.
west build -p always -b ubx_bmd345eval_nrf52840 nrf/samples/openthread/coprocessor/ -- -DOVERLAY_CONFIG="overlay-usb.conf" -DDTC_OVERLAY_FILE="usb.overlay"
With that configuration above, each time we compile it gives a different failure, between steps 411-413 (both included). We have used nrf connect sdk 2.0.0 and 2.2.0.
Could you give us more information to build firmware sample ubx_bmd345eval_nrf52840?
Thank you in advance,
David Pérez
 
Parents
  • Hi David,

    The ublox bmd-345 devicetree node nrf_radio_fem is based on the generic-fem-two-ctrl-pins node. As you can see in the link, two of the properties of this node are tx-gain-db and rx-gain-db. However, these properties are missing in the ublox bmd-345 devicetree file, see ubx_bmd345eval_nrf52840.dts#L120. The solution is to add them in a devicetree overlay. Since you also want to use USB, I would recommend creating a new overlay file for the board with both USB and nrf_radio_fem:

     / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    };
    
    &nrf_radio_fem {
        tx-gain-db = <10>;
        rx-gain-db = <10>;
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    

    If you call this overlay file ubx_bmd345eval_nrf52840.overlay and place it in coprocessor/boards, it will automatically be added when you build for ubx_bmd345eval_nrf52840, as long as you do not specify any other devicetree overlay files. So you do not need to manually add it with DTC_OVERLAY_FILE. You still need to add overlay-usb.conf as OVERLAY_CONFIG.

    Just a heads up for later, you do not need to add the overlay files in both CMakeLists.txt and in the build command. Doing either of the options is enough.

    Best regards,

    Marte

  • Happy new year!!

    Thanks for your quick response. Following your indications i can build the firmware but it's not detected over USB port.

    I attached the application.

    Thank very much,

    David Pérez


    rcp-ubx-bmd345_1.0.0.zip

  • Hi David,

    Happy new year! Slight smile

    Do you have a nRF52840 DK available to test with to test whether the issue is with the application or the board? I tested your code on a nRF52840 DK on my side, and I am able to find the USB device.

    $ lsusb
    Bus 001 Device 021: ID 1915:154a Nordic Semiconductor ASA nRF52 USB Product

    Another ting you can try is to completely delete the build directory, and then build the project again. I have seen cases where devicetree changes are not applied correctly in rebuilds, even when pristine.

    Best regards,

    Marte

  • We are working with a custom dongle board with the ublox bmd345.

    In first time, we built the firmware nrf528xx from ot-nrf528xx. It works good, but the max limit of the transmit power (txpower) is +8 dbm. We think it's because we're not activating the power amplifier properly (PA and LNA), and that reaches up to +15 dbm. That is why we are now working with the nrf connect sdk, and manage to adjust the transmission power. We tried with the templates nrf52840dk, nrf52840dongle and ubx_bmd345_nrf52840 following your indications to activate the USB port, but once the program is loaded in the dongle, it's not possible to detect it by USB on computer, unless bootloader mode is active.

    On the other hand, that same firmwares built from ot-nrf528xx and nrf connect sdk, works in a dongle nrf58240, and are detected over USB.

    We don't understand why from nrf connect sdk, it can't detect over USB with our custom dongle board. This is not a problem with the firmware from ot-nrf528xx.

    Thanks very much,

    David Pérez

  • Hi David,

    I will do some more tests on my side to see if I can figure out what the issue might be. I will get back to you tomorrow.

    Best regards,

    Marte

  • Hi Marte, 

    Thanks very much for your support. We have made the template nrf52840dongle_nrf52840 in our custom board finally. Now it detected over USB, with the next lines:

    - Added in the prj.conf:

    CONFIG_BOARD_ENABLE_DCDC=n

    - Added in the nrf52840dongle_nrf52840.overlay:

    / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    
    	nrf_radio_fem: name_of_fem_node {
    		compatible  = "nordic,nrf21540-fem";
    		tx-en-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
    		rx-en-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
    		pdn-gpios   = <&gpio1 4 GPIO_ACTIVE_HIGH>;
      };
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    		label = "CDC_ACM_0";
    	};
    };

    We still have to check that we got a higher transmission power (txpower) > +8dbm.

    But we haven't gotten the template ubx_bmd345eval_nrf52840 works in our custom board by the moment. Not detected over USB. 

    - Added in the ubx_bmd345eval_nrf52840.overlay:

     / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    };
    
    &nrf_radio_fem {
        tx-gain-db = <10>;
        rx-gain-db = <10>;
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };

    Thanks very much,

    David Pérez

Reply
  • Hi Marte, 

    Thanks very much for your support. We have made the template nrf52840dongle_nrf52840 in our custom board finally. Now it detected over USB, with the next lines:

    - Added in the prj.conf:

    CONFIG_BOARD_ENABLE_DCDC=n

    - Added in the nrf52840dongle_nrf52840.overlay:

    / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    
    	nrf_radio_fem: name_of_fem_node {
    		compatible  = "nordic,nrf21540-fem";
    		tx-en-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
    		rx-en-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
    		pdn-gpios   = <&gpio1 4 GPIO_ACTIVE_HIGH>;
      };
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    		label = "CDC_ACM_0";
    	};
    };

    We still have to check that we got a higher transmission power (txpower) > +8dbm.

    But we haven't gotten the template ubx_bmd345eval_nrf52840 works in our custom board by the moment. Not detected over USB. 

    - Added in the ubx_bmd345eval_nrf52840.overlay:

     / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    };
    
    &nrf_radio_fem {
        tx-gain-db = <10>;
        rx-gain-db = <10>;
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };

    Thanks very much,

    David Pérez

Children
  • Hi David,

    I am not that familiar with the BMD-345 evaluation board, but I see that it has two USB ports. Are you certain that you are using the correct one? At least for the nRF52840 DK when you use USB it will be the nRF USB connector and not the J2 USB connector, so you will have to connect to the nRF USB to get the device to show up as an USB device. I have tested with building the co-processor sample for ubx_bmd345eval_nrf52840 with your overlay and overlay-usb.conf, and at least when running it on nRF52840 DK it shows up and works as expected. 

    Can you try programming your board with the hex file I have attached? Make sure to reset the board after programming.

    72155.zephyr.hex

    Best regards,

    Marte

  • Hi Marte,

    We will try it and i will notice you the next week.

    Thanks very much,

    David Pérez

  • Hi Marte,

    Not detected the USB connection with that .hex.

    At the moment, we have only managed to detect USB with the template nrf52840dongle_nrf52840, like the next picture:

    Best regards,

    David Pérez

  • Hi David,

    I have been trying to compare the generated files when building for nrf52840dongle_nrf52840 with ubx_bmd345eval_nrf52840, but I have not been able to find any obvious reasons for why the dongle firmware works, but not the firmware for the BMD-345 eval kit.

    One thing I saw, however, was that the ubx_bmd345eval_nrf52840 had several configurations related to console and UART enabled. Can you try adding the following to prj.conf?

    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_STDOUT_CONSOLE=n

    Please also try completely deleting the build directory and creating a new one. Sometimes devicetree changes are not applied even with pristine build.

    Best regards,

    Marte

  • Hi Marte,

    We delete the old build configuration before to launch the build configuration again. But it also doesn't work with the above lines added in prj.conf.

    Finally, our board works with the generic overlay-usb.conf conf and front end skyworks RFX2411 included in ublox bmd345 module with the nrf52840dongle_nrf52840 template, with the following files modified:

    - nrf52840dongle_nrf52840.overlay:

    / {
    	chosen {
    		zephyr,ot-uart = &cdc_acm_uart0;
    	};
    
        // Enable Skyworks RFX2411 front end (PA/LNA)
        nrf_radio_fem: bmd345-fem {
            compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
            ctx-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
            crx-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
            // tx-gain-db = <10>;
            // rx-gain-db = <10>;
        };
    
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    

    - prj.conf

    #
    # Copyright (c) 2020 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Set OpenThread NCP architecture
    CONFIG_OPENTHREAD_COPROCESSOR=y
    CONFIG_OPENTHREAD_COPROCESSOR_RCP=y
    
    # Logging
    CONFIG_LOG=y
    CONFIG_OT_COPROCESSOR_LOG_LEVEL_ERR=y
    CONFIG_LOG_MAX_LEVEL=4
    CONFIG_OPENTHREAD_DEBUG=y
    CONFIG_OPENTHREAD_LOG_LEVEL_CRIT=y
    CONFIG_LOG_BACKEND_SPINEL=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_BOOT_BANNER=y
    
    # Increase logging thread stack size due to Spinel backend needs
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
    
    # Enable OpenThread features set
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
    
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Generic networking options
    CONFIG_NETWORKING=y
    
    CONFIG_ASSERT=y
    CONFIG_ASSERT_NO_COND_INFO=y
    CONFIG_MBEDTLS_SHA1_C=n
    CONFIG_FPU=y
    
    # ublox bmd345 config
    CONFIG_BOARD_ENABLE_DCDC=n

    The templates ubx_bmd345eval_nrf52840 doesn't work for our custom board with the ublox bmd345 and with the generic overlay-usb.conf. But the solution attached previously is enough for us by the moment. Now the ublox bmd345 transmits the signal strongly.

    Thank you very much for your help.

    Best regards,

    David Pérez

Related