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.

CC2540: How to read Tx power level using SimpleBLEBroadcaster

Part Number: CC2540
Other Parts Discussed in Thread: CC2592, CC2541, CC2590

Hello,

We are using the HostTestReleaseCC2540_RX.hex file to flash into the CC2540.  Then we access the 4-wire UART bus to use the CC2540 in a BLE PHY test running on a laptop and using CBT Tester of R&S.

The default power setting is 0 dBm.  Our application is having an external Range Extender CC2592.  Hence the output signal is more than 20 dBm.  We measure about 22 dBm.  This is too high.  Therefore we want to have a  Host Test Release with a default power setting that is lower, lets say about -12 dB or so.  This value should be always there, even after a RESET.  The BLE PHY test software always have to perform a DUT RESET before it starts running.  As such it will/might overwrite the reprogrammed gain setting again in the CC2540.  In short : we need a way to have the default power setting changed and fixed to another value than 0 dBm.

Is there a way to generate a HostTestReleaseCC2540_RX.hex with a default power setting LOWER than 0 dBm, let's say for example -12 dBm?  This values must remain in the chip after a RESET.

Thanks

F.R.

  • Hello,

    Where did you find HostTestReleaseCC2540_RX.hex?

    I believe you should be able to simply open the HostTestRelease project and modify HCI_ResetCmd to set TX powe then build new hex files. You can only use between 4dbm, 0dbm, -6dBm and -23 dBm. I have not tested this.

    /*******************************************************************************
     *
     * This BT API is used to reset the Link Layer.
     *
     * Public function defined in hci.h.
     */
    hciStatus_t HCI_ResetCmd( void )
    {
      hciStatus_t status;
    
      // reset the Link Layer
      status = MAP_LL_Reset();
    
      uint8 cmdComplete = TRUE;
      if(!status) {
          MAP_LL_EXT_SetMaxDtmTxPower(LL_EXT_TX_POWER_MINUS_6_DBM);
          MAP_LL_EXT_SetTxPower(LL_EXT_TX_POWER_MINUS_6_DBM, &cmdComplete);
          // We ignore cmdComplete as we assume the tx power will be set immediately.
      }

  • Hello,

    The BLE stack 1.4.2 for the CC2540/CC2541 uses a library for the HCI commands, so i can't modify them.

    The only hit i get when searching for HCI_Reset() is in the hci.h header file.

    Regards,

    Davy

  • You are right, source would be needed.
    Is it not possible to add HCI_EXT_SetTxPowerCmd and HCI_EXT_SetMaxDtmTxPowerCmd in the CBT test script after HCI_Reset?
  • Hello F.R.,
    CC254x are not BLE 5.x qualified (only 4.x) and therefore the 10 dBm limit apply for CC2540. The CC2590 would therefore be more suitable in your design and 0 dBm output power from CC2540 can result in output poewr less than 10 mW.

    Refer to the Bluetooth SIG Core Spec section 3 TRANSMITTER CHARACTERISTICS:
    "Note: The maximum output power for LE in v4.0, v4.1, and v4.2 is 10 mW."

    PS:
    I did an exercise to figure out if we could catch HCI_RESET in the application code to set tx power in the app after a HCI_RESET. But it cannot be done as HCI_RESET and the complementary event returned back to the host are all handled directly in the transport layer which is compiled in library form.
  • Hello Eirik,

    You are right LE in 4.0 is limited to 10mW EIRP.  Only classic BT 4.0 class 1 can go up to 100mW or +20 dBm EIRP (20 dBm conducted with 0 dBi antenna gain).  Is there a BT4.0 stack for CC2540 or is it only suitable for BLE4.0?

    F.R

  • Hello FR,
    CC2540 can only run BLE (Bluetooth Low Energy).
  • Hi Eirik, we do not have the source code of the HostTestApp. How can you help us to do the needed modification of the power setting of the CC2540? I think we need to set TXpower_REG_0x55. Seems in the test script for the CBT the power setting is not executed.
    Regards
    F.R.
  • Hello FR,
    I am sorry, but we cannot provide source. You must either find a way to change the HCI script from the CBT or change PA on the board.