File size: 2,483 Bytes
4a33762
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  "ticketNumber" : "1035356",
  "reporterName" : "Joe Hsien",
  "rankPoints" : "220",
  "resolutionStatus" : "",
  "ticketName" : "TDA2EXEVM: TDA2 DSP2 XDC ASSERT",
  "rankName" : "Prodigy",
  "replies" : "",
  "views" : "",
  "queryText" : "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 ###",
  "imageList" : null,
  "partNumber" : "NA",
  "allResponseList" : [ {
    "contentId" : "",
    "userName" : "Joe Hsien",
    "rankPoints" : "220",
    "rankName" : "Prodigy",
    "date" : "",
    "userId" : "/members/5203556",
    "content" : "Have any update?",
    "imageList" : null
  }, {
    "contentId" : "",
    "userName" : "Stanley Liu",
    "rankPoints" : "50045",
    "rankName" : "TI__Guru",
    "date" : "",
    "userId" : "/members/22243",
    "content" : "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. /*\r\n *  ======== GateMutex_enter ========\r\n *  Returns FIRST_ENTER when it gets the gate, returns NESTED_ENTER\r\n *  on nested calls.\r\n *\r\n *  During startup, Task_self returns NULL.  So all calls to the \r\n *  GateMutex_enter look like it is a nested call, so nothing done.\r\n *  Then the leave's will do nothing either. \r\n */\r\nIArg GateMutex_enter(GateMutex_Object *obj)\r\n{\r\n    Semaphore_Handle sem;\r\n\r\n    /* make sure we're not calling from Hwi or Swi context */\r\n    Assert_isTrue(((BIOS_getThreadType() == BIOS_ThreadType_Task) ||\r\n                   (BIOS_getThreadType() == BIOS_ThreadType_Main)),\r\n                   GateMutex_A_badContext);\r\n\r\n    if (obj->owner != Task_self()) {\r\n        sem = GateMutex_Instance_State_sem(obj);\r\n        Semaphore_pend(sem, BIOS_WAIT_FOREVER);\r\n\r\n        obj->owner = Task_self();\r\n\r\n        return (FIRST_ENTER);\r\n    }\r\n\r\n    return (NESTED_ENTER);\r\n} Regards, Stanley",
    "imageList" : null
  } ],
  "tags" : [ ],
  "fourmType" : "processors-forum"
}