This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OSAL Design/Architecture

Other Parts Discussed in Thread: CC2541, CC2540

Hello

I am using the CC2540DK MINI (development board), in particular the KeyFob.

-1- Can someone point out where to get design documents (diagrams, statecharts, sequence diagrams, code flow, etc) that can help someone noob like myself in understanding the architecture of the OSAL (+ application, +events, etc) and how to use it.

-2- Is the architecture based on some specific OS level? 

-3- <to reader> What (how painless/painful) have been your experience in learning where you were able to modify (add new features, make changes, etc). How long did it take you where you became comfortable in doing so?

Code reading for me (which I have been doing for couple of days now) is somehow slow; especially when no scope-level naming convention are followed (example. s_ for static functions, g_ for global functions).  I find that there are way too many global variables scattered all over the code files across components.

FYI: I have already went through API documentations for OSAL & HAL, Software development. But I find it hard too understand applications code flow + OSAL + Events, etc.  

Any help is greatly appreciated. Thanks in advance

Laith

PS: This is my first time using TI products + Bluetooth technology. My experience level is 7 years development embedded systems for automotive parts + few years using C# .NET, ASP.NET, Relational & OO databases.

  • If you start trying some modifications and see code examples in this forum, I think in two months you'll be comfortable enough with all the concepts to be able to implement most of the changes you can think of.

    The most difficult part, for me, was to understand the way TI layerizes the various parts of an application. But some day you realize that the 90% code you'll need is in the forums, in the examples, and all you will ever need to implement will be done at application and ATT layer, with very few code at hardware or OSAL / events layer.

  • Hello,

    Kazola has good points.  I would also recommend starting off by flashing and running the examples included in the installation like simpleBLEPeripheral, keyFobDemo, and heartRate.  Btool will display the messages between the two devices, and once you grasp these a bit, then I'd jump into the code.  Especially try to understand the GATT table concept and how variable are set and read.

    BR,

    -Greg

  • GregS & kazola

    Thank you both for your feedback, at least I know the efforts needed.

    GregS - <you said> GATT table concept and how variable are set and read
    >> are you talking about identifiers of this type "static gattAttribute_t  xxx[] =" ???
    kazola - <you said> ATT layer
    >> are you talking about att.h file and the usage of the declarations inside that file ???
    
    
    Please provide any additional details that you see fit.
    thanks
    Laith
  • ATT & GATT are both commented on the software developer's guide.

    I'm talking about GATT attributes, services and the way Client & Server can communicate (indications, notifications, write, send...). Once you understand one of them, it is fairly easy :)

  • Hello TI Employees and other Devs,

    I am part of a team using the CC2541 EM R1.1 and CC2541 Mini Development Kit. We are trying to figure out the OSAL before we can tackle the BLE stack. So far our Library of TI Documentation for the OSAL includes:

    • SWRU271D Texas Instruments CC2540/41 Bluetooth Low Energy Software Developers Guide v1.3
    • SWRA194 OS Abstraction Layer Application Programming Interface
    • SWRA193 HAL Drivers Application Programming Interface
    We are also looking for better information to understand code flow, events, OSAL state diagrams and hardware resource used (timers needed by the OSAL, RAM used etc). Are there any other documents that Devs or TI employees could recommend to better understand and come to terms with the OSAL and as a separate matter the BLE Stack?
    This is also my first time using Bluetooth, I have had a little experience with RtOSs and many years experience in Embedded C. The CC2541 is a fun little chip to program, quite easy to use and manipulate. The using OSAL is a much more difficult task.
    I have seen in the forums that the only method to create new OSAL projects using the BLE stack for the CC254x is to modify an existing project. This is a viable work around, but is not a long term solution. It would be great if TI could provide a blank project template or instructions to create OSAL projects to assist Devs who are working with the OSAL and BLE stack. TI could also assist Devs by providing projects to introduce features and functions of the OSAL (task creation, execution, order manipulation etc). Are there  projects available to demonstrate the OSAL purely as an operating system?
    I'm also aware the OSAL is not an RtOS (SWRU271D says so), but has anyone had any success in making it perform hard-real time tasks? As an example could I use an ISR to periodically interrupt any other task (even BLE stack) and make an ADC acquisition. This would be stored into a FIFO and be manipulated and dealt with by tasks which are less important than BLE stack tasks when there is OS time available. Has anyone tried this?
    Regards,
    Morgan