[MPC5674F] EBI with AXM-0472 creating aliases in an external memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[MPC5674F] EBI with AXM-0472 creating aliases in an external memory

1,495 次查看
jmf
Contributor II

Hi,

we are facing some problems trying to use the external RAM from AXM-0472 board.

We can read/write in the memory, but from address 0x20010000 (base address is 0x20000000) the data begin to repeat every 64KB address, I mean, the data seems to be only "aliases", e.g.:

if I write 0xdeadbeef at address 0x20000000 the data is propagated to their "aliases": 0x20010000, 0x20020000, 0x20030000, until 0x20070000.

 

the memory looks like as below:

0x20000000 0xdeadbeef -> 0x20010000 0xdeadbeef -> 0x20020000 0xdeadbeef ... 0x20070000 0xdeadbeef
0x20000004 0xdeadbeef -> 0x20010004 0xdeadbeef -> 0x20020000 0xdeadbeef ... 0x20070000 0xdeadbeef
0x20000008 0xdeadbeef -> 0x20010008 0xdeadbeef -> 0x20020000 0xdeadbeef ... 0x20070000 0xdeadbeef

 

We are using the MPC5674F with the AXM-0472 board which already has a connection with an external memory (CY7C1338-100AXC - 512KB).

 

We got a sample code from CodeWarrior's IDE specific for that platform (MPC5674F + AXM-0472) that already configures the EBI to be used, but it's not working.

 

See below the configuration of the EBI's registers:

  • EBICALBR0 = 0x20000083 (Base Address: 0x20000000, 32-bit, Muxed bus)
  • EBICALOR0 = 0xfff80000
  • EBIMCR = 0x0

 

See below the configuration of the PCRs:

 

PCR no. 256: D_CS0
PCR-FLAGS: PA-Primary, OBE-DISABLE, IBE-DISABLE, DSC-20PF, ODE-DISABLE, HYS-DISABLE, SRC-MIN, WPE-ENABLE, WPS-ENABLE

 

Data and address PCRs

 

PCR no. 257: alternate function D-ADD-DAT31
PCR-FLAGS: PA-Alt1, OBE-DISABLE, IBE-DISABLE, DSC-20PF, ODE-DISABLE, HYS-DISABLE, SRC-MIN, WPE-DISABLE, WPS-DISABLE

 

PCR no. 263 - 277: alternate function D-ADD-DAT16 - 30
PCR-FLAGS: PA-Alt1, OBE-DISABLE, IBE-DISABLE, DSC-20PF, ODE-DISABLE, HYS-DISABLE, SRC-MIN, WPE-DISABLE, WPS-DISABLE

 

PCR no. 278 - 293: primary function D-ADD-DAT0 - 15
PCR-FLAGS: PA-Primary, OBE-DISABLE, IBE-DISABLE, DSC-20PF, ODE-DISABLE, HYS-DISABLE, SRC-MIN, WPE-DISABLE, WPS-DISABLE

 

Control PCRs

 

PCR no. 294 - 305: primary functions D-RD-WR, D-WE0, D-WE1, D-OE, D-TS, D-ALE, D-TA, D-CS1, D-BDIP, D-WE2, D-WE3, D-ADD9
PCR-FLAGS: PA-Primary, OBE-DISABLE, IBE-DISABLE, DSC-20PF, ODE-DISABLE, HYS-DISABLE, SRC-MIN, WPE-ENABLE, WPS-ENABLE

 

 

We would appreciate if someone could help us.

 

Regards,

Fujioka

标签 (1)
7 回复数

1,056 次查看
dineshs
Contributor I

please share the test code for external Sram with initialization.

0 项奖励

1,056 次查看
jmf
Contributor II

Hi dineshs‌, you can see the example codeExample XPC567XFKIT PinToggleStationery CW210  sent by davidtosenovjan‌.

0 项奖励

1,056 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, pay attention to following example where I am initializing external SRAM in main function.

Example XPC567XFKIT PinToggleStationery CW210 

Your mirroring issue will be caused by missing initialization of following EBI lines

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

1,056 次查看
jmf
Contributor II

davidtosenovjan‌, I had tested the EBI booting from RAM, but now I'm trying to run the same code booting from FLASH and it's not working. When I try to read the external RAM it throws an interruption.

I figured out if I comment the MMU's initialization (__initMMU and __initMMUExternalMemory) the interrupt doesn't happen, but the value read from external RAM doesn't match with the expected value.

Can you help me on that issue?

Regards,

Fujioka

0 项奖励

1,056 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

My example contains function External_SRAM_MMU_init, because default MMU setting for EBI space is set differently in order to possible boot from external memory. MMU setting for EBI must be change when code runs from internal flash.

1,056 次查看
jmf
Contributor II

Thanks! Worked!

0 项奖励

1,056 次查看
jmf
Contributor II

Thanks a lot davidtosenovjan‌!


I've just tested it and it worked!

Best regards,

Fujioka

0 项奖励