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.

SIMPLELINK-CC2640R2-SDK: cc2640R2 bim_var

Part Number: SIMPLELINK-CC2640R2-SDK


I just got the CC2640R2 Launchpad and trying the on-chip OAD example.

I am using the TI programmer to load all binary and it start into "Persistent Application" as expected.

Now I want BIM start in User Application by default.

- Adding _bim_var = 0x0101;   in main() of bim_main.c and reload project.

But BIM still loading the "Persistent Application"

Anything, I had missed ?

  • If I followed the Doc procedures 100% for on-chip OAD, I got User App started after OAD only.
    As I tried for other procedures but would not work.

    1. If not using "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_oad_merged.hex" but using "simple_peripheral_cc2640r2lp_oad_onchip_stack_FlashROM.hex" &
    "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM.hex"
    The BTool - OAD would not able to start (missing handle)

    2. If not using OAD to load the "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_oad.bin",
    changing the _bim_var = 0x0101 in BIM did not start User App.
  • Hi Dilbert,

    _bim_var is a variable that is supposed to be in a retained area of RAM between soft resets. For the BIM, it is supposed to have the value of whatever it was last set to by one of the applications (in the example case, it is set in persistent app). This is what fundamentally allows a new application to be able to run after you have done an update. I would be concerned if you are writing to the _bim_var from within main() of the BIM project, because that would then mean that you will always overwrite whatever the previous application was trying to pass using this persistent variable - basically defeating the purpose of it being in the retained area of RAM. It would mean you always jump to the same image, rather than being able to jump to a new image after a load.

    I think that rather what you should do is that whatever application you want to be the "default image" or the "factory image" that you would be programming into the part at production rather than what's getting loaded after update, you should model after the configuration of Persistent Application since that is the one meant to run by default.

    In general for developing with OAD, there is a simpleLink Academy module for the CC26X2 on adding OAD to an existing project that could be useful for you: dev.ti.com/.../ble_enhanced_oad.html Task 3 Adding OAD to Multi Role would be a key one to look at. Note that this is for the CC26x2 so the instructions may not 100% what you need for CC2640R2, but I think that they would give you something very close and still be a good guide. Task 4 Advanced OAD Debugging should also be really useful for how to debug things going on in the BIM.

    I hope that this helps.

    Regards,
    Katie