CC2340R2: HCI command for tx power level - what happens when invalid value is used?

Part Number: CC2340R2
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

What happens when the wrong TX power level is used in the HCI command HCI_EXT_SetTxPowerDbmCmd? Will the device defer to the default value, to the last selection, or something else?

Thank you!

  • Hi,

    Thank you for reaching out. Can you clarify what you mean by "wrong" TX power level? Are you referring to a value that the device does not support? If so, then I believe the closest supported value will be selected. You can test this by setting the txPower to 0dbm and then attempting to set it to 100dbm. This should result in the txPower being set to the device max of 8dbm. You should be able to measure a txPower difference through a current measurement, taking a conducted rf measurement or by measuring the RSSI (measuring the RSSI is less reliable).

    Best Regards,

    Jan

  • This was tested by the customer. When they send -23dBm, instead of configuring for the lowest available -20dBm, it actually sets it at 0dBm, thus the question about the default value. I need confirmation on how the part is designed to operate, since test results are giving us unexpected results.

  • Hi,

    Got it. I must be mistaken then. I took a look at the source code and it seems that if an invalid value is provided, then the txPower should not change. Does this line up with your observations?

    Best Regards,

    Jan

  • No, it seems that the power level always returns to 0dB if an invalid parameter is entered. Here are the test results:

    Here is the experiment and the results:

    Power Level | Measured Current

           -12        |   7 ma

           -23        |   9 ma        

           -12        |   7 ma

              8        |   18 ma

           -23        |   9 ma

              8        |   18 ma

              0        |   9 ma

  • Hi,

    Thank you for running these tests. You must be correct then regarding the behavior. The 0dbm txPower setting is the default option, so I think this makes sense, but it was not clear to me according to the source code why it resolves this way. That said, given your observations this is the way it must resolve.

    Have you set the default txPower to 0dbm in sysconfig? I would be curious to see if changing that value has an impact on which value the device uses if an invalid input is provided.

    Best Regards,

    Jan

  • Yes, the value was set to 0dBm in SysConfig. Still waiting for tests that have a different setting in SysConfig.

  • Hi,

    Got it. Thank you for confirming. Please let me know what the results end up being.

    Best Regards,

    Jan