User`s guide
The Idle Loop
Thread Scheduling 4-53
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 in the Configuration Tool allows you to insert functions that
execute within the idle loop. The idle loop runs the IDL functions that you
configured with the Configuration Tool. 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 in the Configuration Tool. 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 C54x platform, the RTDX_dataPump IDL object calls RTDX_Poll
to transfer data between the target and the host. This occurs within the
idle loop, which runs at the lowest priority.
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.










