How to allocate data at RAM4 Bank using OM13098 (LPC54628)?

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

How to allocate data at RAM4 Bank using OM13098 (LPC54628)?

753 次查看
lfchaves_gm
Contributor I

Hello guys, I'm using OM13098 board (LPC54628) and I'm trying to allocate data at external SDRAM (RAM4). Based on MCUXpresso user guide I have included the following lines:

#include <cr_section_macros.h>

__DATA(RAM4) uint32_t buffer[100];

After that, it looks compile okay:

   Memory region Used Size Region Size %age Used

   PROGRAM_FLASH: 57560 B 512 KB 10.98%

   BOARD_FLASH: 0 GB 16 MB 0.00%

   SRAM_UPPER: 77424 B 160 KB 47.26%

   SRAMX: 0 GB 32 KB 0.00%

   USB_RAM: 0 GB 8 KB 0.00%

   BOARD_SDRAM: 400 B 16 MB 0.00%

However, when I try to download and debug, nothing happens. I'm not able to debug my program and my code does not work anymore.

Could someone tell me how to use RAM4 memory bank on OM13098? 

Thank you!

Luciano

标签 (2)
0 项奖励
回复
1 回复

621 次查看
nxf51211
NXP Employee
NXP Employee

Hi,

In order to use the BOARD_SDRAM or RAM4 memory from the OM13098 you need a different approach than the one you used. If you check the LPC54628 memory map, you would see that RAM4 is located at 0xa0000000, which is accessed with the EMC (External Memory Controller) and therefore you would need to initialize the EMC dynamic memory controller before you are able to access this external RAM.

If you want to check and example code on how to do this, please refer to the LPC54628 SDK driver example called "emc_sdram" (Inside MCUXpresso, import SDK example located at driver_examples -> emc -> emc_sdram).

I hope this information can help you.

Best Regards,

Ricardo Delsordo.

0 项奖励
回复