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

tsk_lock causing a hard fault when called from an ISR

Hi,
I'm running RL-ARM and uVision4 4.14.4.0 on a Cortex-M3 (LM3S9B96)
I'm running several tasks and I want to temporarily disable them while a critical section of the code is running.
As far as I can tell (when I step through the code), tsk_lock( ) is causing a hard fault when called from an ISR.
I checked the documentation and did not see any restrictions.
Am I missing something?

khaled.

Parents
  • that task that is scheduled after timeout uses cpu resources that delays the servicing of the the critical ISR

    No, it quite certainly doesn't. What exactly do you think your CPU will be doing between the end of that first interrupt and the start of your "critical" ISR, if not run some code? What makes you believe that changing what it's doing in that time will have any effect whatsoever on how fast your critical ISR comes up?

    Or for that matter, why is that oh so critical stuff in an ISR? What's keeping you from just calling that critical code directly from the ISR you're already in?

    I still need to disable the tasks.

    No. You still think you need to do that, but I'm pretty sure you're wrong about that.

Reply
  • that task that is scheduled after timeout uses cpu resources that delays the servicing of the the critical ISR

    No, it quite certainly doesn't. What exactly do you think your CPU will be doing between the end of that first interrupt and the start of your "critical" ISR, if not run some code? What makes you believe that changing what it's doing in that time will have any effect whatsoever on how fast your critical ISR comes up?

    Or for that matter, why is that oh so critical stuff in an ISR? What's keeping you from just calling that critical code directly from the ISR you're already in?

    I still need to disable the tasks.

    No. You still think you need to do that, but I'm pretty sure you're wrong about that.

Children
No data