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.

SPPBLE code guidance

Other Parts Discussed in Thread: MSP430G2553, CC2650

Hi,

I am trying to send data from MSP430G2553 to CC2650 sensorTag through UART and then seeing the received data on BLE Scanner app i am not able to see any data on the app .I am using SPPBLE program and done all the things exactly given in the reference guide of SPPBLE bridge .But still not able to figure out the issue and i am using DEVPACK DEBUGGER to debug it .Can  anyone help me out ??

  • Hi Anshul,

    Have you tried connecting the sensortag to a PC first to see if you see debug UART output?
  • These are the warnings while building this project in IAR. Is it ok or this is the problem which is preventing the UART GATT notifications to work.


    Warning[Pe177]: function "SPPBLEServer_performPeriodicTask" was declared but never referenced


    Warning[Pe177]: function "getLocalGATThandle" was declared but never referenced


  • No, those are just warnings you can ignore. Can you make sure the correct board file is being used:

    /*
     * Copyright (c) 2015, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /*
     *  ====================== Board.c =============================================
     *  This file is responsible for setting up the board specific items for the
     *  CC2650 SensorTag. 
     *
     *  NB! This board file is for PCB version 1.2
     */
    
    
    /*
     *  ====================== Includes ============================================
     */
    #include <inc/hw_memmap.h>
    #include <inc/hw_ints.h>
    #include <driverlib/ioc.h>
    #include <driverlib/udma.h>
    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/family/arm/m3/Hwi.h>
    #include <ti/sysbios/family/arm/cc26xx/Power.h>
    #include <ti/sysbios/family/arm/cc26xx/PowerCC2650.h>
    #include <ti/drivers/PIN.h>
    #include "Board.h"
    
    /*
     *  ========================= IO driver initialization =========================
     *  From main, PIN_init(BoardGpioInitTable) should be called to setup safe
     *  settings for this board.
     *  When a pin is allocated and then de-allocated, it will revert to the state
     *  configured in this table.
    */
    
    /*
     *  ========================= IO driver initialization =========================
     *  From main, PIN_init(BoardGpioInitTable) should be called to setup safe
     *  settings for this board.
     *  When a pin is allocated and then de-allocated, it will revert to the state
     *  configured in this table
    */
    PIN_Config BoardGpioInitTable[] = {
        Board_LED1       | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,     /* LED initially off             */
        Board_LED2       | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,     /* LED initially off             */
        Board_KEY_LEFT   | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,        /* Button is active low          */
        Board_KEY_RIGHT  | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,        /* Button is active low          */
        Board_RELAY      | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,      /* Relay is active high          */
        Board_MPU_INT    | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_NEGEDGE | PIN_HYSTERESIS,        /* MPU_INT is active low         */
        Board_TMP_RDY    | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS,                            /* TMP_RDY is active high        */
        Board_BUZZER     | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,     /* Buzzer initially off          */
        Board_MPU_POWER  | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,    /* MPU initially on              */
        Board_MIC_POWER  | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MIN,     /* MIC initially off             */
        Board_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,  /* External flash chip select    */
        Board_SPI_DEVPK_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,  /* DevPack chip select           */
        Board_AUDIO_DI | PIN_INPUT_EN | PIN_PULLDOWN,                                             /* Audio DI                      */
        Board_AUDIODO | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,       /* Audio data out                */
        Board_AUDIO_CLK | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* DevPack */
        Board_DP2 | PIN_INPUT_EN | PIN_PULLDOWN,                                                  /* DevPack */
        Board_DP1 | PIN_INPUT_EN | PIN_PULLDOWN,                                                  /* DevPack */
        Board_DP0 | PIN_INPUT_EN | PIN_PULLDOWN,                                                  /* DevPack */
        Board_DP3 | PIN_INPUT_EN | PIN_PULLDOWN,                                                  /* DevPack */
        Board_DP4_UARTTX | PIN_INPUT_EN | PIN_PULLDOWN,                                           /* DevPack */
        Board_DP5_UARTRX | PIN_INPUT_EN | PIN_PULLDOWN,                                           /* Devpack */
        Board_DEVPK_ID | PIN_INPUT_EN | PIN_NOPULL,                                               /* Device pack ID - external PU  */
    
        PIN_TERMINATE
    };
    /*============================================================================*/
    
    /*
     *  ============================= UART begin ===================================
    */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(UART_config, ".const:UART_config")
    #pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/UART.h>
    #include <ti/drivers/uart/UARTCC26XX.h>
    
    /* UART objects */
    UARTCC26XX_Object uartCC26XXObjects[CC2650_UARTCOUNT];
    
    /* UART hardware parameter structure, also used to assign UART pins */
    const UARTCC26XX_HWAttrs uartCC26XXHWAttrs[CC2650_UARTCOUNT] = {
        {    /* CC2650_UART0 */
            .baseAddr = UART0_BASE,
            .intNum = INT_UART0,
            .powerMngrId = PERIPH_UART0,
    		.txPin = Board_UART_TX,
            .rxPin = Board_UART_RX,
            .ctsPin = PIN_UNASSIGNED,
            .rtsPin = PIN_UNASSIGNED
        },
    };
    
    /* UART configuration structure */
    const UART_Config UART_config[] = {
        { &UARTCC26XX_fxnTable, &uartCC26XXObjects[0], &uartCC26XXHWAttrs[0] },
        { NULL, NULL, NULL }
    };
    /*
     *  ============================= UART end =====================================
    */
    
    /*
     *  ============================= UDMA begin ===================================
    */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
    #pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/dma/UDMACC26XX.h>
    
    /* UDMA objects */
    UDMACC26XX_Object UdmaObjects[CC2650_UDMACOUNT];
    
    /* UDMA configuration structure */
    const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_UDMACOUNT] = {
        { UDMA0_BASE, INT_UDMAERR, PERIPH_UDMA },
    };
    
    /* UDMA configuration structure */
    const UDMACC26XX_Config UDMACC26XX_config[] = {
        {&UdmaObjects[0], &udmaHWAttrs[0]},
        {NULL, NULL},
    };
    /*
     *  ============================= UDMA end =====================================
    */
    
    /*
     *  ========================== SPI DMA begin ===================================
    */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(SPI_config, ".const:SPI_config")
    #pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/spi/SPICC26XXDMA.h>
    
    /* SPI objects */
    SPICC26XX_Object spiCC26XXDMAObjects[CC2650_SPICOUNT];
    
    /* SPI configuration structure, describing which pins are to be used */
    const SPICC26XX_HWAttrs spiCC26XXDMAHWAttrs[CC2650_SPICOUNT] = {
        {   /* SENSORTAG_CC2650_SPI0 */
            .baseAddr = SSI0_BASE,
            .intNum = INT_SSI0,
            .defaultTxBufValue = 0,
            .powerMngrId = PERIPH_SSI0,
            .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
            .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
            .mosiPin = Board_SPI0_MOSI,
            .misoPin = Board_SPI0_MISO,
            .clkPin = Board_SPI0_CLK,
            .csnPin = PIN_UNASSIGNED     /* External flash / DevPk uses SPI0 */
        }
    };
    
    /* SPI configuration structure */
    const SPI_Config SPI_config[] = {
        /* SENSORTAG_CC2650_SPI0 */
        {&SPICC26XXDMA_fxnTable, &spiCC26XXDMAObjects[0], &spiCC26XXDMAHWAttrs[0]},
        {NULL, NULL, NULL},
    };
    /*
     *  ========================== SPI DMA end =====================================
    */
    
    /*
     *  ============================= I2C Begin=====================================
    */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(I2C_config, ".const:I2C_config")
    #pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/i2c/I2CCC26XX.h>
    
    /* I2C objects */
    I2CCC26XX_Object i2cCC26xxObjects[CC2650_I2CCOUNT];
    
    /* I2C configuration structure, describing which pins are to be used */
    const I2CCC26XX_HWAttrs i2cCC26xxHWAttrs[CC2650_I2CCOUNT] = {
        {
            .baseAddr = I2C0_BASE,
            .intNum = INT_I2C,
            .powerMngrId = PERIPH_I2C0,
            .sdaPin = Board_I2C0_SDA0,
            .sclPin = Board_I2C0_SCL0,
        }
    };
    
    const I2C_Config I2C_config[] = {
        {&I2CCC26XX_fxnTable, &i2cCC26xxObjects[0], &i2cCC26xxHWAttrs[0]},
        {NULL, NULL, NULL}
    };
    /*
     *  ========================== I2C end =========================================
    */
    

    6735.Board.h

  • In Board.h

    Different lines:

    #define Board_DP4_UARTRX IOID_28

    #define Board_DP5_UARTTX IOID_29

    IOID is 29 ,28 respectively in your file.

    And these lines are not in my file:

    /* UART pins used by driver */
    #define Board_UART_TX Board_DP4_UARTTX
    #define Board_UART_RX Board_DP5_UARTRX

  • This is the data i am getting on turning the notifications ON:

    And something weird is happening..

  • Hi Zahid,
    Yes i have done that still not able to see anything .Can you suggest something else ??

  • Hi Anshul,

    No, you cannot simply hook up the MSP430 UART to the UART pins on the DevPack Debugger.

    For details, see https://e2e.ti.com/support/wireless_connectivity/f/538/p/437735/1601948#1601948 

  • There's also some documentation on this here regarding the differences in UART pinouts of different versions of DevPack Debugger:

  • I would be careful with the "redefines" of Board_UART_TX / RX

    If one intends to use the USB virtual COM ports on the Debugger DevPack unit, then the new REV1_2 define will break that functionality. That is because Board_UART_TX / RX are wired properly to the USB microcontroller ... but not to the 2x10 test header.