Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
I am using F28379D Launchpad for the first time. Previously I have worked on F28377S. I am having trouble reading ADC values. The program is debugging successfully. But values of the adc result register is zero.
It seems that the debugger is reading with code (in main code)
Vd1=AdcaResultRegs.ADCRESULT0;
Va1=300*((2*Vd1/65536)-1);
and then in fs_div28.asm
PUSH XAR0
PUSH XAR1
PUSH XAR2
PUSH XAR3
ADDB SP, #2 ; Allocate space for locals
*
CLRC SXM
.if .TMS320C2800_FPU32
MOV32 ACC, R0H
.endif
*
*;*****************************************************************************
*; CONVERSION OF FLOATING POINT FORMAT - UNPACK *
*; Test OP1 for special case treatment of zero. *
*; Split the MSW of A in the accumulator. *
*; Save the sign and exponent on the stack [xxxx xxxS EEEE EEEE]. *
*; Add the implied one to the mantissa value. *
*; Store entire mantissa with a long word store *
*;*****************************************************************************
*
TEST ACC
B OP1_ZERO, EQ ; if OP1 is 0, jump to special case
MOVZ OP1_SE, AH ; store AH before sign & exp are removed
AND AH, #07Fh ; mask off sign & exp to get high mantissa
ADD AH, #080h ; add implied 1 to mantissa
MOVL OP1_LM, ACC ; store mantissa
MOV AH, OP1_SE ; Restore high part containing sign & exp
LSR AH, 7 ; Remove high mantissa
MOVZ OP1_SE, AH ; store sign and exponent
*
.if .TMS320C2800_FPU32
MOV32 R0H, ACC
.endif
SUBB SP, #2
POP XAR3
POP XAR2
POP XAR1
POP XAR0
LRETR
And then again goes back to the main code.
Please help me out in the code.