MPC567XADAT516 load program to external RAM (updated)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC567XADAT516 load program to external RAM (updated)

Jump to solution
1,472 Views
hugocarnide
Contributor I

Hello,

I am facing an issue to use the board RAM available as 4Mb.

My context:

  • MPC567XADAT516 daughter board
  • MCU is MCP5676R
  • JTAG used with PEMicro Universal FX
  • Need to load a program only to RAM
    • As we are going to load different program to avoid write limit of flash.
  • The SRAM is too little to handle the full program

 

I run the Example XPC567XRKIT PinToggleStationery CW210 but I see something strange with the External RAM from debug memory display.

The content available at 20000000 is exactly the same as 20010000 as any other 64Kb addresses until the available zone defined in EBI.CS[0].OR.R.

 

It seems that the example does not configure the bus properly on the address/data bus and stays always with the same value.

 

Have someone experimented something similar or have an idea what I failed ?

 

Thanks, Hugo

 

Update on 2016.09.30:

  • There is a missing initialization Example
    • The PCR 0x246 to 0x24C of D_ADD12 to D_ADD15 need to be initialized to 0x440
    • This permit to access 448K but I have the issue with the following step with address 20080000
Labels (1)
0 Kudos
1 Solution
1,063 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, I have deleted previous communication as I was completely wrong.

XPC567XRKIT PinToggleStationery CW210 example is right and SRAM memory that is installed on EVB memory is CY7C1338 and this is 4Mbit memory i.e. 4-Mbit = 128Kbit×32 = 512kByte!

It means address range is 0x2000_0000 - 0x2007FFFF

What puzzled me was CY7C1338's address lines marked as A_72M, A_36M, A_18M and A_9M that are not internally connected to the die.

These lines are connected only in case user would replace installed SRAM by bigger one.

Sorry for confusions.

View solution in original post

0 Kudos
3 Replies
1,064 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, I have deleted previous communication as I was completely wrong.

XPC567XRKIT PinToggleStationery CW210 example is right and SRAM memory that is installed on EVB memory is CY7C1338 and this is 4Mbit memory i.e. 4-Mbit = 128Kbit×32 = 512kByte!

It means address range is 0x2000_0000 - 0x2007FFFF

What puzzled me was CY7C1338's address lines marked as A_72M, A_36M, A_18M and A_9M that are not internally connected to the die.

These lines are connected only in case user would replace installed SRAM by bigger one.

Sorry for confusions.

0 Kudos
1,063 Views
hugocarnide
Contributor I

Thanks David,

I have make an error reading specification of board.

But I have tried the XPC567XRKIT PinToggleStationery CW210 and it contains an error.

If I activate the INIT_EXTERNAL_BUS_INTERFACE_SETUP in  MPC55xx_init_debug.c as I ran the program in RAM.

  • INIT_ExternalBusAndMemory initialize PCR properly to access to all 4Mbits until 2007FFFF addresses.
  • But it misses to initialize PCR 260 to 262

But in the External_SRAM_init of main.c:

  • It misses to initialize the corresponding PCR of D_ADD13 to D_ADD15. Otherwise there is only 64KBytes available as at address 20010000 you have the same data as at address 20000000. Here after a code to add in function.

/* D_ADD13 - D_ADD15       PCR 260 - 262 */
for (count = 260; count <= 262; count++)
{
    SIU.PCR[count].R = 0x0443;
};

  • The initialization of D_ADD9 to D_ADD12 is conditioned on different daughter board but could be activated by default

I have another question is the function INIT_ExternalBusAndMemory partially doing same task with External_SRAM_init ?

I understand it initialize the MMU to access to external device.

1,063 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Yes, you are right, thanks. I will correct it.

Regarding second question -  at the time I have written first version of the example it INIT_ExternalBusAndMemory either wasn't there or it was incorrectly initialized, I don't remember. Anyway I haven't test it. You can try it letting me now if it works or not.

To MMU - TLB entry for EBI is initialized by boot assist module by default, but you would have to do it in case EBI access from second core, its MMU table needs to be initialized by startup script.

0 Kudos