How to fix slow interrupt latency

Michael Fowler 131 Reputation points
2022-07-16T00:44:40.793+00:00

Hello,
I have written an ISR that calls tx_semaphore_put() to wake a thread that is waiting for the semaphore using tx_semaphore_get(). There is only the one thread on the system. It takes 5 micro seconds for the thread to begin running. This is too long. How do I ensure my high priority interrupts are handled in a timely manner? Thanks.

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
341 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Scott Azure RTOS 4,051 Reputation points
    2022-07-16T18:09:35.707+00:00

    This should take no more than 2 microseconds on a Cortex-M device running at 120MHz. What processor are you using and what is the processor clock speed?

    Are you doing anything in the ISR after putting the semaphore?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.