10.4.2 Typical CLA Initialization Sequence
A typical CLA initialization sequence is performed by the main CPU as described in this section.
1.
Copy CLA code into the CLA program RAM
The source for the CLA code can initially reside in the Flash or a data stream from a communications
peripheral or anywhere the main CPU can access it. The debugger can also be used to load code directly to
the CLA program RAM during development.
2.
Initialize CLA data RAM, if necessary
Populate the CLA data RAM with any required data coefficients or constants.
3.
Configure the CLA registers
Configure the CLA registers, but keep interrupts disabled until later (leave MIER = 0):
•
Enable the CLA peripheral clock using the assigned PCLKCRn register
The peripheral clock control (PCLKCRn) registers are defined in the
System Control and Interrupts
chapter.
•
Populate the CLA task interrupt vectors
– MVECT1 to MVECT8
Each vector needs to be initialized with the start address of the task to be executed when the CLA
receives the associated interrupt. The address is an offset from the base address of the assigned CLA
Program memory block.
•
Select the task interrupt sources
For each task select the interrupt source in the CLA1TASKSRCSELx register. If a task is software
triggered, select no interrupt.
•
Enable IACK to start a task from software, if desired
To enable the IACK instruction to start a task set the MCTL[IACKE] bit. Using the IACK instruction avoids
having to set and clear the EALLOW bit.
•
Map CLA data RAM to CLA space, if necessary
Map the data RAM to the CLA space by writing a 1 to the MMEMCFG[RAMxE] bit. The CPU will have
restricted access to the memory block once the MMEMCFG[RAMxE] bit is set. CPU access to CLA data
RAM can be granted through the MMEMCFG[RAMxCPUE] bit. Allow two SYSCLK cycles for MMEMCFG
updates to take effect.
•
Map CLA program RAM to CLA space
Map the CLA program RAM to CLA space by setting the MMEMCFG[PROGE] bit. The CPU will only
have debug access to program RAM once the MMEMCFG[PROGE] bit is set. Allow two SYSCLK cycles
for MMEMCFG updates to take effect.
Control Law Accelerator (CLA)
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
579
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......