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.

firmware version -CC2564

Other Parts Discussed in Thread: CC2564

Hello,

We have a problem to operate the BLE on our developed HW board that contain the CC2564 processor.

We are able to communicate with the CC2564 through the UART, but although we start advertising (using advertiseLE 1 command), there is no BLE transmission.

 

Our reference development environment contained the CC2564 FXN evaluation board, Worked fine with the same code.

A thorough review on the HW interface of the CC2564 in our board was done and it is almost identical to the CC2564 FXN evaluation board.

The only differences:

1)      We are using the CC2564B chip in our board

2)      In our HW board the UART is at 1.8v, in the CC2564 FXN evaluation board it is 3.3v

3)      The CC2564 chip FW and device chipset

 

Our MCU is  STM32L476. We use Bluetopia stack, ported to STM32L4xx MCU.

 

Detailed description of what we did so far:

 

When we are working on our own board with bluetopia as is, we are not able to transmit  BLE and BT (UART works properly):

Our board outputs the following initialization data:

 

OpenStack().

Bluetooth Stack ID: 1

BLE Support initialized.

Device Chipset: 4.0

BTPS Version  : 4.0.2.1

Project Type  : 6

FW Version    : 6.15

App Name      : DEVICE APP

App Version   : 1.0

LOCAL BD_ADDR: 0x1CBA8C2AA247

GAP_Set_Pairability_Mode(pmPairableMode).

GAP_Register_Remote_Authentication() Success.

Successfully registered OGGIILE Service.

 

When we are working on our own board with bluetopia and the patch applied, we are able to transmit  BT, but not BLE:

 

Our board outputs the following initialization data:

OpenStack().

Bluetooth Stack ID: 1

BLE Support initialized.

Device Chipset: 4.0

BTPS Version  : 4.0.2.1

Project Type  : 6

FW Version    : 6.85

App Name      : OGGII-EVB

App Version   : 1.0

LOCAL BD_ADDR: 0x1CBA8C2AA247

GAP_Set_Pairability_Mode(pmPairableMode).

GAP_Register_Remote_Authentication() Success.

Successfully registered OGGIILE Service.

 

When we are working with the CC2564 EVM board instead of our own board CC2564 chip, we are able to transmit  both BT and BLE:

The board outputs the following initialization data:

OpenStack().

Bluetooth Stack ID: 1

BLE Support initialized.

Device Chipset: 4.1

BTPS Version  : 4.0.2.1

Project Type  : 6

FW Version    : 7.26

App Name      : DEVICE APP

App Version   : 1.0

LOCAL BD_ADDR: 0xD03972CD8F34

GAP_Set_Pairability_Mode(pmPairableMode

GAP_Register_Remote_Authentication() Success.

Successfully registered OGGIILE Service.

 

Our questions:

 

1)    Is it possible that our problems source is the firmware version

2)    If yes, can you send us the updated version (in h file) that we will able to switch our patch content (in TI website the latest is 6.15)

3)    With what FW version Miguel and his team worked when they tested the STM32 bluetopia stack.

4)    Does the STM32 bluetopia stack should work with device chipset 4.0

5)    Is it possible to order CC2564 chips with FW version 7.26 and up (as in the CC2564 FXN evaluation "blue" board)

 

