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.

Differences between ble stacks implemented on CC2541 and CC2650.

Other Parts Discussed in Thread: CC2541, CC2650, CC2538

Hi,

I have some homebrew code (an OS that makes register level calls) that was taken and modified based on the CC2541 ble stack that I would like to run on the CC2650 processor and make calls to the CC2650 ble stack. I understand that this will be very difficult. Where can I go to specifically find the software differences between the two stacks and why this would be difficult, in case I wanted to pursue this or needed to explain it to someone else? (is there documentation specifically for the differences?) The feedback I have so far is: this will be very very difficult, less about how it would be difficult.

Thanks for all the help!

Code2e

  • Hi Code2e,

    To my knowledge there is not much documentation about the differences.

    The differences will be mainly in the low level functions. All of your upper layer will remain almost the same with very little necessary changes.
    There are big differences, but they can be overcome once you understand how everything works (I started from the CC2538 with FreeRTOS and managed to switch to TI-RTOS on the CC2650).

    The reason there are such big differences is because the radio register are not directly accessible. There is a separate M0 core on the CC2650 that handles all the radio functions. The good thing is that TI provide the stack which handles all the functions to control the radio through the mailbox system.
    The second difference is that TI decided to separate the application image from the functions that control the radio. This will be the difficult part in the migration process.

    If you do not need to change anything in the stack itself (you just need it to work), then it should be manageable. On the other hand, if you need to make custom changes to the stack itself, then you will most likely struggle.
    The only way to access the radio registers is through indirect calls on the IC (this is managed by the BLE stack image). I did not have to make any changes, so I don't know what it would involve.

    Here is what I learned from working with the CC2650 (I used the TI-MAC stack, but the BLE project is not much different):
    All calls to the BLE stack image are done through ICall. ICall adds a layer so you don't really have to think how to call the radio functions. This is going to be your biggest challenge (understanding ICall).

    ICall will create a task to manages the callbacks for its functions.
    This is what ICall_createRemoteTasks does.

    Any of your TI-RTOS tasks that needs to access radio functions will have to regsiter itself with ICall.
    This is what ICall_registerApp does.
    Any new task that needs to be registered will require 1KB of RAM for its stack. If you are limited in RAM, it's preferable to have one task registered with ICall and all the other tasks communicate through that task (ex: Using Mailbox_post and pend)

    I never got an explanation, but ICall_registerApp and ICall_createRemoteTasks needs to be called from within the task that will communicate with ICall.

    We used for radio access only. We avoided using it for any other application related functions (ex: malloc) to properly manage the memory. We quickly run out of RAM as our project grew since the CC2650 does not have much RAM.

    Hope this helps.
    Michel
  • This helps immensely and is exactly what I was asking for. Not being able to access the radio registers was something that felt fishy but I couldn't put my finger on exactly why until you mentioned it. They skip talking about it pretty much completely in the User's Guide. If I choose to go this route, you can guarantee that I'll ask some more questions :)

    Thank you so much!

    Code2e
  • I'm happy this clarified your questions.

    If you do choose this route, I recommend that you start from the sample application so you understand how it works.
    The TI-MAC stack example implemented buttons and LED in one single task. I removed those functions and placed them in separate tasks. I kept only the core radio functions and that's when I started seeing the resemblance between the two stacks.

    Once you have that, the rest will be easy.

    Good luck
    Michel