This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28379D: Use IACK instruction with variable parameter

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

I would like to create an assembly function that trigger CLA task with the IACK instruction. This function has the task bit in parameter corresponding to the task we want to trigger. But the IACK instruction takes a 16-bit constant value as parameter, and i do not really know if it is possible or if I should have one function for each task I want to trigger.

Here the prototype and the function that I wrote:

void TRIGGER_TASK(const Uint16 ClaTaskBit);

    .page
    .global     TRIGGER_TASK
    .text

TRIGGER_TASK:
	IACK	AL
	LRETR
    .endasmfunc

And here the error I got (because AL register is not constant I assume):

>> Compilation failure
DRVCLA/SRC/subdir_rules.mk:30: recipe for target 'DRVCLA/SRC/TRIGGER_TASK.obj' failed
"../DRVCLA/SRC/TRIGGER_TASK.asm", ERROR!   at line 32:
 [E0003]
         Syntax error - Operand 1
		IACK	AL
 
 
Errors in Source - Assembler Aborted
gmake: *** [DRVCLA/SRC/TRIGGER_TASK.obj] Error 1

  • Hi Nathan,

    Any reason you are using assembly code to trigger the task? The CLA,h has an API to trigger a task.

    static inline void
    CLA_forceTasks(uint32_t base, uint16_t taskFlags)

    where 'taskFlags" is the task to be triggered.

    See the example at:

    <C2000Ware>\driverlib\f2837xd\examples\cpu1\cla

    The IACK only takes on immediate offset like IACK #0x1 and does not take a register paramater. So if you need to use assembly, you will need something like this (pseudo code listed below);

    // if AH = 0x1  (create assembly for checking condition and branch to correct IACK instruction.

    IACK #0x1

    // if AH = 0x2

    IACK #0x2

    etc.

    Thanks,

    Ashwini

  • Hi,

    Thank you for your answer, I want to use assembly code ro trigger task to use IACK instruction and to avoid EALLOW and EDIS use for MIFRC register during the real time execution. 

    Nathan