I want to add a bit to my question:
Essentially, I want to do what is described in the Simulink Coder Demo help files under the title "Schedule a Multi-Rate Controller for a Permanent Magnet Synchronous Machine." I'm currently (by default) using the base Timer0 rate to schedule the controller, but I'd like to time the control period to the ADC SOC (which ='s PWM EOC INT). This situation without using Timer0 is described in this help file with limited explanation:
"...Therefore, the controller and peripherals are scheduled by the ADC end-of-conversion interrupt. A separate custom code block inserts pre-processor macros that tell the compiler not to execute the controller and peripherals at the base rate."
How is this actually done?! Well...:
The subsystem wraps the algorithm "with a preprocesor macro such that it will not be executed at the base interrupt rate by generating the following code: #if 0, [some code], #endif"
The help file doesn't include the model, so I can't see the implementation. I assume that if I have a custom code block, I should be able to just wrap it in the #if 0 statement, and the Timer0 ISR will be shut off.
Does anyone have any experience with doing this? Any success stories?