mini bluetooth® low energy broadcaster user's guide · although the cc2543 mini-ble...

19
CC2543 SHT21 Humidity/ Temperature Sensor KXTF9 Accelerometer DEBUG Interface T5400 Pressure Sensor CR2032 Battery I2C TI Designs Mini Bluetooth ® Low Energy Broadcaster User's Guide TI Designs Description TI Designs provide the foundation that you need This reference design is an example of using the including methodology, testing and design files to SimpleLink™ Bluetooth Smart CC2543 low-cost quickly evaluate and customize the system. TI Designs proprietary RF wireless MCU as a broadcaster. The help you accelerate your time to market. board has several sensors and runs off a CR2032coin cell battery. Combined with the example software and Design Resources the TI Multitool Bluetooth Smart app, the board will work as a weather station broadcaster as an example TIDC-MINI-BLUETOOTH-LOW- application. Design Folder ENERGY-BROADCASTER Design Features CC2541 Product Folder CC2543 Product Folder Broadcasts Bluetooth Smart data with the CC2543 CC2544 Product Folder Implements Beacon solutions by simply altering the CC2545 Product Folder packet format in the source code CC2543-CC2544 Development Kit Tool Folder Runs demo example out of the box Has a compact form factor ASK Our E2E Experts Runs off a single CR2032 coincell WEBENCH® Calculator Tools Includes all required hardware reference design files and software examples An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other important disclaimers and information. All trademarks are the property of their respective owners. 1 TIDU550 – December 2014 Mini Bluetooth ® Low Energy Broadcaster User's Guide Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated

Upload: hadan

Post on 19-Jul-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

CC2543

SHT21 Humidity/

Temperature Sensor

KXTF9 Accelerometer

DEBUG Interface

T5400 Pressure Sensor

CR2032 Battery

I2C

TI DesignsMini Bluetooth® Low Energy Broadcaster User's Guide

TI Designs DescriptionTI Designs provide the foundation that you need This reference design is an example of using theincluding methodology, testing and design files to SimpleLink™ Bluetooth Smart CC2543 low-costquickly evaluate and customize the system. TI Designs proprietary RF wireless MCU as a broadcaster. Thehelp you accelerate your time to market. board has several sensors and runs off a CR2032coin

cell battery. Combined with the example software andDesign Resources the TI Multitool Bluetooth Smart app, the board will

work as a weather station broadcaster as an exampleTIDC-MINI-BLUETOOTH-LOW- application.Design FolderENERGY-BROADCASTER

Design FeaturesCC2541 Product FolderCC2543 Product Folder • Broadcasts Bluetooth Smart data with the CC2543CC2544 Product Folder • Implements Beacon solutions by simply altering theCC2545 Product Folder packet format in the source codeCC2543-CC2544 Development Kit Tool Folder

• Runs demo example out of the box• Has a compact form factor

ASK Our E2E Experts • Runs off a single CR2032 coincellWEBENCH® Calculator Tools

• Includes all required hardware reference designfiles and software examples

An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and otherimportant disclaimers and information.

All trademarks are the property of their respective owners.

1TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Acronyms www.ti.com

1 Acronyms

ADV— Advertisement

BLE— Bluetooth Low Energy

CAL— Calibration

DAQ— Data Acquisition

DK— Development Kit

EVB— Evaluation Board

EVM— Evaluation Module

EMK— Evaluation Module Kit

HID— Human Interface Device

IC— Integrated Circuit

kB— Kilobyte (1024 bytes)

LCD— Liquid Crystal Display

LED— Light Emitting Diode

LPRF— Low Power Radio Frequency

MCU— Microcontroller

MHz— Megahertz

NC— Not Connected

PER— Packet Error Rate

RF— Radio Frequency

RX— Receive

SoC— System on Chip

TI— Texas Instruments

TX— Transmit

UART— Universal Asynchronous Receive Transmit

USB— Universal Serial Bus

2 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com Introduction

