move code from interrupt context to task context

Catalin Demergian demergian at gmail.com
Tue Aug 20 12:49:43 UTC 2019


Hello,
The context is RTEMS-4.11.3 on STM32H7.
I have a timer interrupt routine and I'm calling some functions from it.
I would like to write a RTEMS task (rtems_task_create API) and call those
functions from that thread instead of calling them from interrupt context.

Of course, I have to call them periodically (say at 1 msec or a few msecs).
Any guidance how can I achieve that ?

I was thinking about registering a callback that the OS should call for me
a few msecs
later, but isn't that the same thing ? I guess the OS finds when the time
elapsed with
the help of the HW and calls my callback from an ISR .. am I right ?
Or if I call some wait functions in my loop and sleep for a few msesc, can
I be sure
that it sleeps 3 mesc instead of a little more based on other existing
tasks ?
So, how can I do this with a good precision?

regards,
Catalin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190820/c0a336b9/attachment.html>


More information about the users mailing list