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.

Can AC1 be accessed as MMR?

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

  • Robert W said:
    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.

    Yes, both AC1 and AC3 can be modified through MMR writes.  I don't see any actual writes to either register in your sample code.