We have a new sample project called KeyFobDemo which can be found on the following Texas Instruments Wiki
The example comes with source and binaries and will demonstrate the following functionality.
These are implemented using GATT server profiles and the top level application. Note, these profiles are not yet aligned with Bluetooth SIG profile specifications and are provided only as an example. This demo uses the same libraries which were provided in the version 1.0 installation.
LPRF Wiki: http://processors.wiki.ti.com/index.php/Category:LPRF
Thank you for this new code.
I have a few question for the accelerometer part:
- Is the sample code enabling the 2g or 8g range ?
- Is there an example code to calculate the roll and tilt based on the CMA3000 accelerometer readings ?
The datasheet of CMA3000 provide very little info.
It states that the range is between -2g and +2g (or -8/+8g) and the sensitivity is 56 count per g for 2 g. Am I correct to assume that the -2g reading would be 0 and the +2g reading would be(4*56) -> 224 ? If that the case, why do I get reading up to 255 ?
- How to you get the 0g offset value ? (I could not find it in the datasheet)
The KeyFobDemo project enables the 2g range of the accelerometer.
More information on the accelerometer can be found on VTI's web site: http://www.vti.fi/en/products/accelerometers/consumer_electronics/cma3000_series/
Any inputs on my other questions ?
Hi, I compiled this demo project and the hex file was ~284KB. The included hex file
with this demo project is ~721KB. What's the difference? Should I able to flash the
hex file I produced? thanks
The reason that the hex files included with the installer differ in size from that generated using IAR is because the file with the installer was generated by using the “Read flash into hex file” option in SmartRF Flash Programmer on a device that was programmed using the “Debug” command in IAR. If you look at the hex file included with the installer you will notice a large section of it contains all “FFFFFFF…”. This is because the read-back function with save blank sections of flash in the hex file.
Thanks for the clarification. I was able to flash the modified version.
were you able to use the accelerometer readings? my understanding after reading the data sheet
is that the reported values are in 2's complement and requires further processing to get usable readings.
@Muthu - Did you have any luck running your build? While I can flash, I am finding varying degrees of instability in my own build that I do not find with the installer-provided hex file.
One guess as to why I'm having trouble - I have applied all the available IAR patches to 7.51A (through to 7.51M) to my workbench installaiton. From the descirptions of the patches, it seems all are essential, so this is just a guess.
What is the specific tool-set version and patch set applied in the released build of the demo?
Yes, it has been working fine. I have modified the demo project, bulit and flashed several times so far. No issues.
I've been using the keyfob to develop a demo (on windows) as well. No problems so far.
I'm using 7.60 (EW8051-EV-web-7601.exe) and installed only one patch (EW8051-7.60-4-EV.zip) that was specific to CC2540.
What were the instability issues you ran into?
Is support for IAR 7.60 official? The docs I have explicitly state otherwise, indicating support for 7.51A. Perhaps I need to pull forward to 7.60? Is there an official statement of support yet? If so, then do I also need to acquire fresh BLE stack libraries?
I'm not sure. I downloaded that version first and it worked. So, sticking to it.
Just install the 7.61 and overwrite the files with the content from the patch. Thats it...
quoting http://processors.wiki.ti.com/index.php/Category:KeyFobDemo#Proximity_Callback :
The functionality of the proximity profile is based on the Bluetooth SIG
draft document Proximity Use Case, Requirements, and Design Document
D05r06. Note that even though the profile functionality is based on a
Bluetooth SIG document, the UUID values that are used by the profile are
custom, and do not conform to any values defined by the Bluetooth SIG.
This is because the SIG has not yet assigned any UUID values for the
proximity profile. The functionality implemented on the keyfob is the
role of the “Proximity Reporter” as defined by the document. A mobile
phone or PC would typically implement the role of “Proximity Monitor”;
however this full functionality has not yet been implemented in the USB
Dongle software or BTool.
Is there an official data when this functionalities will be implemented?
There is official date as of yet; however a reasonable guess would be in the next few months.
In the CC2540 Keyfob reference design, can we use CR1220 coin cell battery with 220uF cap instead of CR2032 with 47uF cap?
Another question on keyfob reference design,
The CC2540 datasheet and BLE specification allows me to calculate the battery droop due to an RF interaction as 0.33 V maximum (use 24 mA for 3 mA and calculate maximum droop as I = C * dV / dt ignoring the battery’s contribution to the pulse load), but I cannot tell what will happen if I try to erase a Flash memory block to write new data (I do not know the current or time to erase a Flash block per the original question below). Ironically, I cannot even verify the Keyfob reference design through specifications because this data is lacking and does not allow me to verify the CR2032 battery is adequate
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.