Using radio_test sample on custom board.

Hi,

I want to run the radio_test sample on a custom board, how do I go about doing this?

The custom board uses a UBLOX NINA B401- which utilises the nRF52833 chip. Do you have any examples available for the UBLOX NINA B401 chip, including how to set up a dts for custom boards etc. 

I have the radio test sample running successfully using two nRF52840-DK boards, using nRF connect SDK on Visual Studio.

Parents
  • Hi,

    If you do not have board files fro your device yet you can add an overlay file that re-configures the UART pins for the DK to match your hardware, and connect to those pins. You can also simply change the pin configuration in the DK pinctrl file itself, and build for the DK. If so, update the uart0 pins in zephyr/boards/nordic/nrf52833dk/nrf52833dk_nrf52833-pinctrl.dtsi.

    Also, if the module does not include the DCDC componts, set CONFIG_BOARD_ENABLE_DCDC=n in prj.conf. In the same way, if it does not include the 32.768 kHz crystall, set CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y in prj.conf.

  • Thanks for your response! Do you have any examples available for the UBLOX NINA B401 chip and is it possible for the radio_test sample to work on it, or does it require any specific hardware that is in included in nrf52840-DK?

    Is it only the UART pins i need to change in the overlay files or will there be others too?

  • I see. Did you make any other changes to the project than what we have discussed? Can you share the project with your modifications? Also, if you build the project without any modifications, will it build then?

  • I fixed this issue by including CONFIG_CORTEX_M_SYSTICK=n in proj.conf. And successfully got the radio test running on nrf52833 DK, however now when attempting on my custom board using Ublox NINA B401. I am not getting any response. 

    Rather than adding overlay file, I edited the .dtsi file to match my board making it 

    &pinctrl {
        uart0_default: uart0_default {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 17)>;
                    //<NRF_PSEL(UART_RTS, 0, 5>;
            };
            group2 {
                psels = <NRF_PSEL(UART_RX, 0, 16)>;
                    //<NRF_PSEL(UART_CTS, 0, 7)>;
                bias-pull-up;
            };
        };
    Note I have commented out the RTS and CTS code as I do not have these connections on my board will that be an issue?
    My proj.conf is:
    CONFIG_CONSOLE_HANDLER=y
    CONFIG_SHELL=y

    CONFIG_DYNAMIC_INTERRUPTS=y

    CONFIG_NRFX_TIMER0=y

    CONFIG_ENTROPY_GENERATOR=y
    CONFIG_NRF_SECURITY=y

    CONFIG_FEM_AL_LIB=y
    CONFIG_CORTEX_M_SYSTICK=n
    CONFIG_BOARD_ENABLE_DCDC=n
     
    los is it possible to use the nrf connect serial terminal for chips connected via JTAG, as currently my board is not coming up in the available devices. Therefore I am using a python script currently to read the serial data, which I am not recieing any and I am expecting: 
    Clock has started
  • Hi,

    nicoled123 said:
    I fixed this issue by including CONFIG_CORTEX_M_SYSTICK=n in proj.conf.

    I see. It should not be needed though, and the sample builds out of the box for the nRF52833 DK on my end. Could it be that you have (inadvertedly or not) made some changes to the SDK? It could be worth wonloading the SDK and toolchain again to know that you have a good starting point.

    nicoled123 said:
    Note I have commented out the RTS and CTS code as I do not have these connections on my board will that be an issue?

    There is no need to comment out the flow control pin configuration. The default configuration for the DK does not enable flow control as the hw-flow-control property is not present. You can verify this by looking at the generatd zephyr.dts file in the build folder. And if you have a board where it is defined you can remove it in the board file or add an overlay with the following (adjust to another uart instance if not using uart0):

    &uart0 {
         /delete-property/ hw-flow-control;
    };

    nicoled123 said:
    los is it possible to use the nrf connect serial terminal for chips connected via JTAG, as currently my board is not coming up in the available devices.

    You can use PuTTY or another serial terminal of your choise as well.

    Note that if you still have problems you can use Segger RTT with the radio test example, by adding the following to prj.conf if you have a Segger debugger:

    CONFIG_USE_SEGGER_RTT=y
    CONFIG_SHELL_BACKEND_RTT=y

    But please be aware that RTT does continious access to the device which will cause noise and affect the measurements, so you should keep that in mind. 

    Br,

    Einar

  • Thanks for your help!  I reinstalled SDK and toolchains and that fixed the need for adding   CONFIG_CORTEX_M_SYSTICK=n in proj.conf.

    However I am still having issues running samples on my custom board. I am currently to run the simple blinky sample and no luck. I have tried adding an overlay to nrf52833 DK to change led0 from 13 to 28 and no luck! I have also tried creating a custom board. I have attached the custom board folder and also the blinky project I am working with (I have tested on nrf52833DK and it works on it). Also please see image below for pin out of my custom board. 

    I have tried flashing the board via nrf Connect VS code, programmer from nrf Connect Desktop and also JFlash.  I am using a Jlink Segger Plus to flash the board.  wombat_nina.zip1526.BLINKY.zip

  • Hi,

    Good to hear you were able to rever back to a clean SDK.

    Regarding the Blinky sample not working, the attached proejct fonfiguration does not include clock onfiguration, so the default configuration for the board is used. I see in your build folder that you have not made the change elsewhere either, as CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y is used. And this will not work on your board.

    You need to add CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to prj.conf in order for this to work.