Thanks,

  • Hi Amir,

    It seems an issue with the service pack (SP) (firmware) version. For the CC2564B, the SP version is 7.XX.

    In the Bluetooth Stack release, the CC256XB.h must be included. it can be added by defining "__SUPPORT_CC256XB_PATCH__" in the project.

    http://processors.wiki.ti.com/index.php/CC256x_MSP430_TI_Bluetooth_S tack#CC256XB_Information

    ~Miguel

  • Hi Miguel,

    One big correction to Amir's previous post, The chip we are using is CC2564 - we are not sure if it is CC2564 or CC2564B. That's why we tryed both patch options.

    The CC256XB.h is indeed included in the project. (one remark - in your STM32 bluetopia project there is no "__SUPPORT_CC256XB_PATCH__" define to include the  CC256XB.h file , instead there is #ifndef to "__SUPPORT_CC256X_PATCH__". but the project itself includes the CC256XB.h file)

    When we are applying this patch in our HW board, we still get that the FW version is 6.15 (although the function DownloadPatch return TRUE (success).

    When we are applying this patch when working with the CC2564 "blue" evaluation board (the working environment) . we saw that the FW version is changed from 7.16 (before calling DownloadPatch function) to 7.26 (after calling DownloadPatch function) . The device chipset is also updated from 4.0 to 4.1.

    When we apply the CC2564 patch (from CC256X.h file) on our board:

    • the FW is updated from 6.15 to 6.85.
    • The device chipset stays 4.0.
    • BT is working. BLE do not

    From the SW results it seems that the device on our board is CC2564 and not CC2564B.

    1) Is there's a patch that is able to update the CC2564 to support BLE?

    2) Did you test the bluetopia for ST also with the CC2564 chip? If yes, Did the BLE worked?

    Thanks,

    Erez

  • Erez,

    Ok. If the FW version is 6.15 before sending the SP, then you have the non-B version.

    Therefore, you should define "__SUPPORT_CC256X_PATCH__" in your project settings if using the STM32 Bluetopia release. Also, you should define "__SUPPORT_LOW_ENERGY__". These setting will include the ""CC256X.h" file and enable the BLE add-on SP correspondingly.

    BUT, there is one minor update you have to implement:

    1) Update array name from "Patch" to "BasePatch" in the CC256X.h file.

    ~Miguel
  • Hi Miguel,

    Unfortunately, defining "__SUPPORT_CC256X_PATCH__" leads to link error (you can see that also in previous forum threads regarding this issue). The bluetopia.a library is seeking for HCI_VS_EnableFeature function which is not exist if the "__SUPPORT_CC256X_PATCH__" is defined.

    What I did in order to bypass this at this stage:

    1) Include the "CC256X.h"  instead of "CC256XB.h"

    2) Change "Patch" to "BasePatch"

    3) Add the following missing structures in "CC256X.h":

    static BTPSCONST unsigned char LowEnergyPatch[] (copied from __SUPPORT_LOW_ENERGY__ part of the previous base patch structure - in the same file)

    static BTPSCONST unsigned char AvprPatch[] (copied from "CC256XB.h" file - since we are not using it, it is OK)

    Now I can apply the patch, and it is changing the version to 6.85

    BLE is also working, but only at 230400 bps (with similar code when working with the CC2564B EVB board we were able to work at 1.8432 Mbps). When we configure the UART to higher bitrate we receive -14 error code on each BLE/BT operation (for example: advertiseLE 1)

    1) Do you have an updated "CC256X.h" file that contains the LowEnergyPatch[]  structure (or alternatively - bluetopia.a lib file that do not use the HCI_VS_EnableFeature function, but still supports low energy)

    2) What can cause the low UART bit rate

    Thanks,

    Erez

  • Erez,

    As mentioned in my previous post, there are two DEFINES and one change in the patch array to enable BLE.

    Miguel Sanchez said:
    Therefore, you should define "__SUPPORT_CC256X_PATCH__" in your project settings if using the STM32 Bluetopia release. Also, you should define "__SUPPORT_LOW_ENERGY__". These setting will include the ""CC256X.h" file and enable the BLE add-on SP correspondingly.

    BUT, there is one minor update you have to implement:

    1) Update array name from "Patch" to "BasePatch" in the CC256X.h file.


    Regarding the UART baud rate, at which points does it fail? Did you change and verify the host UART baud rate? What error do you get?

    Miguel
  • Hi Miguel,
    I did the 2 defines in the project and changing the Patch to BasePatch. It still fail to build. The errors we get:

    Error[Li005]: no definition for "HCI_VS_EnableFeature" [referenced from BSC.o(Bluetopia.a)]
    Error[Li005]: no definition for "HCI_VS_DisableFeature" [referenced from BSC.o(Bluetopia.a)]


    We changed the UART configuration in both MCU UART and CC2564 sides.
    Initiating the BLE/BT is succeed.
    After it is initiated, we fail on each command we send through the terminal (for example: AdvertiseLE 1)
    The error we received is -14

    Thanks,
    Erez
  • Erez said:
    I did the 2 defines in the project and changing the Patch to BasePatch. It still fail to build. The errors we get:

    Error[Li005]: no definition for "HCI_VS_EnableFeature" [referenced from BSC.o(Bluetopia.a)]
    Error[Li005]: no definition for "HCI_VS_DisableFeature" [referenced from BSC.o(Bluetopia.a)]

    Actually, you are correct. The Bluetopia lib with BLE support prevents it. The best way is to modify the CC256x.h file as you mentioned to align with the CC256xB.h format. Let me know if you need help with it.

    Erez said:

    We changed the UART configuration in both MCU UART and CC2564 sides.
    Initiating the BLE/BT is succeed.
    After it is initiated, we fail on each command we send through the terminal (for example: AdvertiseLE 1)
    The error we received is -14

    I believe I found the problem . It looks like the VS_Update_UART_Baud_Rate() in BTVS.c is using the wrong and deprecated command HCI_COMM_DRIVER_RECONFIGURE_DATA_COMMAND_CHANGE_PARAMETERS instead of using HCI_COMM_DRIVER_RECONFIGURE_DATA_COMMAND_CHANGE_COMM_PARAMETERS with the proper data. See below.

    /* The following function prototype represents the vendor specific */
    /* function which is used to change the Bluetooth UART for the Local */
    /* Bluetooth Device specified by the Bluetooth Protocol Stack that */
    /* is specified by the Bluetooth Protocol Stack ID. The second */
    /* parameter specifies the new baud rate to set. This change */
    /* encompasses both changing the speed of the Bluetooth chip (by */
    /* issuing the correct commands) and then, if successful, informing */
    /* the HCI Driver of the change (so the driver can communicate with */
    /* the Bluetooth device at the new baud rate). This function returns*/
    /* zero if successful or a negative return error code if there was */
    /* an error. */
    int BTPSAPI VS_Update_UART_Baud_Rate(unsigned int BluetoothStackID, DWord_t BaudRate)
    {
    int ret_val;
    Byte_t Length;
    Byte_t Status;
    Byte_t OGF;
    Word_t OCF;
    NonAlignedDWord_t _BaudRate;
    HCI_COMMReconfigureInformation_t COMMReconfigureInformation;

    union
    {
    Byte_t Buffer[16];
    HCI_Driver_Reconfigure_Data_t DriverReconfigureData;
    } Data;

    /* Before continuing, make sure the input parameters appear to be */
    /* semi-valid. */
    if((BluetoothStackID) && (BaudRate))
    {
    /* Write the Baud Rate. */
    ASSIGN_HOST_DWORD_TO_LITTLE_ENDIAN_UNALIGNED_DWORD(&_BaudRate, BaudRate);

    /* Next, write the command to the device. */
    Length = sizeof(Data.Buffer);
    OGF = VS_COMMAND_OGF(VS_UPDATE_UART_HCI_BAUDRATE_COMMAND_OPCODE);
    OCF = VS_COMMAND_OCF(VS_UPDATE_UART_HCI_BAUDRATE_COMMAND_OPCODE);

    ret_val = HCI_Send_Raw_Command(BluetoothStackID, OGF, OCF, sizeof(NonAlignedDWord_t), (Byte_t *)&_BaudRate, &Status, &Length, Data.Buffer, TRUE);
    if((!ret_val) && (!Status))
    {
    /* We were successful, now we need to change the baud rate of */
    /* the driver. */
    BTPS_MemInitialize(&(Data.DriverReconfigureData), 0, sizeof(HCI_Driver_Reconfigure_Data_t));

    Data.DriverReconfigureData.ReconfigureCommand = HCI_COMM_DRIVER_RECONFIGURE_DATA_COMMAND_CHANGE_COMM_PARAMETERS;
    Data.DriverReconfigureData.ReconfigureData = &COMMReconfigureInformation;
    COMMReconfigureInformation.ReconfigureFlags = HCI_COMM_RECONFIGURE_INFORMATION_RECONFIGURE_FLAGS_CHANGE_BAUDRATE;
    COMMReconfigureInformation.BaudRate = BaudRate;


    ret_val = HCI_Reconfigure_Driver(BluetoothStackID, FALSE, &(Data.DriverReconfigureData));
    }
    }
    else
    ret_val = BTPS_ERROR_INVALID_PARAMETER;

    /* Return the result the caller. */
    return(ret_val);
    }

    Miguel
  • The errors we get:
    Error[Li005]: no definition for "HCI_VS_EnableFeature" [referenced from BSC.o(Bluetopia.a)]
    Error[Li005]: no definition for "HCI_VS_DisableFeature" [referenced from BSC.o(Bluetopia.a)]

    Then i modify the CC256x.h file as you mentioned to align with the CC256xB.h format.

    Then new errors occur:
    Error[Pe065]: expected a ";"
    Error[Pe020]: identifier "SpecifiedBaudRate" is undefined
    Error[Pe020]: identifier "SpecifiedBaudRate" is undefined
    Error[Pe020]: identifier "SpecifiedBaudRate" is undefined

    Actually the code is right.
    Maybe i mistakely modify the CC256x.h. Can you tell me how to modiy it detaily? Thank you!
  • Hi,

    Please refer to this specific post: e2e.ti.com/.../1666187

    ~Miguel