Is there need to write C2000 peripheral initialize code (such as PWM、ADC module ) when design a motor control model based on simulink coder
2 次查看(过去 30 天)
显示 更早的评论
Hi, engineers.I'm confused that if I could build the motor control model offered by mathworks's example <http://cn.mathworks.com/examples/embedded-coder/mw/texasinstrumentsc2000_product-publish_c2000workflow-motor-control motor control > and run in C2000 development kit without writing C2000 peripheral initialize code? cause I did't see any initialize model in simulink coder ,but it's vital to write peripheral initalize code when our write an motor control program in CCS. anyideas on answer the question would be highly appreciated. (I also attached the example picture as follow)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155905/image.jpeg)
0 个评论
采纳的回答
Brian McKay
2016-8-22
编辑:Brian McKay
2016-8-22
If you are using the C2000 Support Package, we are generating all required initialization code. During the model build, the executable will be generated with all initialization and application code included.
Generated file MW_c28xx_board.c will have all initialization code for the processor. We are calling some of the TI functions (available in controlSUITE) also to do the initialization. Other init code will be generated in the modelname.c file as modelname_initialize function.
-Brian
0 个评论
更多回答(1 个)
社区
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!