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.

关于vlfft例程中Hwi的使用问题,感谢大神指点

Other Parts Discussed in Thread: SYSBIOS

vlfft例程的线程中显示使用了硬件中断Hwi,但是我在cfgScript以及main.c程序中都没有找到对Hwi参数的配置,是没用到吗?
希望了解的大神们给予指点,感激不尽!
  • 一般都是在cfg文件中配置HWI vector与ISR函数的映射关系,你再仔细看看。

  • Andy Yin1您好,感谢您的回答。我再cfg文件中只找到了Hwi的声明,并未对硬件中断的参数进行配置,在主函数中也只配置了Task的参数,是否代表Hwi只有声明但并未使用?

  • cfgScript代码如下:

    var BIOS = xdc.useModule ("ti.sysbios.BIOS");
    var Task = xdc.useModule ("ti.sysbios.knl.Task");
    var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");
    var C64_Hwi = xdc.useModule ("ti.sysbios.family.c64p.Hwi");
    var Startup = xdc.useModule ("xdc.runtime.Startup");
    var System = xdc.useModule ("xdc.runtime.System");
    var Log = xdc.useModule ("xdc.runtime.Log");
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Cache = xdc.useModule('ti.sysbios.hal.Cache');
    var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');

    ECM.eventGroupHwiNum[0] = 7;
    ECM.eventGroupHwiNum[1] = 8;
    ECM.eventGroupHwiNum[2] = 9;
    ECM.eventGroupHwiNum[3] = 10;


    /* Shared Memory base address and length */
    var SHAREDMEM           = 0x0C000000;
    var SHAREDMEMSIZE       = 0x00200000;
    /*var SHAREDMEMSIZE     = 0x00200000;*/

    /*
     *  Since this is a single-image example, we don't (at build-time) which
     *  processor we're building for.  We therefore supply 'null'
     *  as the local procName and allow IPC to set the local procId at runtime.
     */
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);
                              
    /*
     *  The SysStd System provider is a good one to use for debugging
     *  but does not have the best performance. Use xdc.runtime.SysMin
     *  for better performance.
     */
    var System   = xdc.useModule('xdc.runtime.System');
    var SysStd   = xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy = SysStd;

    /* Modules explicitly used in the application */
    var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');
    var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
    var HeapBufMP   = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
    var MultiProc   = xdc.useModule('ti.sdo.utils.MultiProc');

    /* BIOS/XDC modules */
    var BIOS        = xdc.useModule('ti.sysbios.BIOS');
    BIOS.heapSize   = 0x8000;
    var Task        = xdc.useModule('ti.sysbios.knl.Task');

    /*var tsk0 = Task.create('&tsk0_func');*/
    /*tsk0.instance.name = "tsk0";*/

    /* Synchronize all processors (this will be done in Ipc_start) */
    Ipc.procSync = Ipc.ProcSync_ALL;

    /*  enable fast message Q */
    var MessageQ = xdc.module('ti.sdo.ipc.MessageQ');
    var Notify   = xdc.module('ti.sdo.ipc.Notify');
    Notify.SetupProxy   = xdc.module('ti.sdo.ipc.family.c647x.NotifyCircSetup');
    MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');

    /* data section */
    Program.sectMap[".internalMEM"]={runSegment: "L2SRAM_1"};
    Program.sectMap[".externalMEM"]={runSegment: "DDR_1"};
    Program.sectMap[".sharedMEM"]={runSegment: "MSMCSRAM_2"};
    /*Program.sectMap[".internalL1SRAMMEM"]={runSegment: "L1SRAM"};*/

    /*
     *  Need to define the shared region. The IPC modules use this
     *  to make portable pointers. All processors need to add this
     *  call with their base address of the shared memory region.
     *  If the processor cannot access the memory, do not add it.
     */
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    SharedRegion.setEntryMeta(0,
        { base: SHAREDMEM,
          len:  SHAREDMEMSIZE,
          ownerProcId: 0,
          isValid: true,
          name: "MSMC RAM",
        });

    /* Reset function initialize HW */
    var Reset = xdc.useModule("xdc.runtime.Reset");
    Reset.fxns[Reset.fxns.length++] = "&vlfft_system_reset";