TI 28377S & Simulink C2000 Embedded Coder: Initialize/Start-up/Shutdown Procedures
이전 댓글 표시
Hello,
I have been using Simulink's C2000 Embedded Coder add-on to program a TI 28377S LaunchPad. When programming and powering up the DSP, I found that the ePWMs were briefly going high before going into states defined by the ePWM block (in my case, complementary), which could be problematic if the system is (still) energized. I was looking at some of the examples provided and found the c28035pmsmfoc_cla one, which has custom code blocks (System Initalization). I had a few questions about the custom code blocks and how they interact with Embedded Coder, as the documentation isn't overly specific for this purpose.
- When the model is compiled and converted to code, what is the order of operations that Simulink follows? Does it follow something like this: System Initialize code block -> Module (ADC, PWM, etc.) configuration -> System Start code block -> Main body of code (model)? When do interrupts become enabled?
- For the System Start block, would it be necessary to disable/enable interrupts in the function's body or is it automatically handled by Simulink? Or are they not enabled by this point when starting the DSP?
- For the System Terminate block, does this code execute when the Stop button is pressed in Simulink? Or does it require some other event to execute (i.e. we need to create a subsystem triggered by an interrupt)?
As a whole, is there more significant documentation of these blocks and their functionality when using Embedded Coder? Are there more in-depth examples that show how to use these blocks for configuring modules to perform certain functions (e.g. the initialization of ePWM modules to an off state and an equivalent shutdown procedure via Simulink)?
Thanks a lot for your help.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Texas Instruments C2000 Processors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!