Periodic Function Manager (PRD) and the System Clock
4-76
Figure 4-17.
Trace Log Output from Example 4-16
4.10 Periodic Function Manager (PRD) and the System Clock
Many applications need to schedule functions based on I/O availability or
some other programmed event. Other applications can schedule functions
based on a real-time clock.
The PRD Manager allows you to create objects that schedule periodic
execution of program functions. To drive the PRD module, DSP/BIOS
provides a system clock. The system clock is a 32-bit counter that ticks every
time PRD_tick is called. You can use the timer interrupt or some other
periodic event to call PRD_tick and drive the system clock.
There can be several PRD objects, but all are driven by the same system
clock. The period of each PRD object determines the frequency at which its
function is called. The period of each PRD object is specified in terms of the
system clock time; that is, in system clock ticks.
To schedule functions based on certain events, use the following procedures:
❏
Based on a real-time clock
. Set the Use CLK Manager to Drive PRD
property to true for the PRD module properties. By doing this you are
setting the timer interrupt used by the CLK Manager to drive the system
clock. When you do this a CLK object called PRD_clock is added to the
CLK module. This object calls PRD_tick every time the timer interrupt
goes off, advancing the system clock by one tick.
Note:
When the CLK Manager is used to drive PRD, the system clock that drives
PRD functions ticks at the same rate as the low-resolution clock. The low-
resolution and system time coincide.
❏
Based on I/O availability or some other event
. Set the Use the CLK
Manager to Drive PRD property to false for the PRD module properties.
Your program should call PRD_tick to increment the system clock. In this
case the resolution of the system clock equals the frequency of the
interrupt from which PRD_tick is called.
Содержание TMS320 Series
Страница 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Страница 16: ...xvi ...
Страница 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Страница 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Страница 202: ...5 20 ...
Страница 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Страница 288: ...Index 10 Index ...