Real-Time Workshop |
 |
User-Written Run-Time Interface Code
Most of the run-time interface is provided by Real-Time Workshop. You must implement the following elements:
- A timer interrupt service routine (ISR). The timer runs at the program's base sample rate. The timer ISR is responsible for operations that must be completed within a single clock period, such as computing the current output sample. The timer ISR usually calls the Real-Time Workshop-supplied function,
rt_OneStep
.
- The main program. Your main program initializes the blocks in the model, installs the ISR, and executes a background task or loop. The timer periodically interrupts the main loop. If the main program is designed to run for a finite amount of time, it is also responsible for cleanup operations - such as memory deallocation and masking the timer interrupt - before terminating the program.
- Device drivers to communicate with your target hardware.
| Code Components | | Run-Time Interface for Rapid Prototyping |  |