2 IntroductionThis guide describes the CC2543 mini-BLE Broadcaster software example. The example software isdesigned to run on the CC2543 SoC, a proprietary device with 32kB of FLASH and 1 kB of RAM (find aguide on how to use some of the radio-RAM for an application in Appendix B), which makes it low-costand small-sized (5×5-mm QFN32 package). The application only needs a single 32-MHz crystal to run.

Although the CC2543 mini-BLE Broadcaster software example is only developed for the CC2543 SoC.The other devices in the CC254x family have a similar radio, which makes it possible to port the softwareto the devices with proprietary mode if other features are required, such as more memory, USB interface,more GPIOs, lower active TX current consumption, and more.

Section 3 describes which hardware is compatible with the CC2543 mini-BLE Broadcaster softwareexample. Section 5 presents some details on how the software example works. See Section 6 for a list ofrelevant documents and links. Appendix A and Appendix B contain flow charts and hints on utilizing moreRAM for your application.

To get more info on the CC2543 SoC solution, go to the product folder in Design Resources to finddatasheet, user guide, and application notes. Find further information on the Texas Instruments E2EOnline Community [2]. For a general overview over all the BLE products from Texas instruments, visitwww.ti.com/Bluetoothlowenergy.

3TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Hardware www.ti.com

3 HardwareThe software example can be run out of the box on these two different hardware solutions:• Mini-BLE Broadcaster Board

This reference design is part of this TI Design and cannot be ordered.• CC2543EM + SmartRF05EB

The CC2545EM is a part of the CC2543-CC2544 Development Kit and can be ordered online on TIStore at https://store.ti.com.

3.1 Mini-BLE Broadcaster BoardA manufactured version of the broadcaster reference design can be seen in Figure 1. This board isdesigned to act as a weather station broadcaster. Section 5.1.1 explains how to set up this demo inconjugation with the TI BLE Multitool App [5]. The reference design has three different sensors that canprovide data for temperature, humidity, pressure, and acceleration. The board has a 1.27-mm pitch femaleheader available to connect to the debug interface. The CC-Debugger can be used to download anddebug firmware [9]. The SmartRF05EB has a built-in debugger and can be used instead of theCC-Debugger.

Figure 1. Mini-BLE Broadcaster Board

4 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com Hardware

3.2 CC2543EMThe CC2543EM must be used on the SmartRF05EB. This EM can only be attained in the CC2543-CC2544DK.The content of this development kit can be seen in Figure 2. Find more details in the CC2543-CC2544DK kit folder.

Figure 2. CC2543-CC2544 Development Kit Contents

5TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

CC2543

SHT21 Humidity/

Temperature Sensor

KXTF9 Accelerometer

DEBUG Interface

T5400 Pressure Sensor

CR2032 Battery

I2C

Block Diagram www.ti.com

4 Block Diagram

Figure 3. CC2543 Broadcaster Board Block Diagram

6 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com Mini-BLE Broadcaster Software Example

5 Mini-BLE Broadcaster Software Example

5.1 IAR Projects OverviewThe CC2543 mini-BLE Broadcaster software example contains the following projects that can be run withIAR Embedded Workbench for 8051 [4]:• WeatherStation• GenericBroadcaster• DirectTestMode

5.1.1 WeatherStation (Demo)The WeatherStation project is designed to be used on the WeatherStation board and was intended towork as a demo. The application reads and stores weather data (temperature, humidity, and pressure)and sends a non-connectable BLE broadcast packet every second, alternating payload betweenimmediate data and historical data. The historical data spans over the last 12 hours. To show the sensordata on an iOS device, download the TI BLE Multitool App [5] and enter Advanced Mode. If the weatherstation project is running on the mini-BLE Broadcaster Board, the device will show up as seen in the left inFigure 4. By pushing on the Weather Station icon under Devices, the weather station data will bedisplayed with numbers and historical graphs. It might take some time until all the historical data isreceived depending on the broadcasting interval set (default one second).

