Issue for TI c2000 package in Matlab2017a?
4 views (last 30 days)
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.
在加剧代码中,我找到了原因:在模型步骤函数(在LED001_ERROR.C中,如下),没有执行任何执行。
/* Model stepfucntion */
voidled001_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 stepfucntion */
voidled001_error_step(void)
{
/* (no output/update code required) */
GpioDataRegs.GPCTOGGLE.bit.GPIO68 = (1.0 != 0);
}
据我所知,“默认参数行为”参数仅更改模型中某些变量的属性,并且不应以这种方式影响代码生成和程序的执行。因此,这是TI支持软件包的错误,还是我错过万博1manbetx了一些东西?
Environments:
MATLAB2017A CCSV6
0 Comments
Accepted Answer
马纳尔Chilapur
on 2 Jul 2019
Please can you specify sample time for constant block to -1 and try.
In that case the block inherits the model step time and the code will be generated in step function.
问候,
Venkatesh C
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
开始狩猎!