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: How to enable simpleprofile when define FEATURE_OAD_ONCHIP

Part Number: CC2640R2F

Dear TI Expert,

One of my customer is debugging ON_CHIP OAD with CC2640R2F Lauchpad + BLE STACK---c2640r2_sdk_1_30_00_25.

I found in simple_peripheral_oad_onchip demo, when define FEATURE_OAD_ONCHIP, simpleprofile is disabled .   Is this because flashsize limited?

To enable Simpleprofile, we removed all FEATURE_OAD_ONCHIP in simple_peripheral.c.  Is this the right process to enable Simpleprofile with keeping the on-chip OAD function   ?

We found that when removed FEATURE_OAD_ONCHIP ,    SIMPLEPROFILE_CHAR4 cann't nofily when it's value changed in below PeriodicTask. But Everything is all right if we do it in another non-Periodic function.

SimpleBLEPeripheral_performPeriodicTask is running normally every 500ms as we set , we can success R/W to SIMPLEPROFILE_CHAR3, only SIMPLEPROFILE_CHAR4's notification failed.

Do you have any suggestion for this case? Thanks a lot.

 

if (events & SBP_PERIODIC_EVT)------>SimpleBLEPeripheral_performPeriodicTask----->

static void SimpleBLEPeripheral_performPeriodicTask(void)
{
  uint8_t valueToCopy;

  // Call to retrieve the value of the third characteristic in the profile
  if (SimpleProfile_GetParameter(SIMPLEPROFILE_CHAR3, &valueToCopy) == SUCCESS)
  {
    // Call to set that value of the fourth characteristic in the profile.
    // Note that if notifications of the fourth characteristic have been
    // enabled by a GATT client device, then a notification will be sent
    // every time this function is called.
    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof(uint8_t),
                               &valueToCopy);
  }
}

  • Did you enable notification first?
  • Hi Bruce,

    Regarding the removal of Simple_profile when onchip oad is defined - yes it was due to flash savings. On R2F, you'll probably be fine, this project was ported from R1, where oad onchip was significantly more flash constrained,

    Regarding the second point, as Christin mentioned - did you enable notifications? (A sniffer log would show this)

    Regards,

    Rebel

  • Dear Rebel and Christin ,
    Thanks for your support. Yes, notifications is enabled. And notifications is OK when customer put it in a non-Periodic task. But notifications failed every time in periodic event --- SBP_PERIODIC_EVT( every 500ms). And they found RTOS missed periodic event occasionally. Do you have any advice for this ? thanks a lot.
  • Hi Bruce,

    Check if SBP_ALL_EVENTS contains SBP_PERIODIC_EVT - it's possible the event post isn't being reached;

    Use a breakpoint to double check - otherwise we will probably need a sniffer capture to checkout what's going on.

    Regards,

    Rebel

  • Dear Rebel,
    When disable several timer, problem solved, seems they have used too many timers and influence the notification. Thanks for your help.