Figure 4. Weather Station App (TI BLE Multitool App [5])

7TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Main()

halMcuInit();

miniBleInit();

miniBleSetTaskInterval(ADV_TASK, INTERVAL_100_mSEC, SCHEDULE_LATER);

miniBleSetAdvertisingData(payloadBuffer, MAX_PAYLOAD_SIZE);

miniBleSetOutputPower(PLUS_0_DBM);

miniBleSetAdvertisingChannels(CHANNEL_37 | CHANNEL_38 | CHANNEL_39);

miniBleSetTaskInterval(CAL_TASK, INTERVAL_1_SEC, SCHEDULE_LATER);

miniBleEnableTask(ADV_TASK);

miniBleEnableTask(CAL_TASK);

events = miniBleWaitForNextEvent();

Events ==

TASK_DAQ?N dataAcqusition();Y

The advertisement task are scheduled here

and runs when interval is reached.

With the scheduler already running,

schedule the CAL task in addition to the

already pending ADV task.

Conditional checks for the

other events to be added.

Mini-BLE Broadcaster Software Example www.ti.com

5.1.2 GenericBroadcasterThe GenericBroadcaster project can be run on both the CC2543EM and the mini-BLE Broadcaster Boardreference design. The project is an example on how to set up a broadcaster with static payload and is agood starting point for developing broadcaster applications. A simple flow chart that shows how to use themini-BLE API to enable simple broadcaster functionality is shown in Figure 5.

Figure 5. Main() Flow Chart

8 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com Mini-BLE Broadcaster Software Example

5.1.3 DirectTestModeThe DirectTestMode (DTM) tests the PHY of the CC2543 according to the UART test interfacespecification given in the Bluetooth Core Specification 4.1 [6]. Only a 2-wire UART is implemented runningat 115200 bps. The source code can be altered to support other bit rates. The following DTM commandsare supported:• LE_Reset• LE_Transmitter_Test• LE_Test_End

If LE_RECEIVER_TEST_CMD or any other command than the three listed above is issued, theapplication will return with CMD_FAILURE status.

9TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

events = miniBleWaitForNextEvent();

Events ==

TASK_DAQ?N dataAcqusition();Y

Mini-BLE Broadcaster Software Example www.ti.com

5.2 Source Code OverviewThe core of the implementation consists of the following main files (.c and .h):• miniBLE

Contains location of the main API• miniBLE_scheduler

Contains all timing related functions• miniBLE_phy

Contains all function related to the radio• miniBLE_defs

Contains global definitions for all layers• miniBLE_dtm

Contains the DTM implementation (2-wire interface only)

5.3 Software ArchitectureThis software example can be run as it is, but the main idea behind this work is to give a starting point forsoftware developers to create their own broadcaster solutions on the CC2543 either by using theimplemented API or creating their own. It is possible to make a broadcaster application that can be moretailored to specific requirements.

The implementation is based on different tasks (advertisement, data acquisition, calibration, and wait)where each task has its own countdown value that is updated every time the sleep timer interrupt routine(ST ISR) is entered. When a countdown value reaches 0 a flag is set to indicate that the task is triggered,then some task specific code might be executed and the countdown value will be reset to the set intervalvalue. This is illustrated in the ST ISR flow chart in Appendix A. The ST ISR is the core of the scheduler.

When the task "TASK_DAQ" is triggered a flag will be set in the events variable and the dataAcqusition();function will be called. This function is intended to be used by the developer to read sensors, performcalculations or any other functions required by the specific application under development. The Schedulermay preempt this function at any time there is scheduled a wake-up event (task interval reached). Thismeans that the program flow in the dataAcqusition function may be interrupted unless global interrupt isdisabled. Please note that critical sections (global interrupt disabled) must be very short not to disrupt thetiming of the scheduler.

Figure 6. Main Loop (Can Be Interrupted by ST ISR)

