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

Reply Children
  • 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

  • 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

Related