Do you use multithreading in embedded system programming

Status
Not open for further replies.
There are several ways to do this and several ways that might work. Over the years I have refined a "template" if you will that works for me and has been incorporated into several industrial applications were many things need to happen atomically and appear to happen in real time. In addition to The described method below in the link, I will typically create a "heartbeat" interrupt that simply increments a System Counter at a known interval. That way the Flow Chart nodes have a sense of elapsed time and can act accordingly if necessary. This by any means is not perfect and not an absolute way it should be done, but this method is easy to expand by simply adding a new State Machine to the system. Also because it is flow chart based, it is relatively easy to make changes to the Flow Chart when and if necessary.

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…