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.

Notify Error

Hi

I am using EVM6678. In my application I have 8 cores running and the synchronization between processors is done by IPC.Notify(The master processor sends out notify to the other 7 processors). In the notify call back function, I am posting a semaphore to unblock a task in that processor. The execution terminates in all the slave processors after exiting out of the call back function. It returns a message saying "A bad calling context: should call from a task." I am doing nothing in the callback function except posting the semaphore.

Any ideas on what could be wrong?

Srikanth

  • Srikanth,

    Are you sure that is all you are doing?  Are you by chance calling System_printf()?

    The most likely cause of the problem is that, some code is entering a GateMutex() from a Swi or Hwi thread.

    Judah

  • Hi Srikanth,

    Can you post the complete output message? The beginning part of the assertion failure message points to the exact file and line number where the failure occurs.

    Best,

    Ashish

  • Judah & Ashish 

    Thank you for your response, I was actually calling cache invalidate ALL after the task was unblocked by the semaphore in the question was posted. This was resulting in the error. However I still do not know the reasons for this: when I invalidated only those address lines modified by the program the error is cleared.

    Srikanth

  • Srikanth,

    You should not be calling Cache Invalidate ALL (This API is to be used with GREAT caution).  This is probably killing your program.  Blindly doing a Cache Invalidate All may corrupt your stack and other stuff.

    My first question is why are you calling Cache Invalidate All in the first place.  What are you trying to invalidate?

    I think you need to stick to your second comment of invalidating only those address lines modified by the program if you still need to do a cache invalidate.

    Judah