Hi,
I use DSPLIB with on the C5535 and it seems that a little bug prevents the XAR5 register to be correctly restored from the stack in the acorr_raw function.
On line 31 of araw.asm:
FRAME_SZ .set 1
Line 38:
.asg 0, temp
.asg 0 + FRAME_SZ, SAVE_AR5
.asg 2 + FRAME_SZ, SAVE_AR6
.asg 4 + FRAME_SZ, SAVE_AR7
Line 74:
MOV XAR7, dbl(*SP(#(SAVE_AR7))) ; PSHM XAR7
||BSET SXMD ; Set SXMD
MOV XAR6, dbl(*SP(#(SAVE_AR6))) ; PSHM XAR6
||BSET FRCT ; Set FRCT
MOV XAR5, dbl(*SP(#(SAVE_AR5))) ; PSHM XAR5
These save AR6 & AR7 to SP+5 -> SP+2, and AR5 to SP+0 and SP+1.
And line 106:
MOV AC0, *sp(#(temp))
This puts AC0 to SP+0, and overrides the half LSBs of AR5.
I solved the issue by setting FRAME_SZ to 2:
FRAME_SZ .set 2
on line 31.
Don't know if the bug is present in other DSPLIB functions.