Reply
  • Hi,

    Good to hear you were able to rever back to a clean SDK.

    Regarding the Blinky sample not working, the attached proejct fonfiguration does not include clock onfiguration, so the default configuration for the board is used. I see in your build folder that you have not made the change elsewhere either, as CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y is used. And this will not work on your board.

    You need to add CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to prj.conf in order for this to work.

Children
  • Hi,

    That fixed the issue! I know can run blinky and the radio sample on the custom board.

    In radio sample I am using a 52840 DK with my custom board and the RX payload did not match the transmission pattern.  Is this a result of having a FEM connected but not supporting it in the software yet? 

    My board has a nrf21540 FEM connected, so I am now trying to add support for it. I am trying to follow to seps to add the dts-nrf21540-fem.overlay to the project however it says it is located in samples/peripheral/radio_test folder, however I cannot find it. See below:

    It is also not within any of the subdirectories in this folder. Do you have a copy of this file? And to confirm to include support for this FEM I simply add the overlay, change the GPIO pins to match my board? Or what else must be added to the proj.conf for this?

    ^this approach is described in Radio test — nRF Connect SDK 1.5.1 documentation (nordicsemi.com)

    Another document : Radio front-end module (FEM) support — nRF Connect SDK 1.5.1 documentation (nordicsemi.com) says to add 

    It  says 

    'Before you add the devicetree node in your application, complete the following steps:

    1. Add support for the MPSL library in your application. The MPSL library provides API to configure FEM. See Integration notes in the nrfxlib documentation for details.

    2. Enable support for MPSL implementation in nRF Connect SDK by setting the CONFIG_MPSL Kconfig option to y. '

    Could you clarify the process of adding support for MPSL in application?

    Thanks for your help!

  • I added the FEM node described in  Radio front-end module (FEM) support — nRF Connect SDK 1.5.1 documentation (nordicsemi.com)  and it built with no errors and successfully flashed, now when i check parameters on both kits i get different TX power:

    52840 DK:

    custom board:

     

    When i go to change the TX power on 52840 to match 10dBm on custom board using command output_power it is not possible to achieve the 10dBm which my custom board reads

    Is it ok for the 52840 DK to not have the same TX power as custom board in this test, I understand the additional power for custom board comes from FEM gain. or do i need to use two boards with FEM?

    Additionally, when I go to Set nRF21540 Front-End-Module parameters. I get options:

    I want to adjust power and tried setting 

    CONFIG_RADIO_TEST_POWER_CONTROL_AUTOMATIC=n in proj.conf but i get error CONFIG_RADIO_TEST_POWER_CONTROL_AUTOMATIC was already disabled. Missing dependencies: FEM but when added FEM i get error CONFIG_FEM was assigned the value y, but got the value n. Missing dependencies: MPSL_FEM_ANY_SUPPORT. I keep adding the dependencies but another is thrown am I missing something? 

    Could you explain the rx and tx sweep functions too and what to be expected to see. Also is it possible to connect the custom board to the RSSI viewer to get a visual representation of the sweep, as currently it says 'no device set up found'

  • Hi,

    nicoled123 said:
    Is it ok for the 52840 DK to not have the same TX power as custom board in this test, I understand the additional power for custom board comes from FEM gain. or do i need to use two boards with FEM?

    As you write, the nRF52840 DK does not include a FEM, so the maximum output power on that will be 8 dBm. But wether that is OK or not depend on what you want to achieve/test?

    nicoled123 said:
    I keep adding the dependencies but another is thrown am I missing something?

    I suggest you look at the RFf21540 DK board fiels for reference (zephyr/boards/nordic/nrf21540dk/). You can also look at the nRF21540 shield files to see only the changes needed for the FEM (nrf/boards/shields/nrf21540ek/). You can also refer to the documentation for details: Enabling FEM support.

  • Hi,

    I have set  ONFIG_RADIO_TEST_POWER_CONTROL_AUTOMATIC=n so now I should be able to get 8dBm from nrf52833 chip on my custom board but now also able to set the nrf21540 FEM output power using fem tx_power_control command. So, to confirm the total output power will be that from out_power command (max 8dBm) plus power set from fem tx_power_control.

    Could you explain the rx and tx sweep functions too and what to be expected to see. Also is it possible to connect the custom board to the RSSI viewer to get a visual representation of the sweep, as currently it says 'no device set up found'

    Also, can you confirm difference in commands start_tx_carrier and  start_tx_modulated_carrier

  • Hi,

    nicoled123 said:
    Could you explain the rx and tx sweep functions too and what to be expected to see

    For both tx and rx sweep you specify the start and end channel using start_channel and end_channel. Then start the sweep. The time spent on each channel is also configurable by the time_on_channel command.

    nicoled123 said:
    Also is it possible to connect the custom board to the RSSI viewer to get a visual representation of the sweep, as currently it says 'no device set up found'

    Note that you would need a separate device for the RSSI viewer. This is then in Tx and is scanning the frequency band (channel by channel) to show the activity. This should work with any nRF52 series DK, but may not work on custom board, and not boards without DCDC and 32.768 kHz oscillator as it programs the device with a pre-compiled hex file that is needed.

    nicoled123 said:
    Also, can you confirm difference in commands start_tx_carrier and  start_tx_modulated_carrier

    start_tx_carrier will output a clen carrier wave, without any modulated signal. start_tx_modulated_carrier on the other hand will output a modulated signal with a random payload.

Related