Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

CC2564MODN: Sample code on a STM32F401RE

Part Number: CC2564MODN
Other Parts Discussed in Thread: CC2564C, CC2564, , TLV320AIC3101

I'm trying to set-up the SPPDemo for the CC2564MODN for a STM32F401RE. I followed the guide "CC2564C TI Dual-Mode Bluetooth® Stack on STM32F4 MCUs". I also uncommented the #define STM32F401xx in the file "stm32f4xx.h". I also changed the following in HALCFG.h:

#define CONSOLE_UART 2 //was 3

#define CONSOLE_TXD_PORT A //was C
#define CONSOLE_TXD_PIN 2 //was 10

#define CONSOLE_RXD_PORT A //was C
#define CONSOLE_RXD_PIN 3 //was 11

#define HAL_LED_PORT A //was G
#define HAL_LED_PIN 5 //was 6

Everything compiles, links and debugs. Also the led is toggled once on my NUCLEO-F401RE board. However I can see that the function "BSC_Initialize" in the function "OpenStack" in the file "SPPDemo" is causing the firmware to jump to the default handler for an unexpected interrupt. I also already figured out that this underneath is calling the function "GPIO_Init" multiple times. In the end it's calling the "GPIO_Init" for GPIOx on address 0x40021800. And this address turns out to be reserved space according to the datasheet. Did I miss something in setting something up in an other file? Could you help me out with this?

Also I noticed that the following links in the file did not work anymore:

"swru498b.pdf", page 18, "SPP demonstration application wiki" directing to "">processors.wiki.ti.com/.../CC256x_TI_Bluetooth_Stack_SPPDemo_App"

"swru498b.pdf", page 19, "SPP + SPPLE demonstration wiki" directing to "processors.wiki.ti.com/.../CC256x_TI_Bluetooth_Stack_SPPLEDemo_App"

