Issue for TI c2000 package in Matlab2017a?
Show older comments
A simplest demo (led001_error.slx) is as follow:

The GPIO68 corresponds to a LED in my board, so, under the ideal situation, the LED should blink at frequency of 1Hz as the time step is 0.5s, .
However, the LED actually keeps off after the model is downloaded.
In the genearted codes, I found the reason: in model step function (in led001_error.c as follow), nothing is executed.
/* Model step fucntion */
void led001_error_step(void)
{
/* (no output/update code required) */
}
But, if I alter the parameter of `Default parameter behavior` in `Code Generation/Optimization` from "Inlined" to "tunable".
As a result, the model works fine (the LED blinks and the step function is as follow).
/* Model step fucntion */
void led001_error_step(void)
{
/* (no output/update code required) */
GpioDataRegs.GPCTOGGLE.bit.GPIO68 = (1.0 != 0);
}
As far as I know, the `Default parameter behavior` parameter only alter properties of some varibles in the model, and should not affect the code generation and the program's execution in this way. So it is a bug of Ti support package or I missed something?
Environments:
Matlab2017a CCSv6
Accepted Answer
More Answers (0)
Categories
Find more on Texas Instruments C2000 Processors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!