Other Parts Discussed in Thread: CONTROLSUITE
Hello,
The sample code from :
c:\ti\controlSUITE\development_kits\TMDSIACLEDCOMKIT_v1.1\IsoACLighting-F28035-PLC_CENA\IsoACLighting-DPL-CLA.asm
Has poor comments/explanations:
.if(INCR_BUILD = 2)
ADCDRV_1ch_CLA 9
;ADCDRV_1ch_CLA 2
CNTL_2P2Z_CLA 1
.ref _tsPtrCLA
MI16TOF32 MR0, @_tsPtrCLA
MADDF32 MR0, #1.0, MR0
MF32TOI16 MR1, MR0
MCMPF32 MR0, #2.0
MMOV16 @_tsPtrCLA, MR1
MNOP
MNOP
MBCNDD TS2_CLA, EQ ;compare done
MNOP ;will happen regardless of branch result
MNOP ;will happen regardless of branch result
MNOP ;will happen regardless of branch result
MCMPF32 MR0, #4.0 ;branch done
MNOP
MNOP
MNOP
MBCNDD TS4_CLA, EQ ;compare done
MNOP ;will happen regardless of branch result
MNOP ;will happen regardless of branch result
MNOP ;will happen regardless of branch result
MCMPF32 MR0, #6.0 ;branch done
MNOP
MNOP
MNOP
MBCNDD TS6_CLA, EQ ;compare done
MNOP ;will happen regardless of branch result
MMOVF32 MR1,#0.0L ;will happen regardless of branch result
MF32TOI16 MR1,MR1 ;will happen regardless of branch result
MBCNDD TS_END, UNCF ;branch done, did not take branch, so leave ISR
MNOP
MNOP
MNOP
TS2_CLA:
ADCDRV_1ch_CLA 10
ADCDRV_1ch_CLA 11
CNTL_2P2Z_CLA 2
...
Question1:
Please give me a detailed explanation of the role of variable tsPtrCLA?
Question2:
Can you indicate, please, a documentation/application note about "tips and tricks" for writting CLA code in ASM language?
Thanks,
Andrei