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.

LAUNCHXL-CC1352R1: Sensor controller cannot restart a task after the application successfully stops the task

Part Number: LAUNCHXL-CC1352R1

Hi team,

SDK:simplelink_cc13xx_cc26xx_sdk_6_10_00_29

Use the scifStopTasksNbl instruction in the application to successfully stop the sensor controller task. But when it stops, restarting the sensor controller task with the scifStartTasksNbl instruction of the application again fails.

/*
 *  ======== AccelProfile_enable ========
 */

bStatus_t AccelProfile_enable(void)
{
  bStatus_t status = SUCCESS;

  // Only enable if not already enabled
  if (!(scifGetActiveTaskIds() & (1 << SCIF_SPI_ACCELEROMETER_TASK_ID)))
  {
    // Start the "SPI Accelerometer" Sensor Controller task
    scifStartTasksNbl(1 << SCIF_SPI_ACCELEROMETER_TASK_ID);

    // Wait for sensor controller
    if (!(Semaphore_pend(Semaphore_handle(&semScReady), 500000 / Clock_tickPeriod)))
    {
      status = FAILURE;
    }
  }

  if (status == SUCCESS)
  {
      Log_info0("Sensor Controller Accelerometer enabled");
  }
  else
  {
     Log_error0("Sensor controller failed to enable");
  }

  return status;
}

/*
 *  ======== AccelProfile_disable ========
 */
bStatus_t AccelProfile_disable(void)
{
  bStatus_t status = SUCCESS;

  // Only disable if not already enabled
  if (scifGetActiveTaskIds() & (1 << SCIF_SPI_ACCELEROMETER_TASK_ID))
  {
    // Start the "SPI Accelerometer" Sensor Controller task
    scifStopTasksNbl(1 << SCIF_SPI_ACCELEROMETER_TASK_ID);

    // Wait for sensor controller
    if (!(Semaphore_pend(Semaphore_handle(&semScReady), 500000 / Clock_tickPeriod)))
    {
      status = FAILURE;
    }
  }

  if (status == SUCCESS)
  {
      Log_info0("Sensor Controller Accelerometer disabled");
  }
  else
  {
     Log_error0("Sensor controller failed to disable");
  }

  return status;
}

Could you help check this case? Thanks.

Best Regards,

Cherry