MCF5234: cannot initialize internal SRAM

Discussion created by sirlenzelot on Jun 26, 2008
Latest reply on Jun 26, 2008 by sirlenzelot
Hello everybody,
I have problems initializing the internal SRAM.
I rtfm and followed the steps described in Chapter 6.2.3 SRAM Initialization Code.
When I connect to my target via the BDI2000-interface by Abatron I have immediate access to SRAM as it is configured via the interface. They don't do anything different than me: write 0x20000001 to RAMBAR-register. But if I initialize the SRAM in my code, writing to RAMBAR has no effect.
This is what I do:
    INT_SRAM_BASE       EQU     $20000000      ; Base add used for internal SRAM    INT_SRAM_SIZE       EQU     $00010000      ; MCF5235 has 64K internal SRAM    INT_SRAM_VALID      EQU     $20000001      ; Bit to make internal SRAM                                               ; valid/enabled.    MOVE.W              #LOCKOUT,SR            ; Lock-out interrupts    MOVE.L              #INT_SRAM_VALID,D0    MOVEC.L             D0,RAMBAR0; zero SRAM    lea.l  INT_SRAM_BASE,A0    move.l  #INT_SRAM_SIZE,D0SRAM_INIT_LOOP:    clr.b  (A0)+    subq.l  #1,D0    bne.b  SRAM_INIT_LOOP; Init VBR    MOVE.L              #VECTOR_BASE,A0    MOVEC               A0,VBR; Init IPSBAR    MOVE.L              #IPSBAR,A0    MOVE.L              #IPSBAR_VALUE,(A0)

Can someone give me a hint on that, please?
Thanks in advance