If control task clears the overrun flag, the overrun detection block may
not see it, because it can run at different rate in a working task.
This is now changed so that control task only sets the flag and only
overrun detection block clears it.
-%% Copyright (C) 2013, 2014 Czech Technical University in Prague
+%% Copyright (C) 2013, 2014, 2015 Czech Technical University in Prague
%%
%% Authors:
%%
%<LibAddToCommonIncludes("rpp_simulink_runtime.h")>
if (overrun_flag) {
+ overrun_flag = FALSE;
%% Call a function subsystem
%foreach callIdx = NumSFcnSysOutputCalls
%if LibIsEqual(SFcnSystemOutputCall[callIdx].BlockToCall,"unconnected")
overrun_flag = TRUE;
break;
}
- else {
- overrun_flag = FALSE;
- }
if (xSemaphoreGive(sub_rate[i].sem) == pdFALSE) {
rpp_sci_printk("ERROR: Task %d semaphore 1 give.\n", i);
while (1) ;
/* Overrun detected */
overrun_flag = TRUE;
} else {
- overrun_flag = FALSE;
/* Release semaphore */
xSemaphoreGive(step_signal);
}