Why do you think the critical section helps? Is it that the scheduler is screwing with the port timing. Or have you got more than one task that is accessing the port at the same time?
Hi,
Thanks for answering.
I have the main task with access the iso port, and 5 test simple tasks, that just updates an array of 5 counters.
When using taskENTER_CRITICAL, there is no context switch, and so there is only the main task executing, no other tasks are executing.
But when there is any context swtiching, the main task is not executing well. Probably is what you say: the scheduler is screwing with the port timing; or, I need to improve my context save/restore functions.
Although my test application with only the test tasks works well, they update their counter.