This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564 power control

Other Parts Discussed in Thread: CC2564

Hello E2E,

I have a customer who sent me the following.  Can you advise? 

"I am currently working with the CC2564. We would like to have a way to control the BLE output power of the chip. So far I’ve come across  one of the vendor specific HCI commands called HCI_VS_LE_Output_Power mentioned here: http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_LE_Output_Power_.280xFDDD.29. This function works by changing the power level index used for LE power (the indices and their corresponding output values in dBm are defined in the GFSK power vector table). In short, using this method seems to work, for when I put the device into advertising mode and scan for it using an iPhone app, I can see that the RSSI of the device changes as I alter the LE output power.

 

However, from what I’ve read on a few forums, the HCI_VS_LE_Output_Power command should not be used and the LE power setting should not be changed on the fly (see the accepted answers of the question posted here: https://e2e.ti.com/support/wireless_connectivity/bluetooth_cc256x/f/660/p/447764/1609133). That same forum states that the HCI_VS_DRPb_Set_Power_Vector command should be used instead to change the LE output power (by modifying power level index 1 of the GFSK power vector table, which is used for LE power) and should then be followed by RF recalibration. So I tried using the HCI_VS_DRPb_Set_Power_Vector command to change the power vector table and followed that up with a RF recalibration, but I am not seeing any discernible changes in the output power when using my ad hoc testing method mentioned previously. In addition, when I try to set the power level index #1 to anything less than -5dBm, the HCI returns BTPS_ERROR_HCI_DRIVER_ERROR.

 

So in summary my questions are:

 

  • Why should I not be using the HCI_VS_LE_Output_Power command to alter the LE output power?
  • How do I read the current LE output power level in use by the chip? (When I try using HCI_Read_Transmit_Power_Level(), the function always returns 12dBm, even after I’ve successfully changed the LE output power using HCI_VS_LE_Output_Power)
  • How do I rewrite the GFSK power vector table since it does not seem to work using HCI_VS_DRPb_Set_Power_Vector?

Why do I get an error when attempting to change the power level index #1 value to anything less than -5dBm?

Thank you very much!

Russell

  • Just a slight update to the previous post. The engineer was able to verify that they are actually able to change the power vector table. So my new summarized questions are:
    • Why should I not be using the HCI_VS_LE_Output_Power command to alter the LE output power?
    • How do I read the current LE output power level in use by the chip? (When I try using HCI_Read_Transmit_Power_Level(), the function always returns 12dBm, even after I’ve successfully changed the LE output power using HCI_VS_LE_Output_Power)
    • Why can I not rewrite the GFSK power vector table on the fly with HCI_VS_DRPb_Set_Power_Vector?

    Thanks and have a great weekend!

    Russell
  • Hi Russell,

    The HCI_VS_DRPb_Set_Power_Vector(0xFD82) is used to set the power level (index 0-16 mapped to dBm levels) for modulation type GFSK. The HCI_VS_LE_Output_Power(0xFDDD) is used to select the power level index for BLE (value set to index 1 in the .bts initscript file).'

    • Why should I not be using the HCI_VS_LE_Output_Power command to alter the LE output power?
      • As mentioned above and in the VS command documentation, this command is used to select the power level index to use as BLE power and not the LE output power.
    • How do I read the current LE output power level in use by the chip? (When I try using HCI_Read_Transmit_Power_Level(), the function always returns 12dBm, even after I’ve successfully changed the LE output power using HCI_VS_LE_Output_Power)
      • The HCI_VS_LE_Output_Power does not change the output power. See the example below about how to change LE Power. There is no vendor specific command to read the current BLE output power. Since this needs to be done only once during the chip initialization, there is no need to read the current value. If the BLE power has not been changed by the commands below, the value is default (12dBm as mentioned in the VS commands wiki). If changed, than you will know what you changed it to and won't need to change it again.

    • How do I rewrite the GFSK power vector table since it does not seem to work using HCI_VS_DRPb_Set_Power_Vector?
      • example below.

    Example to change BLE output power:

    #Set BT BR (GFSK) LP Vectors Values (note the need to multiply the output power in dBm by '2'. The index 1 in bold is BLE power 0xf0=-5dBm.)

    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc, 0xe6, 0xf0, 0xfa, 0x04, 0x0e, 0xf0, 0xff, 0x0000 Wait_HCI_Command_Complete_VS_DRPb_Set_Power_Vector_Event 5000, 0x00, 0xfd82, 0x00

    #Run internal calibration

    Send_HCI_VS_DRPb_Enable_RF_Calibration 0xFD80, 0x00, 0x00000800, 0x01 Wait_HCI_Command_Complete_VS_DRPb_Enable_RF_Calibration_Event 5000, 0x00, 0xfd80, 0x00

    BR,

    Vihang

  • Thanks Vihang!

    One follow up question:

    • For the RF calibration, I notice the value 0x0000800 is used for the calibration procedure parameter. What is the significance of this value? I’ve been using the RF calibration parameter values used in VS_Set_Max_Output_Power(), so I’m curious as to the differences between them.

    Thanks for your help!

    Russell
  • Hi Vihang,
    any update here? Thanks!

    Russell
  • Hi Russell,

    Since this is a closed thread, it is easier for us to track it if the follow up questions are posted in a different thread. It also helps decreasing the overall response time.

    The calibration procedure field in the RF calibration command is a bitmask. Meaning every bit in this 4 byte word is related to one of the internal calibration of the controller. The 0x00000800 correlates to TPC that is required update the output power vector. The details on the bitmask values are TI internal use only and it should be selected exactly the same as mentioned in our documentation (i.e. VS Command wiki).

    BR,
    Vihang