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: Tx power setup at compilation or run time level

Part Number: CC2564
Other Parts Discussed in Thread: CC2564

Hello, is that possible to setup the transmit power for pairing/data transmission/etc... by compiler #define? We are using the CC2564 Bluetooth stack on STM32, we would like to know how to reduce the power output at compiler #define level, or if not possible, how to do at run time level....

- if it can be done at compiler level, which #define has to be changed?

- if it must be done at run time level, when can it be done...(just after stack init? And do we need to launch a new calibration? 

Thanks/Florent

  • Florent,

    The VS_Set_Max_Output_power function should be called in OpenStack() right after BSC_Initialize(). Please refer to processors.wiki.ti.com/.../CC256x_VS_HCI_Commands for more information on how to set the power vector.
  • Hi Dale,

    something unclear, on the wik, please see 1 & 2 here after:

    ** 1 **

    Do we must keep 5dBm power spacing in the power vector values? So if we change the max power level to let's say 2bBm, it is 10 dBm less applied for each level which will convert to:

    original with 12dBm:

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

    new value with 10dBm less:

    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, 0x9c-10, 0x18-10, 0xd2-10, 0xd2-10, 0xd2-10, 0xd2-10, 0xd2-10, 0xd2-10, 0xd2-10, 0xdc-10, 0xe6-10, 0xf0-10, 0xfa-10, 0x04-10, 0x0e-10, 0x18-10, 0xff, 0x0000

    or is that possible to decrease only the top 3 levels like this: (-10 -7 -3 dBm applied on top 3 levels)

    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc, 0xe6, 0xf0, 0xfa, 0x04-3, 0x0e-7, 0x18-10, 0xff, 0x0000

    ** 2 **

    external PA mode 2 Bit 1
    . . .
    Bit 15
    0xFFFF
    1: External PA on @Power level 1; 0: Off
    . . .
    1: External PA on @Power level 15; 0: Off
    Do not change.

    and after in the wiki example it seems the external PA bits are all set to zero as follow:

    #Set BT BR (GFSK) LP Vectors Values (note the need to multiply the output power in dBm by '2')
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc, 0xe6, 0xf0, 0xfa, 0x04, 0x0e, 0x18, 0xff, 0x0000
    Wait_HCI_Command_Complete_VS_DRPb_Set_Power_Vector_Event 5000, 0x00, 0xfd82, 0x00

    What to set for external PA mode? all 0 or all 1?

    Thanks/F

  • Hello Dale,
    We have played a bit with the command but can't find much difference, how is it possible to check that the new power vector values are taken into account?
    Now we are sending for GFSK:
    Byte_t CommandBuffer[20] = {0x00, 0x9c, 0x18, 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xff, 0x00, 0x00};

    for EDR2:
    Byte_t CommandBuffer[20] = {0x01, 0x9c, 0x18, 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xff, 0x00, 0x00};

    for EDR3:
    Byte_t CommandBuffer[20] = {0x02, 0x9c, 0x18, 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xd2 , 0xff, 0x00, 0x00};


    All power levels are set to -23dBm except level 0 (-50dBm) and 1 which is use for BLE.

    Thanks/F
  • Florent,

    You can look in the firmware logs for the power level change command to be sent, and see the parameters that are being used. If you don't mind sending the firmware logs over, I can also take a look.

  • Hi Dale, we are using the stack on STM32L4, I dont know if we can extract the logs easily: is there any command we can send to the CC2564 to output the logs in the terminal window?

    Thanks

    Florent

  • Florent,

    Unfortunately I'm not aware of any way to have the device print logs through the terminal, here is the User Guide for collecting logs via the TX_DBG pin.

    processors.wiki.ti.com/.../CC256x_Logger_User_Guide

  • Hi Dale,
    Please can you check below code, do you think it 'Looks' OK? (understand it may be difficult to judge if OK or not...)
    ******
    Byte_t CommandBuffer[20] = {0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc, 0xe6, 0xea, 0xed, 0xf2, 0xf6, 0xfa, 0xff, 0x00, 0x00};
    Byte_t Length = 1;
    Byte_t Status;
    Byte_t ReturnBuffer[1];


    Byte_t OGF = VS_COMMAND_OGF(HCI_VS_DRPb_Set_Power_Vector);
    Word_t OCF = VS_COMMAND_OCF(HCI_VS_DRPb_Set_Power_Vector);

    Result = HCI_Send_Raw_Command(BluetoothStackID, OGF, OCF, sizeof(CommandBuffer), CommandBuffer, &Status, &Length, ReturnBuffer, TRUE);
    *****
    We send this command for all modulation type (CommandBuffer[0] = 0...1....then 2
    Frankly speaking it seems there is no action, we put a current probe but we cannot see any difference with low or high power setup. The returned value is zero so means OK but I have some doubts....
    Thanks
    Florent
  • Would it make a big difference to reduce the max TX power of the CC2564 when sending around 500 bytes per second through a SPP server connection? The chip itself is probably consuming way more so reducing the TX power may not be effective at all to reduce consumption? (For continuous audio streaming I guess it would be more relevant)
    Tx/F
  • With that low data size it might not be very noticeable, have you tried measuring the RSSI over the air to see if there is any significant change in signal strength?
  • Hi Dale,

    Indeed that's what we were trying to look for (measuring the RSSI). We didn't find any tools suitable under Windows (we tried few without success), we are now trying a tool to be run on an android tablet.

    Thanks/F