421
µTasker general / Re: Starting/stoping/continuing task...
« on: September 09, 2007, 07:37:44 AM »
Hi mark,
Thanks for the reply.
The reason I need this , every 10 mins, I have to take 20 serial readings from an instrument through the uart. I have an interupt from a rtc (DS1337) every second , and when reaches 10 minutes the task is woken up from the IRQ (I am not using the internal RTC, for other reasons). When woken, the task will take one sample, then the next time the task is processed, it will take the next reading, and so on. When all 20 has been read, the task itself will be placed back into stop mode.
In your example :
void fnMyTask(TTASKTABLE *ptrTaskTable)
{
....
if (iRunTimes == RUN_TIMES) { // first time woken after sleeping
uTaskerStateChange(OWN_TASK, UTASKER_GO); // switch to polling mode
}
...
}
If the task is in stop mode, how can it waken itself up? I will plan to use the uTaskerStateChange(OWN_TASK, UTASKER_GO) within the IRQ interupt from the RTC. What is the difference between polling, and running? I thought the UTASKER_GO puts it into run mode?
Is it possible to Halt the thread, and another thread can restart it from the place halted? If so how is this done?
Neil
Thanks for the reply.
The reason I need this , every 10 mins, I have to take 20 serial readings from an instrument through the uart. I have an interupt from a rtc (DS1337) every second , and when reaches 10 minutes the task is woken up from the IRQ (I am not using the internal RTC, for other reasons). When woken, the task will take one sample, then the next time the task is processed, it will take the next reading, and so on. When all 20 has been read, the task itself will be placed back into stop mode.
In your example :
void fnMyTask(TTASKTABLE *ptrTaskTable)
{
....
if (iRunTimes == RUN_TIMES) { // first time woken after sleeping
uTaskerStateChange(OWN_TASK, UTASKER_GO); // switch to polling mode
}
...
}
If the task is in stop mode, how can it waken itself up? I will plan to use the uTaskerStateChange(OWN_TASK, UTASKER_GO) within the IRQ interupt from the RTC. What is the difference between polling, and running? I thought the UTASKER_GO puts it into run mode?
Is it possible to Halt the thread, and another thread can restart it from the place halted? If so how is this done?
Neil



) , can I use the file system on this one too? If I also have 2 , I assume it will be a matter of selecting which qspi chip select to use on which device, as there are 4 available?