![]() You may want to look into using a DMA to collect new data while giving the CPU more time (by not preempting it with a Hwi/Swi) to process existing data. When your data buffer has been filled a Semaphore_post() can be used to synchronize your data processing within a Task(), or a Swi_post() if this is done within a Swi. If C.P.U and I/O devices are nearly same at speed, the buffering helps in making the C.P.U and the I/O devices work at full speed in such a way that C.P.U. You may have to guard your critical sections shared with a Hwi with Hwi_disable() and Hwi_restore() calls. In either case, a Swi or Task will resume execution where it left off at the time of preemption. Like Hwi's, Swi's use the system stack.īlocking on RTOS primitives is only permissible in a context of a Task.A Swi will run multiple times (for every Swi_inc()) if you call Swi_inc(). ![]() A Swi will run only once if multiple Swi_post()'s were called.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |