radio_test sample with USB interface

I have a custom board with nrf5340 and want to run the radio_test sample on it. I have been able to compile and run the sample using the uart serial terminal, but I'm not able to get the USB version to work. In the RTT log the usb device shows up as configured and the COM port is also available with the name that was given in the configuration, but there is no output and no reaction to input. I've tried both building for the nrf5340dk and with my board files, with the same result. 

USB logging works without issues in our normal application, so I don't think there should not be any hardware issues. Any ideas on what could be wrong? For some of our testing we won't have access to the uart interface and will need to use the USB interface.

SDK version 2.9.1

Using nRF Connect extension in VSCode for building and flashing

(We also have another custom board with nrf5340. Here the radio test sample was build for usb using the nrf5340dk board files, and worked without issues. This was using SDK version 2.6.0, so I also tried that, but still no luck)

  • Hi,

     

    It sounds like the device tree node "zephyr,shell" is not pointed towards the usb cdc_acm node.

    Could you try to add this to your overlay?

     / {
    	chosen {
    		zephyr,console = &cdc_acm_uart0;
    		zephyr,shell = &cdc_acm_uart0;
    	};
    };
    
    &zephyr_udc0 {
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    		label = "CDC_ACM_0";
    	};
    };

     

    Kind regards,

    Håkon

  • Thank you for quick feedback! 

    This is what is in the overlay already:

    / {
    	chosen {
    		zephyr,shell-ipc = &ipc0;
    		ncs,remote-shell-uart = &cdc_acm0;
    	};
    };
    
    &zephyr_udc0 {
    	cdc_acm0: cdc_acm0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };
    
    &uart0 {
    	status = "disabled";
    };
    

    I tried adding "zephyr,console" and "zephyr, shell", but the result is still the same.
    If I remove "ncs,remote-shell-uart" the remote_shell application fails to compile

  • Hi,

     

    Sorry for missing this in my initial post. There's a configuration suffix that you can apply to enable USB:

    FILE_SUFFIX=usb

    Which is appended like this when building in VSCode:

     

    For command line build:

    west build -b nrf5340dk/nrf5340/cpunet -- -DFILE_SUFFIX=usb

     

    Could you try this and see if this helps?

     

    Kind regards,

    Håkon

Related