Recommended approach for radio_test-like firmware on custom nRF52840 board

We are working with a custom nRF52840 PCB and would like guidance on the correct and supported way to build a firmware equivalent to the radio_test sample on the nRF52840 DK, specifically for RF testing with command-based control (TX/RX/carrier/sweep).

On the DK, radio_test works out of the box via UART/USB, but on custom hardware we are running into multiple dependencies and assumptions that make radio_test difficult to reuse reliably.

Before continuing further, we would like to clarify:

  1. Is radio_test_sample intended to be reused on custom boards, or is it DK-specific?

  2. If not, what is the Nordic-recommended and supported approach for creating a radio_test hex firmware for a custom nRF52840 pcb design.

  3. We also would like to have UART serial commands access where we can pass commands like: parameters_print, start)tx_sweep etc......ALL in a custom PCB



    We are happy to share the PCB schematic and pin mappings if required. We are mainly looking for direction on the correct approach, rather than ad-hoc fixes.

Any guidance from the Nordic team would be greatly appreciated.

Parents
  • Hi,

     

    Is radio_test_sample intended to be reused on custom boards, or is it DK-specific?

    Yes, you can use this on any custom nRF5x design.

    • If not, what is the Nordic-recommended and supported approach for creating a radio_test hex firmware for a custom nRF52840 pcb design.

    • We also would like to have UART serial commands access where we can pass commands like: parameters_print, start)tx_sweep etc......ALL in a custom PCB

    You will need to setup the pins to your desired GPIOs, as well as any other hardware related configuration specific to your board.

    Typical things:

    * DCDC present? If not, add this to your board overlay:

    &reg1 {
    	regulator-initial-mode = <NRF5X_REG_MODE_LDO>;
    };

     

    * external 32.768 kHz xtal present? If not, enable internal 32k RC oscillator:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

     

    And here is a example overlay for uart0. Feel free to take this and change as desired:

    &pinctrl {
    	uart0_default_alt: uart0_default_alt {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 1)>,
    				<NRF_PSEL(UART_RX, 1, 2)>,
    				<NRF_PSEL(UART_RTS, 1, 3)>,
    				<NRF_PSEL(UART_CTS, 1, 4)>;
    		};
    	};
    
    	uart0_sleep_alt: uart0_sleep_alt {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 1)>,
    				<NRF_PSEL(UART_RX, 1, 2)>,
    				<NRF_PSEL(UART_RTS, 1, 3)>,
    				<NRF_PSEL(UART_CTS, 1, 4)>;
    			low-power-enable;
    		};
    	};
    };
    
    
    &uart0 {
    	compatible = "nordic,nrf-uarte";
    	current-speed = <115200>;
    	status = "okay";
    	pinctrl-0 = <&uart0_default_alt>;
    	pinctrl-1 = <&uart0_sleep_alt>;
    	pinctrl-names = "default", "sleep";
    };

     

    Kind regards,

    Håkon

  • Thanks for this   

    I have 2 questions in my mind:

    1. Whatever you changes regarding overlays etc that you have suggested, can I add or modify in the already existing radio_test firmware?
    2. Do we have anything to do with the schematic diagram of the PCB board ? I mean, considering the TX and RX pins etc.

Reply Children
Related