金牌会员
- 积分
- 1461
- 金钱
- 1461
- 注册时间
- 2014-5-21
- 在线时间
- 339 小时
|
楼主 |
发表于 2016-6-14 20:33:23
|
显示全部楼层
CC2640 开发常见问题小结:
本帖最后由 cornrn 于 2016-6-14 20:35 编辑
CC2640 开发常见问题小结:
[mw_shl_code=csharp,true][mw_shl_code=cpp,true]Q: What do I need to get started?
A: You need a development kit, please select one of the following:
1) The new CC2650 LaunchPad™ (LAUNCHXL-CC2650). The CC2650 LaunchPad is a complete BLE development kit for $29 offering an on board XDS110 debugger, a multi-standard CC2650 in the 7x7 QFN package and access to IOs via the BoosterPack connectors™. New to LaunchPad? Check out the main site with more LaunchPad ecosystem details. This is the most economical development kit to prototype your embedded Bluetooth low energy system, develop software, measure power.
2) CC2650 SensorTag (CC2650STK) + the XDS110 DevPack Debugger (CC-DEVPACK-DEBUG) development kit (bundle TI eStore price $44). This is the best platform for IoT application development as the SensorTag has 10 sensors (motion, temperature, humidity, etc.) and runs off a coin cell battery. See how the SensorTag be used to accelerate your IoT development here.
3) CC2650 SmartRF06 Development Kit (CC2650DK). A full development kit featuring two SmartRF06EBK development boards, two CC2650EMs (7x7), an integrated LCD and support for accessing all IOs. All QFN package reference designs can be evaluated by changing the CC2650EM evaluation module.
Next, you'll need some software. Good news, it's free!
Download the Bluetooth low energy software stack (BLE-Stack) v2.1.1 which can be found here: ti.com/ble-stack
The TI BLE-Stack software package includes TI-RTOS SimpleLink, CC26XXWare and the royalty-free BLE protocol stack.
Refer to the “Setting up the Development Environment” section in the CC2640 BLE Software Developer’s Guide (SWRU393) – this section has all the details on how to setup & build example projects in the BLE-Stack SDK: http://www.ti.com/lit/swru393
Some kits have dedicated SW examples:
Project 0 for the CC2650 LaunchPad: Develop your first Bluetooth LE application and control the LaunchPad with your iOS or Android app, all right from the CCS Cloud development environment.
SimpleLink Academy for the CC2650 LaunchPad or SensorTag + DevPack Debugger: Learn TI-RTOS basics & custom Bluetooth LE Profile development. Learn how to send data to/from a smart phone, such as for controlling a sensor or developing your own custom service.
Develop your own application on any development kit: Start with the SimpleBLEPeripheral example in the SW Developer's Guide to gain an understanding of Bluetooth LE and the TI BLE SW Stack. TI BLE Wiki. Use the "Sample Applications" section of the BLE Software Developer’s Guide (SWRU393), TI Designs & Examples on the TI BLE Wiki to create your Bluetooth low energy application!
All of the kits, training & sample application can be found on the TI BLE Wiki.
A CC26xx Family SW Quick Start Guide can be found here.
Q: Where do I learn more about the Bluetooth low energy specification, profiles, Notifications, Pairing, etc?
A: There is a good intro to Bluetooth LE in the CC2640 BLE Software Developer’s Guide (SWRU393). You can download the BT Core Specification for free from the Bluetooth Special Interest Group (SIG) website in addition to adopted Profiles & Services. Although the core specification is over 2,000 pages, only a few sections are typically referenced in the course of developing a Bluetooth LE application:
Generic Access Profile (GAP) - Specifies the role of the device (Peripheral, Central, Broadcaster, etc.): Volume 3, Part C
Attribute Protocol (ATT) - Defines discrete data types which are the 'building blocks' of Characteristics: Volume 3, Part F
Generic Attribute Profile (GATT) - Defines Characteristics, or an organized method of using Attributes. Volume 3, Part G
Security Manager Specification (SMP) - Defines the procedure for the generation and exchange of security keys, also known as Pairing. Volume 3, Part H
Link Layer Specification - Lowest layer that manages the connection between devices and defines channel data types. Volume 6, Part B
The vast majority of E2E inquiries related to the Bluetooth core specification are addressed by the above sections of the core specification. In some cases, the above sections cover classic as well as dual-mode operation. Refer to the respective introduction chapter for the LE-only sub sections.
Q: Where do I find more information on the CC2650 SensorTag, including sensor details, firmware, services/profiles, PC & Smartphone Apps, etc.?
A: Technical details on the SensorTag, sensors, schematics, BLE custom sensor profiles & how to access from a PC or smartphone can be found on the "Getting Started" & "Teardown" tabs of the SensorTag main page.
The SensorTag device firmware is provided in the TI BLE-Stack SDK, both in source & prebuilt hex format. It can be programmed with the SmartRF Flash Programmer 2 and a supported JTAG debugger.
Additional details on how to build/program the firmware, how to access the sensor data over BLE and more details including OAD are located in the SensorTag User's Guide on the TI BLE Wiki. Although any smart device app can be developed to interact with the SensorTag, TI does provide Android & iOS sample code.
Q: What is the difference between CC2650 & CC2640?
A: The multi-standard CC2650 wireless MCU supports BLE as well as other wireless protocols, such as ZigBee. The CC2640 supports Bluetooth low energy only. All code generated from the BLE-Stack v2 SDK is binary compatible with both the CC2650 & CC2640. Additionally, IDE project configuration settings in the BLE-Stack v2.1 SDK for CC2650 & CC2640 are cross-compatible; however, it is strongly recommended to not change the CPU settings in the IDE. Although the CC2650 has the HW & ROM capability to support additional wireless protocols, a given SW build can only support one wireless protocol.
Q: What are the different software packages available?
A:
TI RTOS SimpleLink
A full package including the OS kernel, high level peripheral drivers and CC26XXWARE
CC26XXWARE ("DriverLib")
Low level drivers, linker files and memory map
BLE-Stack v2
Bluetooth LE stack for CC2640, installer includes TI RTOS Simplelink
Q: Do you have a GitHub page?
A: Yes! Additional example projects can be found on the SimpleLink GitHub page.
Q: Which debuggers are supported?
A:
SmartRF06EB using XDS100v3 (included on board)
XDS100v3 standalone (from 3rd party manufacturers)
XDS200 (from 3rd part manufacturers)
DevPack Debugger (CC-DEVPACK-DEBUG) for the new SensorTag (new XDS110 debugger)
XDS110 on the CC2650 LaunchPad (LAUNCHXL-CC2650)
See the Tools wiki for more details on supported debuggers. Note that XDS100v2 debuggers are not supported with CC26xx.
Q: How do I setup the CC-DEVPACK-DEBUG (XDS110) with CCS and IAR?
A: Please see the Tools Overview wiki article. The User/Application COM port is the USB Serial "back channel" used in the sample applications.
Q: Can I use the CC Debugger with CC26XX?
A: Unfortunately not. The CC26XX / CC13XX series uses cJTAG / 4-pin JTAG as its debug interface which is not supported by CC Debugger
Q: Which IDE / Compilers are supported?
A: IAR >=7.40.2 or CCS 6.1 is supported (updates applied). Both have equally good support for TI RTOS. Please see the "Setting up the Development Environment" section of the CC2640 BLE Software Developer’s Guide (SWRU393) located in the Documents folder of the BLE-Stack SDK. The actual IDE versions used for testing the BLE-Stack SDK can be found in the Release Notes of the SDK (README.htm).
Note: IAR 7.50 versions prior to 7.50.3 have linker issues with BLE-Stack 2.1.x. Please use IAR 7.50.3 or later.
Q: When I download my code, where is it programmed? Internal or external flash memory?
A: The CC26xx is a flash based wireless MCU with 128kB of in-system programmable flash memory. All code downloaded / programmed by a supported IDE or SmartRF Flash Programmer 2 resides in and executes from internal flash memory. Some development kits feature an optional serial flash memory component connected via SPI. This external flash is to support firmware upgrade using TI's custom Over-the-Air Download (OAD) profile, which, when used with a software boot image manager, allows for updating the internal memory contents. For more details on the OAD profile, please see the CC2640 BLE OAD User's Guide article on the TI BLE Wiki.
Q: Does CC2640 Support Bluetooth version 4.2 or Mesh Networks
The CC2640 & BLE-Stack v2.1.x supports Bluetooth version 4.1 which includes multi Master/Slave capability ("MultiRole") for connections up to 8 devices. TI intends to deliver Bluetooth version 4.2 core specification support, including LE Secure Connections, LE Privacy 1.2 & LE Data Length Extension, in early summer 2016 via a BLE-Stack SW update for CC2640.
On November 11, 2015, the Bluetooth SIG announced enhancements to Bluetooth low energy coming in 2016, including official support for Mesh Networks & faster data rates. Please see this post for more details on how the CC2640 platform is positioned to support these features once they are officially adopted.
Q: How do I port my CC254x application to CC2640
A: Most reference projects in the CC254x SDK have been ported to CC2640. Please refer to CC2640 BLE SW Developer’s Guide porting section for additional information on porting. Although most of the BLE-Stack APIs have remained the same, the amount of porting effort required will vary depending on the complexity of the existing application.
Q: How do I port my CC2640 CCS or IAR project to the latest BLE-Stack v2.x SDK?
A: A v2.x project porting guide is available on the BLE Wiki.
Q: How do I add UART or SPI to my application
A: Multiple options are available for adding serial communication to your Bluetooth low energy application. Refer to the TI BLE Wiki article: "CC2640 Serial Communication".
Q: How do I implement Over the Air Download (OAD) firmware upgrade for CC2640?
A: Currently, OAD to internal flash is supported with limitations on the size of the Application. An option has been added to BLE-Stack V2.1 to allow for OAD to external SPI flash memory. For more details on how to implement the OAD profile, please see the CC2640 BLE OAD User's Guide article on the TI BLE Wiki.
Q: How do I do a simultaneous Master & Slave (i.e., Peripheral & Central role) connection?
A: Refer to the TI BLE Wiki article: MultiRole with BLE 2.1.
Q: Where can I find the original Out of Box demo for the CC2650DK?
A: The hex file for the PER Test demo can be found in this post:
Q: Where do I find more information on the Sensor Controller Engine (SCE) and Sensor Controller Studio (SCS)?
A: Please see the Sensor Controller Studio (SCS) Frequently Asked Questions post.
Q: Are newer TI-RTOS releases compatible with an existing BLE-Stack SDK?
A: A particular TI BLE-Stack release is tested with the TI-RTOS release packaged with the BLE-Stack SDK installer as described in the release notes. Occasionally, TI may provide a porting guide to a newer TI-RTOS release for specific functionality enhancements (e.g., to use an updated driver), however, compatibly can only be assured for the TI-RTOS version listed in the release notes of the TI BLE-Stack. Therefore, use of a different TI-RTOS release should be considered experimental even when a porting guide is available.
Troubleshooting
Q: I'm unable to flash program CC2640 with topside marking: CC2640 128 IT 59I A90C G4
A: Please make sure you are using the latest version of SmartRF Flash Programmer 2 v1.7.x. The latest version can be downloaded from the "Tools & Software" tab on the main CC2640 or CC2650 product folder.
Q: When switching to the 5x5 package, UART crashes in my BLE-Stack v2.1.x project, such as when initializing NPI.
A: An issue exists in the TI-RTOS 2.13 CC2650EM_5XD board file with the placement of the uartCC26XXHWAttrs structure. Please make the following change in the 5XD board file, usually located at C:\ti\tirtos_simplelink_2_13_00_06\packages\ti\boards\SRF06EB\CC2650EM_5XD:
#pragma DATA_SECTION(uartCC26XXObjects, ".const:uartCC26XXObjects")
with:
#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
This issue has been corrected in subsequent TI-RTOS SDK releases for CC26xx.
Q: Why is my device in an infinite loop with "No source available for 0x1001bbd6"
A: This means you have encountered a CPU abort / exception, such as from accessing a non-existent memory address, using an incorrect PIN config, etc. For debugging this condition, i.e., finding what caused the CPU abort, see the "Deciphering CPU Exceptions" section in Ch 9 of the CC2640 BLE SW Developer’s Guide (SWRU393).
Q: My "out-of-the-box" BLE examples does not compile in IAR and I get an error saying "Variable expansion failed". What is wrong?
A: IAR sometimes fail to include the path variables for TI RTOS and CC26XXWARE and you need to import them again manually.
Goto Project->Configure Custom Argument Variables, Select Import and choose the corresponding variables file. Example location: Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\SimpleBlePeripheral.custom_argvars
Q: My CC-DEVPACK-DEBUGGER (DevPack Debugger / XDS110) does not detect the SensorTag in SmartRF Flash Programmer 2 v1.7.x+?
A: A firmware update may be required. Please install CCS according to the CC2640 BLE Software Developer’s Guide (SWRU393). CCS will detect if a firmware update is required when a Debug session is started. Open and build the SensorTag project, then program the SensorTag via the CCS Debugger. Remember to close SmartRF Flash Programmer 2.
Q: I’m getting a linker or post-build error with Boundary.exe when building the Stack project.
A: The Boundary tool is used to adjust the Stack flash / RAM boundary to the optimal value. These errors typically occur when the Stack configuration is modified such that RAM/Flash usage has changed.
Verify that your argument variables / path point to the location where Boundary.exe is installed. The default location: C:\Program Files (x86)\Texas Instruments\Boundary. If the tool is installed to a different path, the IDE will need to be updated:
IAR: Tools-> Configure Custom Argument Variables ->”CC26xx TI-RTOS” -> BOUNDARY
CCS: Stack Project Properties -> Build, “Steps” tab, “Post-build steps”.
Refer to Section “3.12 Configuration of RAM & Flash boundary using the Boundary Tool” in the CC2640 BLE Software Developer’s Guide (SWRU393) for details on how to resolve build errors generated by the Boundary tool or Linker.
Q: I get pre-build errors in IAR, and after clicking Tools->Options->Messages->Show all build messages, it looks something like this
gmake[1]: Entering directory `C:/ti/simplelink/ble_cc26xx_2_00_00_42893/Projects/ble/SimpleBLEPeripheral/CC26xx/IAR/Config/src/sysbios'
Preprocessing library source files ...
C:/Users/<user>/AppData/Local/Temp/make904-2.sh: 1: Syntax error: "(" unexpected
C:/Users/<user>/AppData/Local/Temp/make904-3.sh: 1: Syntax error: "(" unexpected
A: Your system has for whatever reason disabled 8.3 pathname aliases (e.g. PROGRA~2) for the path IAR is installed to. The only known working solution is currently to install IAR at e.g. C:\IAR\EWARM7401 or some other path without spaces or long names.
Q: I get "Resource temporarily unavailable" pre-build errors in the application project similar to this:
Creating the SYS/BIOS library that contains the APIs not included in the ROM ...
0 [main] sh 6420 sync_with_child: child 6332(0x19C) died before initialization with status code 0xC0000142
23 [main] sh 6420 sync_with_child: *** child state waiting for longjmp
C:/Users/username/AppData/Local/Temp/make6628-1.sh: fork: Resource temporarily unavailable
A: Most likely there is a conflict with sh.exe in the XDCTools installation with some other package you have installed. Please search for sh.exe in your system and disable the conflicting package(s). Additionally, file system tools, such as cygwin may cause conflicts with the XDCTools; these installation(s) should be disabled as well.
Q: I’m still getting build errors of some kind.
A: Please use the E2E Rich Formatting Option and attach your IAR or CCS build log. Note that for IAR, you must enable the build log: Tools -> Options -> Messages -> Log build messages to file. Please compress the file as needed.
[/mw_shl_code] |
|