TI中文支持网
TI专业的中文技术问题搜集分享网站

LAUNCHXL-CC1352R1: sensor controller在application成功stop task之後, 無法重新start task

Part Number:LAUNCHXL-CC1352R1

SDK:simplelink_cc13xx_cc26xx_sdk_6_10_00_29

在application用scifStopTasksNbl指令可以成功的停止 sensor controller task.

但是成功停止後, 要再用application的scifStartTasksNbl指令重啟sensor controller task就會失敗.

請問這要如何解決?

—————————————————————

/*
 *  ======== 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;
}

Cherry Zhou:

您好,我们已收到您的问题并升级到英文论坛寻求帮助,链接如下,如有答复将尽快回复您,谢谢!

e2e.ti.com/…/launchxl-cc1352r1-sensor-controller-cannot-restart-a-task-after-the-application-successfully-stops-the-task

赞(0)
未经允许不得转载:TI中文支持网 » LAUNCHXL-CC1352R1: sensor controller在application成功stop task之後, 無法重新start task
分享到: 更多 (0)