• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Bluetooth® Low Energy & ANT Forum » (CC2540) I need skeleton code without BLE Stack.
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

(CC2540) I need skeleton code without BLE Stack.

(CC2540) I need skeleton code without BLE Stack.

This question is not answered
Yong-gil Hamm
Posted by Yong-gil Hamm
on Jan 10 2012 04:32 AM
Prodigy40 points

I'm using cc2540 as mcu. But I feel ble stack is really complicate for me to use, because i don't using ble stack, yet.

Of course OSAL is good, but almost of things are compated with the keyfob device.

So I tried to remove ble stack stuffs, but i couldn't optimize OSAL.

And as i know, sleep timer uses ll timer that is contained in ble stack library.

ble stack is so hugh package for me. and it seizes almost of my code size.

please someone send me skeleton code with sleep timer?

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • kazola
    Posted by kazola
    on Jan 10 2012 15:20 PM
    Guru10665 points

    I do not understand what you want.



    Please click the     Verify Answer     button on a post if it answers your question! :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yong-gil Hamm
    Posted by Yong-gil Hamm
    on Jan 10 2012 17:41 PM
    Prodigy40 points

    I mean I want to use CC2540 only for computing unit. (Sleep Timer, ADC, UART only)

    Thus the code that is provided from btool(including OSAL) is too huge package for me.

    What I want is only function code.

    Sorry for my bad English.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • kazola
    Posted by kazola
    on Jan 11 2012 00:54 AM
    Guru10665 points

    Anyway I'm not English, the problem was not about the language but the question's content ;) You do not have to verify the question till it is answered ;)

    The core of the CC2540 is a 8051 processor. Perhaps you could arrange a main() of a sample program of the TI stack to not act as a BLE device but I really do not get the point of this approach. What are you trying to do? If you need a plattform with a microcontroller, you can try, for example, Arduino or Teensy. They are much easy to manage and are not bonded to IAR or BLE and the GPIO pins are easier to access :)



    Please click the     Verify Answer     button on a post if it answers your question! :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Seso
    Posted by Seso
    on Jan 13 2012 06:29 AM
    Prodigy140 points

    For example, a working base could look like this one:

    #include "ioCC2540.h"
    #include "hal_adc.h"
    #include "hal_adc.c"

    volatile uint16 result [200];


    int main( void )
    {

      volatile int i = 0;

      CLKCONCMD  = (0 << 6);  // XOSC
      CLKCONCMD |= (0x0<<5);  // Tick 32 MHz
      CLKCONCMD |= (0x0<<2);  // CLK-Speed 32 MHz    


      HalAdcInit(); // Initialize the ADC
     
      HalAdcSetReference((uint8)HAL_ADC_REF_AVDD); // Reference is taken from AVDD-Pin
     
      while(1)
      {
         result[i++] = HalAdcRead((uint8)0, (uint8)HAL_ADC_RESOLUTION_14);
         
         if(i == 199)
           i = 0;
      }
     
     return 0;
    }

    This piece of code fills an array with adc-samples of channel 0 in a loop, again and again.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • kazola
    Posted by kazola
    on Jan 16 2012 12:03 PM
    Guru10665 points

    I've tested code examples with only timer functionality. Any BLE-related thing was there.

    As long as you deal with the power management issue, do whatever you want as in a 8051.



    Please click the     Verify Answer     button on a post if it answers your question! :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

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.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use