The reason why some of the tasks specific actions are handled in the ST ISR while the dataAcqusitionfunctions are done in main context is to make sure that the timing of the broadcast packets follow thetiming given in the Bluetooth Core Specification 4.1 [6].

10 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Timing within single advertisement event

Advertisement events timing (interval (100 ms to 10.24 s) + pseduorandom delay (0 to 10 ms)

Inte

rva

l =

10

0 m

s

Inte

rva

l =

10

0 m

s

20 ms0 ms 10 ms

100 ms + 3 × (0 to 10 ms)0 ms 100 ms + (0 to 10 ms) 200 ms + 2 × (0 to 10 ms)

TX PACKET

(Channel 37)

TX PACKET

(Channel 38)

TX PACKET

(Channel 39)

Advertising Event

(ADV EVT)ADV EVT ADV EVT ................

www.ti.com Mini-BLE Broadcaster Software Example

5.3.1 Timing and System ClockThe ST [an internal 32-kHz RC oscillator (RCOSC), always running] is used as the clock source for thetask scheduler. Whenever the device is awake the 32-MHz XTAL Oscillator must be set as system clockwithout any clock division. This means all the other timers are available for the developer (Timer1, Timer2,Timer3, and Timer4). If the 32-MHz clock is divided, it might break the scheduler. Also, the debuginterface will not work.

An example of the timing of the advertisement events can be seen in Figure 7. It follows the rules given inthe Bluetooth Core Specification 4.1 [6] and is controlled in the ST ISR and RF ISR. There is a featureadded called TX_INTERVAL which, if defined to be 1, will add a delay between the packets within a singleadvertising event. The goal is to try to reduce the peak current consumption on the CC2543 to reduce thestress on coin cell battery. If it is disabled the packets will be sent back2back and the RF ISR will triggerall the packets. If it is enabled then each packet transmission will be scheduled as tasks so that the devicecan enter sleep between each packet. An illustration of the advertisement event timing can be seen inFigure 7.

Figure 7. Timing of Advertisement Events With TX_INTERVAL=1

11TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Wake-up

CLKCONCMD.OSC

= 0 ?

16 MHz RCOSC Start-up ( 4us )

Y

32 MHz XOSC Start-up ( approx 250 us )

32 MHz XOSC

Stable?

Keep on running from

16 MHz RCOSCN

SLEEPCMD.OSC32K_C

ALDIS = 0 ?

Y

N

Y

Y

32 kHz RCOSC Calibration ( approx 2 ms )

Calibration Done?

N

Y

SleepY

N

Mini-BLE Broadcaster Software Example www.ti.com

5.3.2 Calibration of System ClockThe timing of the scheduler is based on the internal 32-kHz RCOSC. As the accuracy might varydepending on temperature and supply voltage, the 32-kHz RCOSC must be calibrated at regular intervals.Calibration is currently added as a task which is executed in the ST ISR where theSLEEPCMD.OSC32K_CALDIS bit is set to 0 (enable 32-kHz calibration). This will cause the 32-kHzRCOSC calibration routine to run the next time the device wakes up from sleep (PM2). This procedure isillustrated in Figure 8. The device cannot enter sleep before the calibration routine has finished whichtakes approximately 2 ms to complete. The next time an event triggers the scheduler the calibration will bedisabled.

If power saving is disabled (POWER_SAVING=0), the implementation of enabling and running thecalibration takes more than 4 ms to run (while in an interrupt routine which can only be pre-empted by theRF ISR). The system clock will have to be changed from 32 MHz to run on the 16-MHz RCOSC for thechange in SLEEPCMD.OSC32K_CALDIS to take effect. Then the system clock is set back to 32 MHzagain and the calibration routine will automatically start. The crystal oscillator must be in power down for aguard time before it is used again to avoid any instability.

Figure 8. Wake-Up, System Clock Start-Up, and Calibration

12 TIDU550–December 2014Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com Mini-BLE Broadcaster Software Example

5.4 Device AddressThe CC2543 uses a random static address as specified in the Bluetooth Core Specification 4.1 [6]. TheCC2543 product page does not have a valid public device address; therefore, a valid random address isgenerated by default.

5.5 Notes to the DeveloperWhen developing code based on this example, use the following tips to extend this software example withthe application on top. When redesigning the whole project, ignore these tips and refer to the extensiveCC2543 user guide [1] instead.• Do not divide the system clock.

Don’t divide clock speed (set in CLKCONCMD.CLKSPD). This can cause the scheduler to break,meaning that the timing will be affected and might cause the tasks to execute too late. Also thedebugger cannot be used with a divided system clock which will make debugging difficult.

• Short critical sections.Keep critical section short as this can delay task execution and for example cause the advertisementsto be delayed.

• Interrupt the routine priority.The RF ISR priority is set to level 3 (Highest priority) and the ST ISR is set to level 2. These settingsare to make sure that all interrupt handling that is related to the TX operations is handled immediately,which is required. Make sure not to set the priority of any other routine to higher than 2 (ideally 1).

6 References

1. Texas Instruments, CC2543, CC2544, CC2545 System-on-Chip Solution for 2.4-GHz Applications,User's Guide (SWRU283B)

2. Texas Instruments, E2E Community—Wireless Connectivity(http://e2e.ti.com/support/wireless_connectivity/default.aspx)

3. Texas Instruments Store (https://store.ti.com)4. IAR Embedded Workbench for 8051 (http://www.iar.com)5. Texas Instruments, TI BLE Multitool App (https://itunes.apple.com/us/app/ti-ble-

multitool/id580494818?mt=8)6. Bluetooth Core Specification 4.1 (ZIP Folder)7. RF-PHY Test Requirements for Bluetooth Core Specification 4.1

(https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=225827)8. Texas Instruments, Bluetooth Low Energy (www.ti.com/Bluetoothlowenergy)9. Texas Instruments, Debugger and Programmer for RF SoC

(http://www.ti.com/tool/cc-debugger)

13TIDU550–December 2014 Mini Bluetooth® Low Energy Broadcaster User's GuideSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

ST ISR

(wake up)

HAL_INT_LOCK(intState);

timeDelta = timeNow t timeOld;

i = 0;

ADV?

CAL?

Y

Task[i].enable?

DAQ?

32 kHz RC OSC calibration

deltaTime >

Task[i].countdown

Task[i].countdown -= deltaTime;

Task[i].flag = 1;

Task[i].countdown = Task[i].interval;Y

Y

Y Set daq flag for main

Set system clock (32 MHz)

N

Y

smallestCountdown = 0x00FFFFFF;

i = 0;

i < NUM_TASKS? Y

N

i++

N

Task[i].enable?Task[i].countdown <

smallestCountdown smallestCountdown =Task[i].countdown;Y

N

Yi < NUM_TASKS? Y

N

i++

N

WAIT? Y waitCompleteFlag = 1;

N

Task[0]

Task[1]

Task[2]

Task[3]

N

N

Clock Stable? CMD_TXY

N

4 ms stall*

N

Schedule next event

smallestCountdown ==

0x00FFFFFF ?

N

#DEFINE TX_INTERVAL 1

Exit/reti;

EnterSleepModeFlag = 0;

HAL_INT_UNLOCK(intState);

save Task[ADV_TASK].countdown

Task[ADV_TASK].countdown += rnd();

Active channels

> 1 ?

first channel?

Y

Last channel?

N

Task[ADV_TASK].countdown = 9 mSEC;

restore Task[ADV_TASK].countdown

Y

Y

N

Y While(1);

www.ti.com

Appendix A Source Code Flow Charts

A.1 ST ISR (TX_INTERVAL=1)

Figure 9. ST ISR (TX_INTERVAL=1)

14 Source Code Flow Charts TIDU550–December 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

ST ISR

(wake up)

HAL_INT_LOCK(intState);

timeDelta = timeNow t timeOld;

i = 0;

ADV?

CAL?

Y

Task[i].enable?

DAQ?

32 kHz RC OSC calibration

deltaTime >

Task[i].countdown

Task[i].countdown -= deltaTime;

Task[i].flag = 1;

Task[i].countdown = Task[i].interval;Y

Y

Y Set daq flag for main

Set system clock (32 MHz)

N

Y

smallestCountdown = 0x00FFFFFF;

i = 0;

i < NUM_TASKS? Y

N

i++

N

Task[i].enable?Task[i].countdown <

smallestCountdown smallestCountdown =Task[i].countdown;Y

N

Yi < NUM_TASKS? Y

N

i++

N

WAIT? Y waitCompleteFlag = 1;

N

Task[0]

Task[1]

Task[2]

Task[3]

N

N

Clock Stable? CMD_TXY

N

4 ms stall*

N

Schedule next event

smallestCountdown ==

0x00FFFFFF ?

N

Y

#DEFINE TX_INTERVAL 0

Exit/reti;

EnterSleepModeFlag = 0;

HAL_INT_UNLOCK(intState);

Task[ADV_TASK].countdown += rnd();

While(1);

www.ti.com ST ISR (TX_INTERVAL=0)

A.2 ST ISR (TX_INTERVAL=0)

Figure 10. ST ISR (TX_INTERVAL=0)

15TIDU550–December 2014 Source Code Flow ChartsSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

RF ISR

TASKDONE?

TXDONE?

TASK_ENDOK?

Y

N

Set next active channel

Y

Clear flags

MINIBLE_PHY_CMD(CMD_TXFIFO_RETRY);

Last channel?

#DEFINE TX_INTERVAL 1

tx_flag = 1;

tx_flag = 0;Y

N

RF ERROR

miniBleAdvTxDone = 1;

tx_flag==1? miniBleAdvTxDone = 0;Y

Set first active channel

miniBleAdvTxDone = 1;

miniBleAdvEventDone

N

Exit/reti

RF ISR (TX_INTERVAL=1) www.ti.com

A.3 RF ISR (TX_INTERVAL=1)

Figure 11. RF ISR (TX_INTERVAL=1)

16 Source Code Flow Charts TIDU550–December 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

RF ISR

TASKDONE?

TXDONE?

TASK_ENDOK?

Y

N

Set next active channel

Y

Clear flags

MINIBLE_PHY_CMD(CMD_TXFIFO_RETRY);

Last channel?

#DEFINE TX_INTERVAL 0

tx_flag = 1;

tx_flag = 0;Y

N

RF ERROR

miniBleAdvTxDone = 1;

tx_flag==1?MINIBLE_PHY_CMD(CMD_TX);

miniBleAdvTxDone = 0;Y

Set first active channel

miniBleAdvTxDone = 1;

miniBleAdvEventDone

N

Exit/reti

www.ti.com RF ISR (TX_INTERVAL=0)

A.4 RF ISR (TX_INTERVAL=0)

Figure 12. RF ISR (TX_INTERVAL=0)

17TIDU550–December 2014 Source Code Flow ChartsSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

www.ti.com

Appendix B Using the Radio RAM for User Application

The radio RAM is described in detail in the RF Core Data Memory section in the CC2543 user guide [1].The guide has eight pages of 128 bytes each. The data in these pages are used to configure the radioand as FIFOs for TX, RX, and auto-ACK payload. This example code use what is called basic-mode,which does not use all the radio RAM thereby allowing the application to use some of it. The availableRAM can be seen in Table 1. The radio RAM will be slower to access as it relies on bank switching toaccess all the pages (select a page in register RFRAMCFG.PRE). Do not use pages 0, 6, and 7. Alsonote that some of page 5 can also be used (0x6018 to 0x606F) if the LLE is in reset, but this will beoverwritten when the LLE starts. Of the pages that can be used, only page 1 has retention in PM2 andPM3. Pages 2, 3, 4, and 5 will lose their content if the device enters PM2 or PM3.

Table 1. Radio RAM Available for Application Use

PAGE DESCRIPTION RETENTION USABLE ADDRESS RANGE0 RAM-based registers Yes N/A1 ACK payload FIFO for addresses 2 and 3 Yes 0x6000 to 0x607F2 ACK payload FIFO for addresses 4 and 5 No 0x6000 to 0x607F3 ACK payload FIFO for addresses 6 and 7 No 0x6000 to 0x607F4 Free for MCU use No 0x6000 to 0x607F

0x6018 to 0x606F5 Additional RAM-based registers and reserved for LLE No (When LLE is in reset)6 RXFIFO Yes N/A7 TXFIFO Yes N/A

18 Using the Radio RAM for User Application TIDU550–December 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

IMPORTANT NOTICE FOR TI REFERENCE DESIGNS

Texas Instruments Incorporated ("TI") reference designs are solely intended to assist designers (“Buyers”) who are developing systems thatincorporate TI semiconductor products (also referred to herein as “components”). Buyer understands and agrees that Buyer remainsresponsible for using its independent analysis, evaluation and judgment in designing Buyer’s systems and products.TI reference designs have been created using standard laboratory conditions and engineering practices. TI has not conducted anytesting other than that specifically described in the published documentation for a particular reference design. TI may makecorrections, enhancements, improvements and other changes to its reference designs.Buyers are authorized to use TI reference designs with the TI component(s) identified in each particular reference design and to modify thereference design in the development of their end products. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPELOR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGYOR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right,or other intellectual property right relating to any combination, machine, or process in which TI components or services are used.Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or awarranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectualproperty of the third party, or a license from TI under the patents or other intellectual property of TI.TI REFERENCE DESIGNS ARE PROVIDED "AS IS". TI MAKES NO WARRANTIES OR REPRESENTATIONS WITH REGARD TO THEREFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ACCURACY ORCOMPLETENESS. TI DISCLAIMS ANY WARRANTY OF TITLE AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTYINTELLECTUAL PROPERTY RIGHTS WITH REGARD TO TI REFERENCE DESIGNS OR USE THEREOF. TI SHALL NOT BE LIABLEFOR AND SHALL NOT DEFEND OR INDEMNIFY BUYERS AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TOOR IS BASED ON A COMBINATION OF COMPONENTS PROVIDED IN A TI REFERENCE DESIGN. IN NO EVENT SHALL TI BELIABLE FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANYTHEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, ARISING INANY WAY OUT OF TI REFERENCE DESIGNS OR BUYER’S USE OF TI REFERENCE DESIGNS.TI reserves the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services perJESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevantinformation before placing orders and should verify that such information is current and complete. All semiconductor products are soldsubject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s termsand conditions of sale of semiconductor products. Testing and other quality control techniques for TI components are used to the extent TIdeems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is notnecessarily performed.TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products andapplications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provideadequate design and operating safeguards.Reproduction of significant portions of TI information in TI data books, data sheets or reference designs is permissible only if reproduction iswithout alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable forsuch altered documentation. Information of third parties may be subject to additional restrictions.Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirementsconcerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or supportthat may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards thatanticipate dangerous failures, monitor failures and their consequences, lessen the likelihood of dangerous failures and take appropriateremedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components inBuyer’s safety-critical applications.In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is tohelp enable customers to design and create their own end-product solutions that meet applicable functional safety standards andrequirements. Nonetheless, such components are subject to these terms.No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the partieshave executed an agreement specifically governing such use.Only those TI components that TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use inmilitary/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components thathave not been so designated is solely at Buyer's risk, and Buyer is solely responsible for compliance with all legal and regulatoryrequirements in connection with such use.TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use ofnon-designated products, TI will not be responsible for any failure to meet ISO/TS16949.IMPORTANT NOTICE

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2014, Texas Instruments Incorporated