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.

【6670】BCP协处理器的中断问题



在做的项目需要同时用到BCP和FFTC两组协处理器

FFTC接收BCP的输出数据进行DFT处理

那FFTC如何知道BCP已经完成数据处理并输出

BCP是否具有相应的中断机制?

  • 可以使用accumulator 但是目前我也没调好 总是收不到中断

  • 可以有很多种方法,比如使用QpendQ直接产生中断,或者使用Acc channel等。

  • 在配置 RX 通道时,rxCfg.bUseInterrupts = 1,确定使用的是中断输出。

    配置 accumlator:

    /* Setup High Priority Accumulation interrupt configuration for this Rx object */
    rxCfg.accumCfg.channel = ACC_CHANNEL_NUM;
    rxCfg.accumCfg.command = Qmss_AccCmd_ENABLE_CHANNEL;
    rxCfg.accumCfg.queueEnMask = 0;
    rxCfg.accumCfg.queMgrIndex = RX_Q_NUM;
    rxCfg.accumCfg.maxPageEntries = ACC_LIST_ENTRY_CNT + 1; // Add an extra entry for holding the entry count
    rxCfg.accumCfg.timerLoadCount = 0; // Disable pacing for now.
    rxCfg.accumCfg.interruptPacingMode = Qmss_AccPacingMode_NONE;
    rxCfg.accumCfg.listEntrySize = Qmss_AccEntrySize_REG_D;
    rxCfg.accumCfg.listCountMode = Qmss_AccCountMode_ENTRY_COUNT;
    rxCfg.accumCfg.multiQueueMode = Qmss_AccQueueMode_SINGLE_QUEUE;

    memset ((Void *)&gHiPriAccumList[0], 0, sizeof(gHiPriAccumList));
    rxCfg.accumCfg.listAddress = convert_coreLocalToGlobalAddr((UInt32)&gHiPriAccumList[0]);

    这里是中断服务:

    /* Register ISR handler for the BCP interrupt */
    register_rx_interrupts ();

    /* Create a Rx semaphore. Will be used for communication between Rx ISR and the current task. */
    hRxSem = (Void *)Semaphore_create (0, NULL, NULL);
    bIsAccPingListUsed = 0;

    等待中断信号量:

    Semaphore_pend (hRxSem, BIOS_WAIT_FOREVER);

    /* Disable interrupts while we are reading BCP output from the Rx software list. */

    key = Hwi_disable();

    但现在程序在运行到等待中断信号量 Semaphore_pend 的时候,就跑飞,这可能是什么问题?

    诚邀 TI 工程师帮助解答。