This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Radio test example through USB UART CLI?

Dear all,

For EMI/EMC Test, we need the USB UART CLI functionality for example "Radio Test",

could you tell us how to implement it or any example can do that?

Thanks.

Parents
  • HI Conan, 

    the Radio Test Example in SDK v15.3.0 uses the CLI to control the tests. 

    The Radio Test Example demonstrates how to configure the radio as the constant RX or TX carrier, the modulated TX carrier, or the RX or TX sweep.

    The tests are controlled with Command Line Interface (CLI) by the serial port. At any time during the tests, you can set the radio parameters output power, bit rate, and channel. You can also set the time on each channel in the sweep mode, in steps of 1 millisecond to 99 milliseconds, every 1 millisecond. The application also allows you to send a data pattern to another board.

    Best regards

    Bjørn

  • Could you tell us how to make the CLI functionality of  Radio Test Example through an USB to serial port (Not GPIO serial port)?

    Thanks.

  • HI Conan, 

    do you mean that you are using a USB-TTL cable to connect the nRF52840 to the computer or do you have a USB-serial post chip on the Device under test (DUT)?

    If its the former, then you will have to modify the RX and TX pin numbers in cli_init() to the pins that are available on the DUT.

    static void cli_init(void)
    {
        ret_code_t ret;
    
    
        nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG;
    
        uart_config.pseltxd = TX_PIN_NUMBER;
        uart_config.pselrxd = RX_PIN_NUMBER;
        uart_config.hwfc    = NRF_UART_HWFC_DISABLED;
        ret                 = nrf_cli_init(&m_cli_uart, &uart_config, true, true, NRF_LOG_SEVERITY_INFO);
        APP_ERROR_CHECK(ret);
    }

    After modifying the pin numbers you should be able to use Putty with the settings described under UART and USB settings

    Best regards

    Bjørn

Reply
  • HI Conan, 

    do you mean that you are using a USB-TTL cable to connect the nRF52840 to the computer or do you have a USB-serial post chip on the Device under test (DUT)?

    If its the former, then you will have to modify the RX and TX pin numbers in cli_init() to the pins that are available on the DUT.

    static void cli_init(void)
    {
        ret_code_t ret;
    
    
        nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG;
    
        uart_config.pseltxd = TX_PIN_NUMBER;
        uart_config.pselrxd = RX_PIN_NUMBER;
        uart_config.hwfc    = NRF_UART_HWFC_DISABLED;
        ret                 = nrf_cli_init(&m_cli_uart, &uart_config, true, true, NRF_LOG_SEVERITY_INFO);
        APP_ERROR_CHECK(ret);
    }

    After modifying the pin numbers you should be able to use Putty with the settings described under UART and USB settings

    Best regards

    Bjørn

Children
No Data
Related