MATLAB: How to call assembler code DSP28x_usDelay() in a simulink model
c2000code generationsimulink
Hello All,
When I use Simulink model to generate code on a C2000 platform, I don't know how to call assembler code DSP28x_usDelay() in the model.Any one can help me? Thank you.
Best Answer
Please use Atomic subsystem and place the customer code block from Simulink coder -> custom code -> system outputs. double click on this block and place the function call inside the execution code section. You may also try coder.extrensic inside a MATLAB function block, or S-function, etc.
There are better ways to do this in terms of pure efficiency. But the above will suffice. First learn how to write at least decent code that solves the task at hand. Only when you decide if the code is a problem do you want to worry about optimizing it for speed.
Best Answer