ciaa / firmware_v1

Firmware de la CIAA
http://www.proyecto-ciaa.com.ar
125 stars 120 forks source link

Not possible to have infinite loops in Autostart non cyclic Tasks? #363

Closed ajithpadman closed 8 years ago

ajithpadman commented 8 years ago

I would like to know if it is possible to have Infinite While loop inside the Autostart tasks (which is not a cyclic task)which are supposed to be terminated after activating the other cyclic tasks? Currently when I tried it the other cyclic tasks not at all getting scheduled. Is there a way of doing this?

ajithpadman commented 8 years ago

Or in more General Terms Is it possible to call the Scheduler explicitly without Terminating the Task? I want the autostart non cyclic task to run as a background task.

mcerdeiro commented 8 years ago

Hello Ajith,

we have an implementation of OSEK-VDX OS and not an AUTOSAR-OS.

You can call the scheduler from a non preemptive task, the interface is called Schedule.

From a full preemptive you dont have to do anything, the scheduler will activate tasks with higher prio automatically.

So you can configure a low prio task full schedule and perform a while 1 and never end.

Personally I would not recommend such scheduling but it can be done. While in while 1 the RTOS will never go to halt mode and consume a lot of current all the time. You can never stop such task. Better is to have a ciclic task or chain task at the end of a task to itself if needed.

Regards Mariano

On Thu, Oct 15, 2015 at 10:52 AM, Ajith Padman notifications@github.com wrote:

Or in more General Terms Is it possible to call the Scheduler explicitly without Terminating the Task? I want the autostart non cyclic task to run as a background task.

— Reply to this email directly or view it on GitHub.