Hi,
The code is from an application document spra776a.pdf. AC1 and AC3 are accessed by AR6, AR7 respectively. I find that AC3 can be changed when I modify the corresponding memory content while AC1 cannot although they are used in the same way. A notiable difference is that when the simulator reset, AR6 is 0x7FFFFF while AR7 is 0x000000. I do not find anything resulting this. Is it normal?
The relavent conifiguration code snipnet listed below.
I am new to C55. Could you help me? Thanks,
/////////////
BCLR #ARMS, ST2_55
BSET #M40, ST1_55
BCLR #C54CM, ST1_55
MOV #0, mmap(ST0_55) ;All fields cleared (OVx, C, TCx).
OR #0100h, mmap(ST1_55) ;Set SXMD.
AND #07940h, mmap(ST1_55) ;Clear BRAF, M40, SATD, C16, 54CM, ASM.
;-----------------------------------------------------------------------
; Copy arguments to local locations and set registers
;
;-----------------------------------------------------------------------
; m, old_m, new_m pointers
MOV XAR0, xm_base
MOV mmap(AR0), m_base ;base address of metrics table
...
MOV #AC1_L, AR6 ;Absolute date memory access to MMR
MOV #AC3_L, AR7 ;register. AR6 points to AC1 and AR7
;points to AC3