Looking forward to hear from you.

  • Hi Martin,

    What is the exact roadblock you are encountering? Meanwhile here are the Demos from the dead links.

    3162.CC256x TI Bluetooth Stack SPPDemo App - Texas Instruments Wiki.pdfCC256x TI Bluetooth Stack SPPLEDemo App - Texas Instruments Wiki.pdf

    I also recommend going through the porting documentation in the stm32 Bluetopia SDK

    C:\ti\Connectivity\CC256X BT\CC256x STM32 Bluetopia SDK\v5.1.1.1\FreeRTOS\Documentation\Porting Documentation

    Kind Regards,

    Rogelio

  • Hi Rogelio,

    Thank you for these pointers. Indeed I had to set some other pin's and port's in HCITRCFG.h. However not sure where to set the dma values as "HCITR_DMA_RXD_NUMBER"  and "HCITR_DMA_RXD_STREAM" to?

    In reality I actually ported this project to a stm32cubeide project, because we don't have any IAR or Keil ide. So I installed the free keil version(with limited compile/link size) and carefully copied project and projectpaths to the stm32cubeide. The only thing I couldn't resolve was the "assert_param". So I added "#define assert_param(_x) (_x)" at the top of the file stm32f4xx.h. If you know how to solve this correctly, I would like to know.

    Now the project is compiling, linking and debuggin fine. It is running on a stm32f401re controller. I also receive some data from the console uart now. However up to now the data looks like rubish. So I think maybe I have to set a clockfrequency somewhere, because in this example project I don't see a systemclock_config or something simillar. Where could I find the clock config for this project? Does the project expect some clockfrequency?

    Looking forward to hear from you.

  • Hi Martin,

    Unfortunately we dont support ports to different IDEs so I wont be much help in that regard.

    In regards to the uart data I would check the baud rate, the default for the cc2564 is 115200.

    I am including the port pdf as well as a pdf of the changes needed to be done to run demos on the STM32 Discovery board.

    STM32F4xx Porting.pdf

    Enable_STM32_Discovery.pdf

    Best Regards,

    Rogelio

  • Hi Rogelio,

    In the meantime I have managed to port the spp demo. It's working how it should be and I can transmit and receive data to/from another device. I chose this demo because I thought it would be the most simple one. However actually we would like to add bluetooth audio connectivity to our devices. So could you supply me the demo application wiki for the HFP and HFP-AG applications?

    Could you supply me also the protocol description for the CC2564MODN?(so the raw commands and the description of them)

    Furthermore what is the longevity of the CC2564MODN? Is it still usefull to base our design on this? I thought I asked this earlier at another place to ti, but I don't know anymore.

    Is it true, that we could update the bluetooth stack to a newer version. So that we can support like bluetooth 5.0 or something?

    I now linked to a static library of bluetopia that was compiled by you for the stm's. Do you have the compiler settings to build bluetopia library of my own?

    Looking forward to hear from you.

    Best regards,

    Robin

  • Hi Robin,

    Im glad you were able to build to get the sppdemo up and running on your platform, I know porting isnt the easiest thing. 

    Here are the demos for HFP and HFPAG

    1185.CC256x TI Bluetooth Stack HFPDemo App - Texas Instruments Wiki.pdf

    3582.CC256x TI’s Bluetooth Stack Basic HFGAGDemo APP - Texas Instruments Wiki.pdf

    So the CC2564MODN is bt 4.1 and will soon be deprecated by the BT SIG so I would actually recommend using a CC2564C which is 5.1 compliant, as well as the Bluetopia BT Stack.

    Unfortunately we cannot share the source code for the Bluetopia stack and only offer the pre compiled libraries in the sdks for arm processor architecture. Were you planning on using a different arch?

    Best Regards,

    Rogelio

  • Hi Rogelio,

    Till now we were using a module with bluetooth 2.1. This was working fine, because we're making dedicated systems. So the headsets to which this module is connected, are only used for our systems. The most important part to us is how long you will keep producing this CC2564MODN? If this is only a couple of years maybe I have to put my effort in another module. For the CC2564C the same applies, is there anything clear about how long you will produce this bluetooth-controller? Actually we're looking for a module or soc that already is certified with the ability to connect an external antenna.

    Could you help us out with what would be the best thing to do here?

    Best regards,

    Robin

  • Hi Martin,

    Our stance on product longevity can be found here https://www.ti.com/support-quality/quality-policies-procedures/product-life-cycle.html 

    Kind Regards,

    Rogelio

  • Hi Rogelio,

    Thank you for the fast response. However are you planning to make a certified module like the CC2564MODN for the CC2564C?

    Looking forward to hear from you.

    Best regards,

    Robin

  • Hi Rogelio,

    Furthermore I would like to know if this is a TI standard product?

    If so, that means that if there's no current customer demand it will becomming obsolete in 2024, is that right?

    Best regards,

    Robin

  • Hi Robin,

    The CC2564MODN is a standard product so as long as there is customer demand they will continue to be made according to our policy. We are not currently planning on making a MOD for the CC2564C, however, there are third party companies that have mods that use the CC2564C. I can recommend Panasonic or BDE Modules.

    Panasonic- https://na.industrial.panasonic.com/products/wireless-connectivity/bluetooth/lineup/bluetooth-multi-mode

    BDE- http://www.bdecomm.com/en/Product.asp?typeid=88

    Kind Regards,

    Rogelio

  • Hi Rogelio,

    Thank you for this recommendation. I think we will order the BDE-BD2564CN and go from there. How compatible is the cc2564c with the cc2564? Can I use the same firmware demo's and bluetopia lib for the cc2564? In other words can I reuse my ported work? Or do I need a newer library for the bluetooth 5.1 improvements in the cc2564c?

    Looking forward to hear from you.

    Best regards,

    Robin

  • Hi Robin,

    Could you supply me also the protocol description for the CC2564MODN?(so the raw commands and the description of them)

    I saw I missed answering this question. I assume your mean the HCI commands by raw commands) Here is the list of our Vendor specific HCI commands.

    https://www.ti.com/lit/an/swra751/swra751.pdf

    The device also obviously handles the BT SIG mandatory HCI commands.

    Im glad you were able to find a module that works. In order to use the new 5.1 improvements for the cc2564C you will need to use the latest service pack.

    https://www.ti.com/tool/CC256XC-BT-SP

    You will also need the latest Bluetopia SDK which you can download the STM version here.

    https://www.ti.com/tool/CC2564CSTBTBLESW

    Which I guess will change bluetopia libraries you are currently using if you are using  2.1 stack

    Kind Regards,

    Rogelio

  • Hi RogelioD,

    At the moment I'm using the CC2564MODNEM rev1.0.

    Device chipset: 4.1

    BTPS version: 5.1.1.1

    fw_version: 7.26

    I'm using this with the 5.1.1.1 sdk, I didn't find the older sdk on this page: https://www.ti.com/tool/CC2564CSTBTBLESW. I don't know if I can use this newer sdk on the older chipset without qonsequences?

    We already ordered the BDE-BD2564CN with the newer CC2564C chipset. It will arrive soon. In the meantime I try to get everything working with the headset. However there are a couple of challenges.

    When I pair and try to open an audio connection with the headset, like explained in your document: "CC256x TI’s Bluetooth Stack Basic HFGAGDemo APP", it always works till the "OpenAudioGatewayClient" command. When this command works the output is this:

    HFP AG>openaudiogatewayclient 2 3
                                                 
    Bluetooth Device Address: 0x886B0FC8C0CC
                                          
    Open Remote HandsFree Port = 0003
                                                 
    HFRE_Open_Remote_HandsFree_Port: Function Successful ID = 0002.
                   
    OpenRemoteHandsFreePort: HFRE_Update_Current_Control_Indicator_Status Function S
    tatus 0.
                                                                  
    HFP AG>
                                                                           
    HFP AG>
                                                                           
    atLinkKeyRequest: 0x886B0FC8C0CC
                                                  
    GAP_Authentication_Response() Success.
                                    
    HFP AG>
                                                                           
    HFRE Open Port Confirmation, ID: 0x0002, Status: 0x0000.
                   
    HFP AG>
                                                                           
    HFRE Open Service Level Connection Indication, ID: 0x0002
                         
                         RemoteSupportedFeaturesValid: TRUE
                           
                              RemoteSupportedFeatures: 0x0000009E
                     
                      RemoteCallHoldMultipartySupport: 0x00000000
                     
    HFRE_Enable Call Line Identification
                                       
    HFP AG>HFRE Network Operator Selection Format Indication, ID: 0x0002 Format: 3.

    HFP AG>HFRE Network Operator Selection Indication, ID: 0x0002.
               
    HFP AG>
                                                                           
    HFRE Audio Connection Indication, ID: 0x0002, Status: 0x0000.
                 
    HFP AG>HFRE Call Line Identification Notification Activation Indication, ID: 0x0
    002, Enabled: TRUE.
                                                               
     HFP AG>HFRE Speaker Gain Indication, ID: 0x0002, Speaker Gain 0x000A.

    When it not works the output is this:

    openaudiogatewayclient 3 3
                                                 
    Bluetooth Device Address: 0x886B0FC8C0CC
                                          
    Open Remote HandsFree Port = 0003
                                                 
    HFRE_Open_Remote_HandsFree_Port: Function Successful ID = 0001.
                   
    OpenRemoteHandsFreePort: HFRE_Update_Current_Control_Indicator_Status Function S
    tatus 0.
                                                                              
    HFP AG>
                                                                           
    HFP AG>
                                                                           
    atPINCodeRequest: 0x886B0FC8C0CC
                                                                          
    Respond with the command: PINCodeResponse
                                                                           
    HFP AG>pincoderesponse 0000
                                                       
    PINCodeResponse.
                                                                  
    GAP_Authentication_Response(), Pin Code Response Success.
                                                                                
    HFP AG>
                                                                           
    atLinkKeyCreation: 0x886B0FC8C0CC
                                                 
    Link Key: 0x8FED9B58A34A43B9CEDA797BBC2A3C45
                                      
    Link Key Stored locally.
                                                                               
    HFP AG>
                                                                           
    HFP AG>
                                                                           
    HFRE Open Port Confirmation, ID: 0x0001, Status: 0x0000.
                                                                             
    HFP AG>
                                                                           
    HFRE Open Service Level Connection Indication, ID: 0x0001
                         
                         RemoteSupportedFeaturesValid: TRUE
                           
                              RemoteSupportedFeatures: 0x0000009E
                     
                      RemoteCallHoldMultipartySupport: 0x00000000
                     
    HFRE_Enable Call Line Identification
                                                                                
    HFP AG>HFRE Network Operator Selection Format Indication, ID: 0x0001 Format: 3.
                                                                               
    HFP AG>HFRE Network Operator Selection Indication, ID: 0x0001.
                                                                             
    HFP AG>
                                                                           
    HFRE Close Port Indication, ID: 0x0001, Status: 0x0000.
                                                                       
    HFP AG>openaudiogatewayclient 3 3
                                                 
    Bluetooth Device Address: 0x886B0FC8C0CC
                                          
    Open Remote HandsFree Port = 0003
                                                 
    HFRE_Open_Remote_HandsFree_Port: Function Successful ID = 0002.
                   
    OpenRemoteHandsFreePort: HFRE_Update_Current_Control_Indicator_Status Function S
    tatus 0.

                                                                   
    HFP AG>
                                                                           
    HFP AG>
                                                                           
    HFRE Open Port Confirmation, ID: 0x0002, Status: 0x0001.

    When it not works, I also don't get it to work. I tried the manageaudio command, but that fails. Why the result is often so different? Also I'm wondering how to get a connection with a device where I previously paired with? When this headset is not in pairing mode, it's not showing up in the inquiry list. However it should be possible to connect with it when it was once paired. Do you know how to do this?

    When the "openaudiogatewayclient" command works, the audio is opened. I added a call to the function "vs_pcm_codec_config_slave_i2s" and changed some parameters in the function to get the right settings for the audio bus. I coupled a tlv320aic3101 on the same bus. Now I have some audio from the headset but it's very crackling sound. So I think there's something wrong with the audio bus settings. Is this the right way to set up the pcm-bus on the bluetooth module side?

    Furthermore this headset is provided with a ptt-button. The previously used bluetooth module was receiving commands when buttons where pushed on the headset. Do you know what I have to do to receive these commands?

    Last one, I don't quite understand the meaning of the "service pack" you mentioned earlier. Could  you explain if I need it and if I need it with the newer module that will arrive soon?

    Looking forward to hear from you.

    Best regards,

    Robin

  • Hi Robin,

    First thing, happy new year.

    Second thing do you mind creating a new thread with the new HFP specific questions, this is just to make e2e a bit cleaner and easier for others that are maybe searching for answers to the same question.

    I will answer the non HFP related questions here. The service pack are the firmware patches, since you are using the Bluetopia distribution you dont have to worry about it as the patches are loaded into the mcu using a binary array located in the btpsvend folder. However if you do decide to use another stack (non bluetopia) you would need to load the patch in yourself using the service pack.

    Kind Regards,

    Rogelio

  • Hi Rogelio,

    Thank you. I wish you a happy new year too.

    Thank you for the explanation about the service pack, this makes things a bit more clearer.

    I will make a new thread for the other questions.

    Best regards,

    Robin