Other Parts Discussed in Thread: SYSBIOS
Hi,
i want to post a semaphore via a HWI to wake the Task waiting for the completion of an EDMA request.
I came to the following cfg code, but this results in a linker error, indication that Semaphore_post cannot be resolved.
This is most likely, because the argument of Semaphore_post is not an uint32_t.
Is there an other method to post the Semaphore without writing an own ISR posting the Semaphore?
Thanks for your help,
Sebastian
Here the cfg code:
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
var semaphore0Params = new Semaphore.Params();
semaphore0Params.instance.name = "sem_aif_edma_completion";
semaphore0Params.mode = Semaphore.Mode_BINARY;
Program.global.sem_aif_edma_c2_completion = Semaphore.create(null, semaphore0Params);
/* Transfer completion ISR */
CpIntc.sysInts[24].fxn = '&Semaphore_post'; //function pointer to the HWI function
CpIntc.sysInts[24].arg = Program.global.sem_aif_edma_c2_completion; //argument to the HWI function
CpIntc.sysInts[24].hostInt = 8;
CpIntc.sysInts[24].enable = true; //enable interrupt at startup
/* Transfer completion ISRs */
CpIntc.mapHostIntToHwiMeta(8, 4);