SWRA534A January 2017 – June 2017 CC2650MODA
The board files for the application project must be modified because of the differences in pin mappings and external peripherals. This application report shows these modifications by changing the existing LaunchPad board files, but custom board files may also be created. Refer to the peripherals and drivers section of CC2640 and CC2650 SimpleLink™ Bluetooth® low energy Software Stack 2.2.1 for details on using custom board files.
The CC2650_LAUNCHXL.h file must be updated to contain the correct pin mappings, as well as the RF front end and bias configuration. This file is located in the following location (if the BLE-STACK is installed to the default location): C:\ti\simplelink\ble_sdk_2_02_01_18\src\boards\CC2650_LAUNCHXL\CC2650_LAUNCHXL.h.
NOTE
The CC2650 LaunchPad and CC2650 module use different RF front end and bias configurations. Ensure that CC2650EM_5XD is defined in the board file to match the externally biased, differential output RF configuration of the module. An incorrect RF configuration results in substantially degraded RF performance.
Refer to the following code snippet for required changes to the CC2650_LAUNCHXL.h file.
/* RF Configuration definition */
#define CC2650EM_5XD /* RF Configuration for CC2650 Module */
// #define CC2650EM_7ID /* Default RF config for CC2650 LaunchPad */
/* Mapping of pins to board signals using general board aliases
* <board signal alias> <pin mapping>
*/
/* Discrete outputs */
#define Board_RLED IOID_4
#define Board_GLED IOID_2
#define Board_LED_ON 1
#define Board_LED_OFF 0
/* Discrete inputs */
#define Board_BTN1 PIN_UNASSIGNED
#define Board_BTN2 PIN_UNASSIGNED
/* UART Board */
#define Board_UART_RX IOID_1 /* RXD */
#define Board_UART_TX IOID_0 /* TXD */
#define Board_UART_CTS PIN_UNASSIGNED /* CTS */
#define Board_UART_RTS PIN_UNASSIGNED /* RTS */
/* SPI Board */
#define Board_SPI0_MISO IOID_12 /* RF1.20 */
#define Board_SPI0_MOSI IOID_11 /* RF1.18 */
#define Board_SPI0_CLK IOID_10 /* RF1.16 */
#define Board_SPI0_CSN PIN_UNASSIGNED
#define Board_SPI1_MISO PIN_UNASSIGNED
#define Board_SPI1_MOSI PIN_UNASSIGNED
#define Board_SPI1_CLK PIN_UNASSIGNED
#define Board_SPI1_CSN PIN_UNASSIGNED
/* I2C */
#define Board_I2C0_SCL0 PIN_UNASSIGNED
#define Board_I2C0_SDA0 PIN_UNASSIGNED
/* SPI */
#define Board_SPI_FLASH_CS PIN_UNASSIGNED
#define Board_FLASH_CS_ON 0
#define Board_FLASH_CS_OFF 1
These changes work with the CC2650 Module BoosterPack. If the CC2650 module is placed on a custom board, it will have no external I/O peripheral connections by default, therefore the remaining pins must be set to PIN_UNASSIGNED. The use of a custom board with the CC2650 module will require changes similar to the previous code snippet. For custom board layouts, refer to the board schematic for determining the correct pin configuration.
Next, the CC2650_LAUNCHXL.c board file must be updated to contain the correct fields in the PIN_Config GPIO initialization table. This file is located in the following location (if the BLE-STACK is installed to the default location): C:\ti\simplelink\ble_sdk_2_02_01_18\src\boards\CC2650_LAUNCHXL\CC2650_LAUNCHXL.h.
See the following code snippet for required changes to the table.
const PIN_Config BoardGpioInitTable[] = {
Board_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
Board_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
Board_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master out - slave in */
Board_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master in - slave out */
Board_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI clock */
PIN_TERMINATE
};
These changes work with the CC2650 Module BoosterPack. If the CC2650 module is placed on a custom board, the only value in the table shall be PIN_TERMINATE unless the table is configured to match the board schematic. Do not exceed the maximum number of I/Os (15) for the CC2650 module 5 × 5 package.
If the application has any predefined symbols that would cause the application to expect to use any inputs or outputs (such as the display driver), these must be disabled in the project, typically in the Predefined Symbols of the project. The simple BLE peripheral-project configuration for the LaunchPad does not have any of these enabled by default. The accessing preprocessor symbols section of CC2640 and CC2650 SimpleLink™ Bluetooth® low energy Software Stack 2.2.1 details how to access the predefined symbols fo IAR Embedded Workbench and CCS.