How do I disable the base rate interrupt and replace it with another interrupt, when working with Code Composer Studio and Embedded Coder 6.4 (R2013a)?

2 views (last 30 days)
I am working with a Texas Instruments (TI) board using Code Composer Studio (CCS) in conjunction with Embedded Coder 6.4 (R2013a). I would like to disable the base rate interrupt and replace it with another interrupt. How do I do this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 6 May 2013
There is no single checkbox that disables the base rate interrupt. However, there is a model that ships with Embedded Coder called "Field-Oriented Control of a Permanent Magnet Synchronous Machine F28335 Synchronized to ADC Interrupt" that provides an example of how to do this:
>> c28335_pmsmfoc_adcinterrupt
Note that this example builds upon the following Simulink Coder model:
>> rtwdemo_pmsmfoc_system
While using interrupts, the recommended practice is to place the blocks that the interrupt needs to trigger inside a Function-Call Subsystem. The only drawback is that you will lose the ability to use blocks (such as discrete integrators) that need absolute time in the function-call subsystems. However, you can replace these blocks with generic Simulink blocks by using unit delays. The following example uses this technique:
>> c28335pmsmfoc
In this example, there are PID blocks (e.g. Function-Call SubSystem/Generating Space Vectors/Generating Raw Space Vectors/control/PID Controller) that need integrators. If you look under the mask by right-clicking and going to “Look Under Mask”, you can see how the integrator is created with generic Simulink blocks.
You should be able to adapt these examples with your own model to disable the base rate interrupt and use another one instead.

More Answers (0)

Tags

Products


Release

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!