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.

Interfacing with Tiva C Series Development kit

Hi,

I work in the Texas Instrument's DLP organization and I am trying to interface CC256xQFN-EM with Tiva TM4C129x development kit which is Tiva C series based development board.

I have downloaded the Bluetooth SDK for Tiva and trying to set up my Code composer Studio set up to download one of the sample applications and get this Bluetooth EVM to work with Tiva board.

However, I am not sure of the hardware connections between these two boards. Also is there a TI Wiki page that you could point me to that talks about the details on interfacing these two boards and running an example application.

Basically how do I get started with interfacing these two boards and ensuring that the Bluetooth communication is working?

Any help is really appreciated.

Thanks a lot

Regards

Manasi

  • Hi Manasi,

    Unfortunately, we don't have a WiKi Page yet that explains the interfacing between CC256x & TMC4C129x.

    You can check the tm4c129x user guide that has the schematics and pin description. And you can also check the "CC256x M4 Bluetopia SDK\v1.1\Cortex_M4\Hardware\dk-tm4c129x\HALCFG.h" file to understand how the pins are mapped to the Rx/Tx/RTS/CTS/RESET pins of the CC256x.  

    Regarding the demo guide to the sample apps, you can check: http://processors.wiki.ti.com/index.php/CC256x_Demos_and_Sample_Applications 

    which explains the demo on different EVMs (again, doesn't specifically talk about Tiva C series, but demo guides are usually compatible.

    Regards,
    Gigi Joseph.

  • Hello Joseph,

    Thanks for your response.

    I found some instructions in the ReadMe file from Bluetopia. It states that I need following jumper connections on Tiva TM4C129x  board to run the Bluetopia sample apps:

    J12 1-2

    J13 1-2 and J23 removed.  I followed this and then instructions on http://processors.wiki.ti.com/index.php/Stellaris_Bluetopia_Basic_Demo_APPS

    to build and download the SPP demo app on the Tiva board. I am using CCS IDE to run the app, after I click "Debug As" and Run, it gets stuck in a loop and does not return back to Main to toggle the LED.

    I am not sure if my jumper connections are wrong (setting J12 to 1-2 and J13 to 1-2 ) 

    Any help or guidance would be appreciated.

    Regards

    Manasi

  • Manasi, 

    Sorry for the late response but are you still having issues running the demo? I have the jumper configurations of our board and specifically the J12,J13 and J23 Jumpers attached here. Can you check if its the same as yours?

    Thanks,

    Stonestreet One.

  • Hello,

    Thanks for your response.

    I am actually still having issues getting the SPP demo to run on TIVA TM4C129x development board.

    I have followed instruction on the ReadMe for the demo and from the demo Wiki Page:

    With the following Jumper settings :

    J12 and J13  with Jumper between the middle pin and EM_UART as shown in the above picture, J23 jumper removed, as asked by the ReadMe, after I let the code download on to the board using Code composer Studio and run it, I see some messages going on the serial terminal (TeraTerm), it says "Stack Init Failed".

    I am still not sure if I am missing anything here? Also the Readme says Remove Jumper J23, but looks like in the picture you sent there is a jumper inserted on J23.

    What is the correct way? Could you send me the snapshot of the TeraTerm screen after the demo is working?

    Any help is really appreciated.

    Regards

    Manasi

  • Manasi,

    I have the working TeraTerm screen attached. You shouldn't need the J23 jumper(It's actually not connected in the picture)).

  • Hello,

    Thanks for your response.

    I finally got the stack initialization messages on TeraTerm and it shows me the prompt on TeraTerm where I can chose the mode to be server or client.

    I am trying to connect this device to an Iphone, so I have a the nblueterm App running on my iphone (equivalent to Blueterm on Android)

    These are the commands I entered on the teraterm window:

    server

    ******************************************************************
    * Command Options: Inquiry, DisplayInquiryList, Pair, *
    * EndPairing, PINCodeResponse, PassKeyResponse, *
    * UserConfirmationResponse, *
    * SetDiscoverabilityMode, SetConnectabilityMode,*
    * SetPairabilityMode, *
    * ChangeSimplePairingParameters, *
    * GetLocalAddress, GetLocalName, SetLocalName, *
    * GetClassOfDevice, SetClassOfDevice, *
    * GetRemoteName, SniffMode, ExitSniffMode, *
    * Open, Close, Read, Write, *
    * GetConfigParams, SetConfigParams, *
    * GetQueueParams, SetQueueParams, *
    * Loopback, DisplayRawModeData, *
    * AutomaticReadMode, SetBaudRate, Send *
    * Help, Quit *
    ******************************************************************

    Server>open 1
    Server Opened: 1.

    Server>SetDiscoverabilityMode

    Usage: SetDiscoverabilityMode [Mode(0 = Non Discoverable, 1 = Limited Discoverable, 2 = General Discoverable)].
    Function Error.

    Server>SetDiscoverabilityMode 2
    Discoverability: General.

    Server>

    However, when I start the App on the iphone, it doesn't detect any Bluetooth SPP device.

    Could you help me with this? Are there any configuration commands that I am missing for the bluetooth device to be detected on the phone?

    Regards

    Manasi

  • Manasi,

    For communicating with an iPhone over SPP, Apple requires that the device be MFi Certified. https://mfi.apple.com/MFiWeb/getFAQ.action

    This would require additional software/hardware for communicating with the device. Since we cannot publically release this please contact sales@stonestreetone.com if you need an implementation.

    Thanks,

    Stonestreet One.

  • Hello Stonestreet One,

    Thanks for your response.

    I read through the MFi FAQ section. We actually want to only communicate using the BLE SPPLE profile with ios or Android devices.

    Are there any instructions on getting the SPPLE up and running on TIVA? Also, if I run SPPLE client on the TIVA board, how can I test the communication with Iphone?

    Any help is appreciated.

    Regards

    Manasi

  • Manasi

    The SPPLE demo guide page is the best place to get started with SPPLE http://processors.wiki.ti.com/index.php/CC256x_MSP430_Bluetopia_Basic_SPPLEDemo_APP 

    You can connect test communication with the iPhone with a sample app. Download SPPLE chat from the app store and make a few changes with to the SPPLE demo code. 

    In the ConfigureSPPLE function change the if(SPPLE_CLIENT_INFORMATION_VALID(DeviceInfo->ClientInfo)) to if(TRUE)

    and comment out the EnableDisableNotificationsIndications call after /* Enable Notifications on the proper characteristics.   */

    // EnableDisableNotificationsIndications(LEContextInfo[LEConnectionIndex].ConnectionID, DeviceInfo->ClientInfo.Rx_Credit_Client_Configuration_Descriptor, GATT_CLIENT_CONFIGURATION_CHARACTERISTIC_NOTIFY_ENABLE, GATT_ClientEventCallback_SPPLE);

    Also, add the following lines in SendDataCommand

    "LEContextInfo[LEConnectionIndex].SPPLEBufferInfo.TransmitCredits = 10000; 

    DeviceInfo->ServerInfo.Tx_Client_Configuration_Descriptor = GATT_CLIENT_CONFIGURATION_CHARACTERISTIC_NOTIFY_ENABLE;

    after the LEContextInfo[LEConnectionIndex].SPPLEBufferInfo.SendInfo.BytesSent line

    These changes only need to be made to test the SPPLEchat app with the SPPLE application.

    Thanks,

    Stonestreet One.

  • Hello Stonestreet,

    Thanks for the steps to get the communication with an Iphone up and running. I made those changes and flashed the code, i see that it initializes the stack properly and I see bunch of messages on Teraterm with SPP+LE> command prompt

    This is what I do after I see the prompt:

    SPP+LE>RegisterSPPLE
    Sucessfully registered SPPLE Service.

    SPP+LE>AdvertiseLE 1
    GAP_LE_Advertising_Enable success.

    SPP+LE>LESend
    Usage: LESEND [BD_ADDR] [Number of Bytes to send]
    .

    SPP+LE>LERead
    Usage: LEREAD [BD_ADDR].

    I also have the SPPLE Chat App running on my Iphone. However when I select the Central Mode and turn the scanning ON it does not detect the BLE device yet.

    Could you give me some more details on any additional settings I need to do on the SPPLE Demo side or the App side to get this communication going and to be able to do some data transfer?

    Regards

    Manasi

  • Hi Manasi,

    That particular app has some issues running in Central Mode. If you want to test SPPLE communication, put it in peripheral mode and start advertising. From the MSP430 start and stop scanning to find the Bluetooth Address and do a connect to it. After a DiscoverSPPLE and configureSPPLE commands you should be able to read and write data to it.

    Thanks,

    Stonestreet One. 

  • Thanks for your response.

    I am using CC256x with TIVA board.

    Would the similar code changes apply? Also now when I use the app in peripheral mode, would TIVA board be in client mode or server mode?

    Manasi 

  • Manasi,

    It doesn't matter whether the device is in Server or Client Mode, either is fine. The same code changes apply. 

    Thanks,

    Stonestreet One.

  • I have turned the Advertising ON from the app on my phone and this is what I have on TIVA board:

    SPP+LE>open
    Server Opened: Server Port 9, Serial Port ID 1.
    Server Port Context Stored.

    SPP+LE>StartSacnning
    Invalid Command: STARTSACNNING.

    SPP+LE>StartScanning
    Scan started successfully.

    SPP+LE>StopScanning
    Scan stopped successfully.

    SPP+LE>

    But it doesnt show a list of scanned devices so can't connect to a specific Bluetooth Addr

    Regards

    Manasi

  • Manasi,

    I tried it out from my side with the same code changes as above and did not have problems connecting. My log is below. Could you double check from your side(starting from scratch on both side) and see if you still see the problem?

    startscanning
    Scan started successfully.

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0x7d454f5b6fe0.
    RSSI: -47.
    Data Length: 21.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x1a
    AD Type: 0x07.
    AD Length: 0x10.
    AD Data: 0x39 0x23 0xcf 0x40 0x73 0x16 0x42 0x9a 0x5c 0x41 0x7e 0x7d 0xc4 0x9a 0x83 0x14

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atRandom.
    Address: 0x7d454f5b6fe0.
    RSSI: -47.
    Data Length: 12.
    AD Type: 0x09.
    AD Length: 0x0a.
    AD Data: 0x53 0x73 0x31 0x69 0x50 0x68 0x6f 0x6e 0x65 0x35

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atPublic.
    Address: 0xd093f8ff434e.
    RSSI: -87.
    Data Length: 18.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x06
    AD Type: 0x0a.
    AD Length: 0x01.
    AD Data: 0x00
    AD Type: 0x03.
    AD Length: 0x02.
    AD Data: 0x03 0x18
    AD Type: 0x03.
    AD Length: 0x02.
    AD Data: 0x02 0x18
    AD Type: 0x03.
    AD Length: 0x02.
    AD Data: 0x04 0x18

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atPublic.
    Address: 0xd093f8ff434e.
    RSSI: -87.
    Data Length: 18.
    AD Type: 0x09.
    AD Length: 0x10.
    AD Data: 0x53 0x53 0x31 0x2d 0x50 0x58 0x50 0x20 0x52 0x65 0x70 0x6f 0x72 0x74 0x65 0x72

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0xfee29e1c02b1.
    RSSI: -105.
    Data Length: 3.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x06

    SPP+LE>stopscan
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0xfee29e1c02b1.
    RSSI: -93.
    Data Length: 3.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x06

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atRandom.
    Address: 0xfee29e1c02b1.
    RSSI: -94.
    Data Length: 26.
    AD Type: 0x08.
    AD Length: 0x03.
    AD Data: 0x73 0x39 0x38
    AD Type: 0x06.
    AD Length: 0x10.
    AD Data: 0xa6 0xda 0x37 0xde 0xc1 0x9a 0xfc 0x80 0x94 0x4a 0xd8 0xa8 0x02 0x62 0xc2 0xbe
    AD Type: 0x0a.
    AD Length: 0x01.
    AD Data: 0x00

    SPP+LE>ni
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0xdb9f915125aa.
    RSSI: -98.
    Data Length: 3.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x06

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atRandom.
    Address: 0xdb9f915125aa.
    RSSI: -98.
    Data Length: 26.
    AD Type: 0x08.
    AD Length: 0x03.
    AD Data: 0x73 0x41 0x37
    AD Type: 0x06.
    AD Length: 0x10.
    AD Data: 0xa6 0xda 0x37 0xde 0xc1 0x9a 0xfc 0x80 0x94 0x4a 0xd8 0xa8 0x02 0x62 0xc2 0xbe
    AD Type: 0x0a.
    AD Length: 0x01.
    AD Data: 0x00

    SPP+LE>ng
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0xfb35fa5d6a6c.
    RSSI: -81.
    Data Length: 27.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x06
    AD Type: 0x06.
    AD Length: 0x10.
    AD Data: 0xba 0x56 0x89 0xa6 0xfa 0xbf 0xa2 0xbd 0x01 0x46 0x7d 0x6e 0x6b 0x04 0xab 0xad
    AD Type: 0x16.
    AD Length: 0x04.
    AD Data: 0x0a 0x18 0x07 0x04

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atRandom.
    Address: 0xfb35fa5d6a6c.
    RSSI: -81.
    Data Length: 9.
    AD Type: 0x09.
    AD Length: 0x04.
    AD Data: 0x46 0x6c 0x65 0x78
    AD Type: 0x0a.
    AD Length: 0x01.
    AD Data: 0xfa

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtConnectableUndirected.
    Address Type: atRandom.
    Address: 0x7d454f5b6fe0.
    RSSI: -50.
    Data Length: 21.
    AD Type: 0x01.
    AD Length: 0x01.
    AD Data: 0x1a
    AD Type: 0x07.
    AD Length: 0x10.
    AD Data: 0x39 0x23 0xcf 0x40 0x73 0x16 0x42 0x9a 0x5c 0x41 0x7e 0x7d 0xc4 0x9a 0x83 0x14

    SPP+LE>
    etLE_Advertising_Report with size 36.
    1 Responses.
    Advertising Type: rtScanResponse.
    Address Type: atRandom.
    Address: 0x7d454f5b6fe0.
    RSSI: -50.
    Data Length: 12.
    AD Type: 0x09.
    AD Length: 0x0a.
    AD Data: 0x53 0x73 0x31 0x69 0x50 0x68 0x6f 0x6e 0x65 0x35

    SPP+LE>
    Scan stopped successfully.

    SPP+LE>connectle 7d454f5b6fe0 1
    Connection Request successful.

    SPP+LE>
    etLE_Connection_Complete with size 16.
    Status: 0x00.
    Role: Master.
    Address Type: Random.
    BD_ADDR: 0x7d454f5b6fe0.

    SPP+LE>
    etGATT_Connection_Device_Connection with size 16:
    Connection ID: 1.
    Connection Type: LE.
    Remote Device: 0x7d454f5b6fe0.
    Connection MTU: 23.

    SPP+LE>
    SPP+LE>discoverspple 7d454f5b6fe0
    GATT_Start_Service_Discovery success.

    SPP+LE>configurespple
    Service 0x000a - 0x0010, UUID: 14839ac47d7e415c9a42167340cf2339.


    SPP+LE>
    Service Discovery Operation Complete, Status 0x00.

    SPP+LE>7d454f5b6fe0
    SPPLE Service found on remote device, attempting to read Transmit Credits, and configured CCCDs.

    SPP+LE>
    Write Response.
    Connection ID: 1.
    Transaction ID: 11.
    Connection Type: LE.
    BD_ADDR: 0x7d454f5b6fe0.
    Bytes Written: 2.

    SPP+LE>lesend 7d454f5b6fe0 100

    Send Complete, Sent 100.

    SPP+LE>
    SPP+LE>automaticreadmode 1
    Current Automatic Read Mode set to: ACTIVE.

    SPP+LE>displayrawdatamode 1
    Invalid Command: DISPLAYRAWDATAMODE.

    SPP+LE>displayrawmodedata 1
    Current Raw Data Display Mode set to: ACTIVE.

    SPP+LE>: testEOM

  • Hi,

    Thanks for sending me the log.

    I tried flashing the code again and it still doesn't work.

    So this is some information on my test environment:

    I am using TIVA TM4C129x board with CC256x

    Jumper is removed on J23

    Jumper between PJ1 and EM_UART for J12 and J13

    I am running SPPLE Chat App on Iphone 5 with ios6

    Is your log based on similar environment? Also do i have to run any other commands before startscanning?

    Manasi

  • Hi,

    The hardware is setup fine. We are using an iPhone 5 running iPhone 6.1.2 Can you tell me what PAN module you are using? You do not need to run any commands before startscanning.

    Thanks,

    Stonestreet One.

  • I am using CC2456xQFN-EM Rev 1.2B

    Manasi

  • Manasi,

    Is the patch for 2564B defined in BTPSVend.c? If not, You will need to add #define _SUPPORT_CC256XB_PATCH__

    before the #ifndef __SUPPORT_CC256XB_PATCH__ in BTPSVEND

    Thanks,

    Stonestreet One.

  • I added the #define but it still doesnt work.

    Would it be possible for you to share your project so that I can import it and run it as is just as a test?

    Manasi

  • Hi,

    Can you post your email, We can email you the project.

    Thanks,

    Stonestreet One.

  • Hi Stonestreet,

    Could you email it to me at mnavare@ti.com?

    Regards

    Manasi