Hello @Poley ,
We shall investigate this with the profiler block. This block adds a header and footer code in the s-function in which it is placed and takes the counter value of a timer (20Mhz). It returns the difference in ticks between entering and exiting moments of the function.
My guess is that at some point, the task which is triggered by the model fixed-step, used to drive all the systems, takes more than the time Simulink expects. For example, if the step size is set to 50us but it takes between 50us and 100us, then it will be triggered at every 100us. (backend, the fixed-step value, sets a timer, which triggers the step function. If the interrupt occurs while the core is executing the handler, then the interrupt will continue running the handler, will clear the interrupt bit when exiting the handler. The next handler execution will be triggered when the interrupt appears again). In this particular situation, the system becomes 50% slower and this is what I guess it happens with your model.
So my suggestion is to start using the profiler block maybe there is some room for optimization.
Hope this helps,
Marius