The Idle Loop
Thread Scheduling
4-49
4.5 The Idle Loop
The idle loop is the background thread of DSP/BIOS, which runs continuously
when no hardware interrupt service routines, software interrupt, or tasks are
running. Any other thread can preempt the idle loop at any point.
The IDL Manager allows you to insert functions that execute within the idle
loop. The idle loop runs the IDL functions you configured. IDL_loop calls the
functions associated with each one of the IDL objects one at a time, and then
starts over again in a continuous loop. The functions are called in the same
order in which they were created. Therefore, an IDL function must run to
completion before the next IDL function can start running. When the last idle
function has completed, the idle loop starts the first IDL function again. Idle
loop functions are often used to poll non-real-time devices that do not (or
cannot) generate interrupts, monitor system status, or perform other
background activities.
The idle loop is the thread with lowest priority in a DSP/BIOS application. The
idle loop functions run only when no other hardware interrupts, software
interrupts, or tasks need to run. Communication between the target and the
DSP/BIOS Analysis Tools is performed within the background idle loop. This
ensures that the DSP/BIOS Analysis Tools do not interfere with the program's
processing. If the target CPU is too busy to perform background processes,
the DSP/BIOS Analysis Tools stop receiving information from the target until
the CPU is available.
By default, the idle loop runs the functions for these IDL objects:
❏
LNK_dataPump
manages the transfer of real-time analysis data (for
example, LOG and STS data), and HST channel data between the target
DSP and the host. This is handled using RTDX.
On the C55x and C6000 platforms, the host PC triggers an interrupt to
transfer data to and from the target. This interrupt has a higher priority
than SWI, TSK, and IDL functions. The actual HWI function runs in a very
short time. Within the idle loop, the LNK_dataPump function does the
more time-consuming work of preparing the RTDX buffers and
performing the RTDX calls. Only the actual data transfer is done at high
priority. This data transfer can have a small effect on real-time behavior,
particularly if a large amount of LOG data must be transferred.
Summary of Contents for TMS320 Series
Page 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Page 16: ...xvi ...
Page 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Page 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Page 202: ...5 20 ...
Page 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Page 288: ...Index 10 Index ...