Overrun with Nucleo-G474RE

Raphael, there are certain things one can do on the margin, but overall the code generation framework comes with a certain level of baseline overhead that may prevent execution at 1 usec.

A few ideas you can explore:

Your model does not have any scopes or tunable parameters. Disable external mode in the Coder Options + Target + External Mode tab.In the Coder Options + Target + Advanced tab change the task scheduler from FreeRTOS to Bare-Metal.Change the compiler optimization flags.State machines and C-Scripts include additional overhead. Implementing your logic with basic PLECS blocks may be more efficient.