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.

CC2640R2F: Bond manager requirement for OAD?

Part Number: CC2640R2F
Other Parts Discussed in Thread: UNIFLASH

Hi,

I am building a project based on the default OAD onchip example (simple_peripheral_cc2640r2lp_oad_onchip from SDK 3.40). I would like to disable the bond manager in order to free up some Flash space but when I do this the application fails to boot. The process is easily repeatable:

  1. Add the example projects to the workspace 
  2. Compile the *_unsecure version following the steps described in the BLE stack documentation and load on the LaunchXL.
  3. Application starts as identified by a BLE scanner
  4. Comment out the -DGAP_BOND_MGR define in build_config.opt of the stack project.
  5. Rebuild and load the projects in the same order as 2 above
  6. Application fails to start (nothing appearing on BLE scan)

I have seen other posts on this forum mentioning disabling the bond manager as a method of freeing space for the OAD application, so is there something else I need to do to get this to work?

Best Regards,

Jamie

  • Hi,

    The GAP Bond Manager is not required for OAD.

    The issue you are describing reminds me this one.

    Regards,

  • Hi Clément,

    Thanks for the reply. I had seen the post you linked to and added PAGE_ALIGN to the app, stack, and persistent apps, but unfortunately this didn't make any difference. As an aside it is strange that PAGE_ALIGN is not set by default in the simple_peripheral_cc2640r2lp_oad_onchip project but it works fine out of the box. Any other ideas?

    Regards,

    Jamie

  • Hi Jamie,

    As you removed the bond manager, did you also removed the call to the function GAPBondMgr_Register()? (Note: You will find in the BLE5 User's Guide a guide explaining how to remove the pairing capabilities of your example - this guide is in Developing a Custom Application > Optimizing Bluetooth Low Energy Stack Memory Usage > Decrease flash consumption of the examples project)

    If this does not solve the issue, try to step by step in the code to identify which function is making the code to crash.

    Kind regards,

  • Hi Clément,

    I tried removing that call but it made no difference unfortunately. I did find out what the issue was however: the application project wasn't being overwritten in flash. When the bond-manager was disabled, the code size of the stack project changed; this was successfully written through CCS. Presumably due to flash write permissions, the application pointing to the new stack did not get written via UniFlash so the old resident application was trying to call stack functions at incorrect locations and crashing. The remedy was to manually erase the entire flash prior to writing any of the projects. Maybe this is something that should be done as a matter of course but I haven't needed to do this to date.

    Thanks for the help anyway,

    Jamie