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

direct test mode : TX power commands

Dear community,

I'd like to report a problem on the Direct Test Mode software provided in nrf51 SDK v6.1.0.

In this mode, 2-bytes commands are transmitted over the serial port, and interpreted by the DTM software, as follows : [code: 2bit] [frequency: 6bit] [length: 6bit] [payload: 2bit]

This works fine for standard Tx/Rx/reset commands. However, for more specific radio power control ("Tx power") commands, the above 'frequency' field is used to store the power value, and copied directly into the NRF->TXPOWER register.

Unfortunately, this does not work, as expected, because :

  • the TXPOWER register data format is 8-bit signed, so 6 bits are not sufficient to code the full range [-40 ; +4].
  • we could use the 'code' field bits to send 8-bit commands, but in the current state, DTM does not support this format.

I'm testing a patch to fix, and will be able to post it if necessary. Your thoughts are welcome !

Parents
  • OK, so if anyone is interested one day, this patch will add support for vendor-specific commands that need 8-bit wide 'frequency' field.

    One practical example: I want to set NRF51822 radio power value to -30dBm. The TXPOWER register's value is a negative 8-bit value, so DTM won't handle it (it will read the 6 LSB, then cast them as uint32_t).

    After applying the patch to ${SDK_PATH}/nrf51422/Board/nrf6310/direct_test_mode/main.c, you can send the following 2-byte command :

    • [bit 15-08] TXPOWER : 0xD8 (-30dBm)
    • [bit 07-02] LENGTH : 0b000010 (2 bytes)
    • [bit 01-00] PAYLOAD : 0b11 (vendor-specific)

    In bash for example:

    $ echo -ne '\xD8\x0B' > /dev/ttyUSB0

Reply
  • OK, so if anyone is interested one day, this patch will add support for vendor-specific commands that need 8-bit wide 'frequency' field.

    One practical example: I want to set NRF51822 radio power value to -30dBm. The TXPOWER register's value is a negative 8-bit value, so DTM won't handle it (it will read the 6 LSB, then cast them as uint32_t).

    After applying the patch to ${SDK_PATH}/nrf51422/Board/nrf6310/direct_test_mode/main.c, you can send the following 2-byte command :

    • [bit 15-08] TXPOWER : 0xD8 (-30dBm)
    • [bit 07-02] LENGTH : 0b000010 (2 bytes)
    • [bit 01-00] PAYLOAD : 0b11 (vendor-specific)

    In bash for example:

    $ echo -ne '\xD8\x0B' > /dev/ttyUSB0

Children
Related