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.

CC1312R: 小核无法唤醒大核问题

Part Number: CC1312R

小核内程序fwGenQuickAlertInterrupt();

大核内程序void scTaskAlertCallback(void)
{
Semaphore_post(Semaphore_handle(&semScTaskAlert));
// Clear the ALERT interrupt source
scifClearAlertIntSource();
}

void sensor_controller_init(uint8_t num)
{
//Initialize the AcquisitionInt
scifTaskData.temSensor.cfg.threshold = num;
// Initialize the Sensor Controller
scifOsalInit();
scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
scifInit(&scifDriverSetup);
scifStartRtcTicksNow(0x00010000);
scifStartTasksNbl((1 << SCIF_TEM_SENSOR_TASK_ID));
}

Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);//

  • 我已咨询相关工程师,这需要一些时间,感谢您的耐心。

  • 这是传感器控制器代码。请您指出您从哪里获得 fwGenAlertInterrupt ?

    我需要知道系统CPU上运行的应用程序代码是什么。你怎么知道它没有唤醒系统CPU?

  • 第一,小核里面产生事件fwGenQuickAlertInterrupt();大核应用程序,中断回调

    void scTaskAlertCallback(void)
    {
    Semaphore_post(Semaphore_handle(&semScTaskAlert));
    // Clear the ALERT interrupt source
    scifClearAlertIntSource();
    },然后产生事件使得Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);解除阻滞。从而大核运行应用程序。您问我怎么知道大核没有被唤醒的,这个我肯定是应用程序有相关提示啊,比如LED的亮灭,或者小无线发出一条数据,我判断有没有唤醒的方式有很多啊。

    如果您需要知道大核的应用程序简单说来就是一个GPIO的电瓶转换

    RF_Params rfParams;
    RF_Params_init(&rfParams);
    sleep(5);

    GPIO_setConfig(20, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);

    GPIO_write(20, CONFIG_GPIO_LED_ON);
    GPIO_setConfig(20, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);

    GPIO_write(20, CONFIG_GPIO_LED_ON);

    RF_cmdPropTx_497_8.pktLen = PAYLOAD_LENGTH;
    RF_cmdPropTx_497_8.pPkt = &TxPacket_data.sign_Addr;
    RF_cmdPropTx_497_8.startTrigger.triggerType = TRIG_NOW;

    /* Request access to the radio */
    #if defined(DeviceFamily_CC26X0R2)
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioSetup, &rfParams);
    #else
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup_497_8, &rfParams);
    #endif// DeviceFamily_CC26X0R2

    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs_497_8, RF_PriorityNormal, NULL, 0);
    //SendframeInit(&sendframecounter);

    sensor_controller_init(COLLECT_TIMER);


    while(1)
    {
    Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);//

    GPIO_toggle(20);
    scifAckAlertEvents();

    }

  • 已经跟进您的问题,有消息立即回复您。

  • 需要在传感器控制器任务代码中调用fwGenQuickAlertInterrupt()。 但假设您已经这样做了。

    您测试一下传感器控制器任务中使用了fwGenAlertInterrupt(),代码是否有效?它们的描述和处理方式似乎有所不同。

  • fwGenQuickAlertInterrupt(),fwGenAlertInterrupt()这两个函数都已经尝试过了,结果都一样

  • 好的,已经跟进您的问题。

  • Hi zjj12138,

    https://dev.ti.com/tirex/explore/node?node=A__AddniPdrlDWP1siaPICBSw__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST

    您可以按照此处的教程进行操作,以确保按照预期遵循了所有内容。

    您还可以检查 LED Blinker 示例,了解如何 使用 fwGenAlertInterrupt() 唤醒系统 CPU。