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

dtm parameters

In SDK 11 description od DTM "vendor specific" settings, there is a lot of inconsistency in parameters names/numbers - could anyone help me understand this part?

As for now I assume: Parameter 1: CMD Parameter 2: Freq Parameter 3: Length Parameter 4: PayloadType

is that correct?

thanks, best regards

  • Yes, the dtm_cmd() function has four input parameters:

    1. Command_code: It’s control the DTM states like reset device, start receive test, start transmission test or end test.
    2. Frequency: The physical channel which will be used in rx/tx testing, which range is from 0 to 39. And the actual frequency is (2400 + frequency parameter) MHz.
    3. Length: For ordinary usage, it will be the payload length, which can be 0 to 37. But for vendor specific payload (describe later), it can be another control parameter like tx power or the timer selection.
    4. Payload: Here are four types for DTM packet for transmission test. The DTM_PKT_PRBS9 is a pseudo-random bit sequence in repeating 9-bit sequence, which used for power transmission testing. The DTM_PKT_0x55 is consisted with “10101010” repeated, which used for frequency deviation testing. The DTM_PKT_0x0F is consisted with “11110000” repeated, and it is used for carrier and initial frequency testing.

    In additional, there’s another type for vendor specific command. If the payload is DTM_PKT_VENDORSPECIFIC, the DTM will call dtm_vendor_specific_pkt() to do the special operation, and the inputs are one command and one parameter.

    The command will come from the field "length" in dtm_cmd(), the parameter will come from the field "frequency" in dtm_cmd(). According to the nRF5x SDK dtm module, it’s has 4 types of commands.

    For CARRIER_TEST and CARRIER_TEST_STUDIO, it emits the unmodulated carrier at the channel frequency you set in dtm_cmd().

    For SET_TX_POWER, you can change the tx power by using the field “frequency” in dtm_cmd().

    For SELECT_TIMER, you can select the timer which used by DTM module during the test, by pass the timer number (0~2) into the field “frequencey” in dtm_cmd(). If your test application using timer0 for other feature, you may need to select another timer through SELECT_TIMER for DTM module.

    If you reference the DTM page from infocenter, seems there's some mistake when explain the SELECT_TIMER, and should be updated as follow:

    If parameter 3 (length) is set to 2 (symbol SET_TX_POWER), parameter 2 (freq) sets the tx power in dBm, ranging from -40 to +4 in steps of 4, 0 dBm being the reset value. The tx power can only be modified while no Transmitter Test or Receiver Test is running.

    If parameter 3 (length) is set to 3 (symbol SELECT_TIMER), parameter 2 (freq) selects the timer to be used by dtmlib for Transmitter Test timing. Valid timer identifiers are 0, 1 and 2. Configuring the timer to be used allows dtmlib to be integrated in a larger test environment where other modules may be occupying the default timer (timer 0).

    Hope it's more clear :p

  • Thanks. One more thing - the description of txpower is also not fully clear with respect to accepted values; I suppose it could be more efficient to put a "txpower vs paramater value" table in the description to avoid digging through the library.

Related