This app note explains how to port the simple_peripheral project to work with the SaBLE-x-R2 Development Board. The SaBLE-x-R2 module uses the CC2640R2F 5x5 mm RHB package with 15 GPIOs, and the RF front end is configured as a differential output with external bias..

Requirements

SaBLE-x-R2 Dev Board

IAR for ARM 7.80.3 or CCS 7.1

CC2640R2F SDK v1.35.00.33

1Prepare the Project

1

Copy simple peripheral project

Copy the simple_peripheral project folder from the source folder to the destination folder:

Using the Laird board file and following the steps in this poring guide includes the correct defines in software to ensure correct operation of the SaBLE-x-R2 with the 5x5 chipset.

All TI examples in the SDK are setup to use the larger 7x7 mm package that has more GPIO pins. When writing your own board file please make sure to #define CC2650EM_5XD and remove #define CC2650EM_7ID.

3

Edit CCFG Options

To ensure the user can still bootload the module with the UART bootloader, replace the ccfg_app_ble.c with the one included.

Replace Defines

Set Default TX Power

Set the default TX power by editing the DEFAULT_TX_POWER variable in ble_user_config.c. A value of 12 is equivalent to a max power of 5dBm for the SaBLE-x-R2 module.

NOTE: If using the 2Mbps PHY rate in Japan, set the max power to 4dBm or DEFAULT_TX_POWER = 11

Note that the DEFAULT_TX_POWER value is an index into a power table in ble_user_config.c.

5

Edit code to include SABLEXR2_DEV_BOARD

To make the simple_peripheral example work as it would on the CC2640R2_LAUNCHXL board, replace the dev board define anywhere it is mentioned in code.

Find:

defined(CC2640R2_LAUNCHXL)

Add:

|| defined(SABLEXR2_DEV_BOARD)

This only requires a few changes to simple_peripheral.c and board_key.c. The user can search for all places CC2640R2_LAUNCHXL is used.

There are six locations where SABLEXR2_DEV_BOARD needs to be added.

The following is an example of adding the define for the SABLEXR2_DEV_BOARD:

6

Build and Run the Application

Now the user can build and run the application. Please see the simple_peripheral documentation in the TI SDK for more information on how the simple_peripheral example works. The readme for the simple_peripheral will be located at the following directory: