why do we use isr functions with semaphores?

If you dig into the sources you‘ll see the difference between the normal vs. *FromISR API. There are a few more of those. It’s mainly an optimization to minimize execution time in ISRs (if supported by the MCU used) because ISRs should be kept as short as possible. Also the ISR (calling) context is different to normal task context and the *FromISR API takes care of this.
It’s an implementation detail – just follow the documented rules and you’ll be fine 🙂

Basically software timers are used to support a couple/many timers using a single HW timer. Often software needs a number of simultaneously running timers e.g. to trigger a number of periodic jobs/actions with differing periods, but HW resources (timers) are limited. This also applies to the FreeRTOS timer feature using the FreeRTOS systick which usually runs anyway.

Interrupts in general are a different thing. They’re a way how peripheral HW can interact with an connected processor where an application is running. Well, for instance a HW timer configured accordingly fires up an (HW) interrupt to trigger a software via an ISR to do something on that event.

See also the recommended and comprehensive FreeRTOS documentation.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top