Memory mapping on MPC556

"rkaufmanus" <[email protected]> Wed, 22 Nov 2006 22:18:24 -0000
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Hello everyone,

I have a slight problem with the memory controller and debugging with
the PE Micro PKGPPCZ.
When I reset the CPU in debug mode, the PC is set to 0xFF?00100.

The ? is because I'm writing with Linux booted and cannot simply look
up the real value. Anyway, I do not think that the real value is so
important.
As internal EPROM of the CPU starts at 0x00000000, I am wondering why
this happens. The MPC manual says that the startup address is
determined by:
'• The external data bus pins DATA[0:31]
• An internal default constant (0x0000 0000)
• An internal NVM register value (CMFCFIG)'

So why does the PC stand at 0xFF?00100 instead of 0x00000100 after
going into debug mode/reset or a watchdog reset? When NOT debugging
the board, everything (nearly) works fine.


My second problem is, that I cannot access the external EPROM on the
board, because the memory controller seems to be configured in the
wrong way. The manual says: 'Memory Controller Base Registers 0,Bits
0-16. These bits are compared to the corresponding unmasked address
signals among
ADDR[0:16] to determine if a memory bank controlled by the memory
controller is being accessed
by an internal bus master.'
Why are the LOWER 16 address bits compared? If my external memory
should be mapped to e.g. 0x00070000, I would expect that bits 17-31
are compared and I would put 0x0007 into the BR0 BA bits?
Can anyone give me a hint how to configure the memory controller in
order to access an external AM29BL802CB flash EPROM?

Thanks and best regards, Rainer