You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at using timers, but had some trouble with the actual usage since I'm unsure what I can safely do in the callback function. I tried to call a log function, but it just seemed to not do anything, but if I e.g. set a global variable I can see that my code is called.
You are right, timers are called from interrupt context and should generally only call functions suffixed with _isr. Usually the timer callback writes and event to an event channel, and a thread read this event and acts on it.
I'll have a look at the documentation and improve it where necessary.
I'm looking at using timers, but had some trouble with the actual usage since I'm unsure what I can safely do in the callback function. I tried to call a log function, but it just seemed to not do anything, but if I e.g. set a global variable I can see that my code is called.
Reading http://simba-os.readthedocs.io/en/latest/library-reference/kernel/timer.html it says the callback is 'Called from interrupt context' - but I haven't seen any documentation of what that means, but I suspect it limits what I can safely do.
So, it would be very useful to have some docs about what it means to run in interrupt context, or if it already exists making it more visible.
The text was updated successfully, but these errors were encountered: