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.

CCS/CC2640R2F: Initializing I2C prevents advertisement of BLE characteristics and services

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hello,

We have a working project based on the off-chip OAD Simple Peripheral example, but as soon as we add a call to to I2C_init() in SimplePeripheral_init(), the device reports no services and characteristics when interrogated by LightBlue.  How do we debug this?

Patrick

  // ******************************************************************
  // NO STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
  // ******************************************************************
  // Register the current thread as an ICall dispatcher application
  // so that the application can send and receive messages.
  ICall_registerApp(&selfEntity, &syncEvent);

#ifdef USE_RCOSC
  RCOSC_enableCalibration();
#endif // USE_RCOSC

  /* Call driver init functions. */
  PWM_init();

  /* Open UART in "packet" mode, where framing is parsed and removed */
  /* before delivering to this module. */
  uScan_uartInitAndOpen(UART_PACKET_MODE, &SimplePeripheral_uartRxCb);

  // These calls to I2C_init and I2C_open will cause an empty-services error!
  I2C_init();
  i2cHandle = I2C_open(0, NULL);