This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Call SWI functions from a FIQ Handler using RTX

Hello to all!

Is possible to make a call to a SWI routine from a FIQ Handler when you are using the RTX Kernel?

I try this approach but a UNDEFINED exception occurs on exit of SWI function. See the code below:

void FIQCapture (void) __irq
{
  static U32 ticksCounter = 0;

  ticksCounter++;
  if (ticksCounter > ((U32) 5))
  {
    // Call freqMsrSignal in Fast Interrupt Mode
    freqMsrSignal(0x0001, &taskMeasureLoop);
    ticksCounter = 0;
  }
  // Match 0 asserted. Clear.
  T0IR    = 1 << 0;
}

void __swi(8) freqMsrSignal(U16 event_flags, OS_TID *task);
void __SWI_8               (U16 event_flags, OS_TID *task)
{
  // Increment the SWI_Times in Supervisor Mode
  SWI_Times++;
  // Call a RTX function in Supervisor Mode
  os_evt_set(event_flags, *task);
  /// The context switch was: User->FIQ->Supervisor
  return;
}

With this manner, I can call OS Functions from a FIQ Handler, my goal.

However, after run freqMsrSignal the system are switch to Undefined context

Undef_Handler   B       Undef_Handler

The code run the branch above (in a endless loop).

I use the uVision 3.50. Any suggestions?

0