Texas Instruments TMS320 User Manual page 55

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

■ HST_init initializes the host I/O channel interface. The specifics
of this routine depend on the particular implementation used for the
host to target link. For example, in the C6000 platform, if RTDX is
used, HST_init enables the bit in IER that corresponds to the
hardware interrupt reserved for RTDX.
■ IDL_init calculates the idle loop instruction count. If the Auto
calculate idle loop instruction count property was set to true in the Idle
Function Manager configuration, IDL_init calculates the idle loop
instruction count at this point in the startup sequence. The idle loop
instruction count is used to calibrate the CPU load displayed by the
CPU Load Graph (see section 3.6.1, The CPU Load, page 3-29).
4) Process the .pinit table. The .pinit table consists of pointers to
initialization functions. For C++ programs, class constructors of global
objects execute during .pinit processing.
5) Call your program's main routine. After all DSP/BIOS modules have
completed their initialization procedures, your main routine is called. This
routine can be written in assembly, C, C++ or a combination. Because the
C compiler adds an underscore prefix to function names, this can be a C
or C++ function called main or an assembly function called _main.
Since neither hardware nor software interrupts are enabled yet, you can
take care of initialization procedures for your own application (such as
calling your own hardware initialization routines) from the main routine.
Your main function can enable individual interrupt mask bits, but it should
not call HWI_enable to globally enable interrupts.
6) Call BIOS_start to start DSP/BIOS. Like BIOS_init, BIOS_start is also
generated by the configuration and is located in the programcfg.snn file.
BIOS_start is called after the return from your main routine. BIOS_start
is responsible for enabling the DSP/BIOS modules and invoking the
MOD_startup macro for each DSP/BIOS module. If the TSK Manager is
enabled in the configuration, the call to BIOS_start does not return. For
example:
■ CLK_startup sets up the PRD register, enables the bit in the IER for
the timer chosen in the CLK Manager, and finally starts the timer.
(This macro is only expanded if you enable the CLK Manager in the
configuration.)
■ PIP_startup calls the notifyWriter function for each created pipe
object.
■ SWI_startup enables software interrupts.
■ HWI_startup enables hardware interrupts by setting the GIE bit in the
CSR on the C6000 platform.
DSP/BIOS Startup Sequence
Program Generation
2-25

Advertisement

Table of Contents
loading

Table of Contents