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.

CC2640: Porting Project Zero from BLE Stack 2.2.0 to 2.2.1, and eventually the CC2640R2F

Part Number: CC2640

Hello,

I have the eventual goal of porting my application, based around project zero, to run on the CC2640R2F with the newest, BT5 ready stack. 

Right now my project runs with BLE Stack 2.2.0, so it seems I should make the incremental port to 2.2.1 before tackling the move to the CC2640R2F compatible stack.

I have read the porting guide many times through now, but they are not orientated towards ProjectZero. Despite this I've tried to find the common ground and port accordingly.

What I've done so far is create a new project zero from the newest simplelink academy (1.11), which should have BLE stack 2.2.1 as default. After doing this I copied my application files over, and modified my board files to incorporate the TRNGCC26XX_config that was missing. When I compile and run this, however, I get a HWI Exception on BIOS_start().

I suppose I was wondering, firstly, if I'm taking the correct approach, and secondly, if there's a more concise guide (or advice) on how to port project zero to 2.2.1 and onwards to work with BT5.

Thanks,

Craig

  • Hi Craig,

    There are always some pitfalls when porting between versions, and even more so between BLESTACK 2.x and BLESTACK 3.x. I would perhaps recommend that you use the Project Zero for CC2640R2 as a starting point.

    However, the application is not significantly changed from the one you are using, as the Project Zero linked above is still targeting BT 4.2. A bigger change can be found when going to Bluetooth 5-stack, since some of the GAP APIs have changed to accommodate the increased feature set. See Project Zero for CC2642 to see an example of how this was ported.

    Best regards,
    Aslak

  • Hi Aslak, thanks for your reply.

    Is there any sort of specific guide pertaining to porting project zero? I'd like to make sure I'm taking the correct steps, any know for sure what has to be done. Until then I am pretty stuck with why the is a HWI exception (specifically "Hard Fault: FORCED: BUSFAULT: IMPRECISERR"), and I don't know how to move forward.

    If it is at all possible to get to BLESTACK3.x from where I am now I think it would save me a significant amount of time (but probably not frustration) over starting from scratch.
  • Hi Craig,

    I don't believe we have a porting guide specifically for Project Zero. It used to be just a slightly more user friendly teaching companion. You could do a diff with the version in my first link above.

    IMPRECISERR is typically a write to something invalid (since writes are buffered, the exception happens asynchronously and is imprecise). The classic cause is stack overflow.

    If you don't mind debugging, have a look at the debugging part of the User's Guide. The link below is a newer version than you are using, but the basic concepts are still the same.

    dev.ti.com/.../cpu_exceptions.html

    Best regards,
    Aslak