arjun.a
embed files
325bfe1
raw
history blame
1.71 kB
Ticket Name: TDA2EXEVM: TDA2 DSP2 XDC ASSERT
Query Text:
Part Number: TDA2EXEVM Other Parts Discussed in Thread: SYSBIOS We run our algorithm on DSP2. Sometimes DSP2 will have XDC Assert message and then DSP2 will crash. How can we solve it? Log: [DSP2 ] 11173.232111 s: ### XDC ASSERT - ERROR CALLBACK START ### [DSP2 ] 11173.232141 s: [DSP2 ] 11173.232202 s: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details. [DSP2 ] 11173.232233 s: [DSP2 ] 11173.232233 s: ### XDC ASSERT - ERROR CALLBACK END ###
Responses:
Have any update?
Hi, Please refer to BIOS API doc for GateMutex. Or, you can find the source under ~/bios_6_46_06_00/packages/ti/sysbios/gates/GateMutex.c. You are hitting the below error where GateMutex_enter() is called in HWI or SWI context. /*
* ======== GateMutex_enter ========
* Returns FIRST_ENTER when it gets the gate, returns NESTED_ENTER
* on nested calls.
*
* During startup, Task_self returns NULL. So all calls to the
* GateMutex_enter look like it is a nested call, so nothing done.
* Then the leave's will do nothing either.
*/
IArg GateMutex_enter(GateMutex_Object *obj)
{
Semaphore_Handle sem;
/* make sure we're not calling from Hwi or Swi context */
Assert_isTrue(((BIOS_getThreadType() == BIOS_ThreadType_Task) ||
(BIOS_getThreadType() == BIOS_ThreadType_Main)),
GateMutex_A_badContext);
if (obj->owner != Task_self()) {
sem = GateMutex_Instance_State_sem(obj);
Semaphore_pend(sem, BIOS_WAIT_FOREVER);
obj->owner = Task_self();
return (FIRST_ENTER);
}
return (NESTED_ENTER);
} Regards, Stanley