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)

Parents
  • 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

  • Sorry for the late reply. I was building with the usb suffix already, but after some experimenting I realized that the USB interface was indeed working, I was just not using the correct tools. I think there might be some basic knowledge about shells/consoles I am missing. 


    I was trying to use both CuteCom and "Serial Monitor" for VSCode. Using Linux if that is relevant. CuteCom gave no output, but seems the commands I was sending was put in a buffer or something, because if I opened the com port in "Serial Monitor" I got the output from the application. But then I was not able to send anything anymore. 
    After switching to Putty it works like a charm :)


Reply
  • Sorry for the late reply. I was building with the usb suffix already, but after some experimenting I realized that the USB interface was indeed working, I was just not using the correct tools. I think there might be some basic knowledge about shells/consoles I am missing. 


    I was trying to use both CuteCom and "Serial Monitor" for VSCode. Using Linux if that is relevant. CuteCom gave no output, but seems the commands I was sending was put in a buffer or something, because if I opened the com port in "Serial Monitor" I got the output from the application. But then I was not able to send anything anymore. 
    After switching to Putty it works like a charm :)


Children
  • Hi!

     

    RakeLund said:
    Sorry for the late reply.

    No worries.

    RakeLund said:
    I was trying to use both CuteCom and "Serial Monitor" for VSCode. Using Linux if that is relevant. CuteCom gave no output, but seems the commands I was sending was put in a buffer or something, because if I opened the com port in "Serial Monitor" I got the output from the application. But then I was not able to send anything anymore. 
    After switching to Putty it works like a charm :)

    I am glad to hear that you got things running as expected! I hope you have a wonderful weekend!

     

    Kind regards,

    Håkon

Related