sama5d27 based custom board - Problem with ddr2 memory

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

lquasar
Posts: 4
Joined: Mon Sep 03, 2018 11:43 am

sama5d27 based custom board - Problem with ddr2 memory

Tue Oct 16, 2018 1:45 pm

Hello,

For project we have created custom board based on atmel sama5d27 processor. We are facing some issues regarding working with DDRAM2 used on board. We are using this board for bare application development.

Processor used: ATSAMA5D27C-CNRTR-ND
DDRAM2 used: MT47H32M16NF-25E IT:H TR

From github we have downloaded at91bootstrap and built it using arm-none-eabi-gcc (linaro toolchain can be used for at91bootstrap, but for atmel softpack it cant be used (some errors for nano.specs occur). We have following situtation:

We have assembled 3 boards and we get 3 different behaviors:

bootstrap is built with settings:

Code: Select all

Image loading strategy: Load 1MB into start of SDRAM
The external Ram Address to Load Demo-App Image: 0x20000000
Demo-App Image Size: 0x000a0000 (it is bigger than image actual size)
Flash offset for Demo-App: 0x00010000
For all boards when program is loaded trough IAR using jtag and atmel-ice everything works fine. When trying to execute from QSPI flash we are facing following issues.

First board we get messages from at91bootstrap, execution is then moved to ddram and application built using IAR is executed properly.

Two other boards have following behaviors:

AT91bootstrap is executed properly but program from ddr2 is not executed. With modifications in bootstrap main function we set that content from ddram before jumping to address is printed on console. We got that content of memory is on one board 0x0000 and on another 0x0100. We tried to write to memory and read it. It is possible to read immediately but with any delay before writing and reading content of memory is lost.

From hardware side all boards should be same, assembly was done mechanically. Regarding registers for ram controller is there something that might be important and it is not set.

DDRAM is configured as:

Code: Select all

	ddramc_config->mdr = AT91C_DDRC2_DBW_16_BITS |
			     AT91C_DDRC2_MD_DDR2_SDRAM;

	ddramc_config->cr = AT91C_DDRC2_NC_DDR10_SDR9 |
			    AT91C_DDRC2_NR_13 |
			    AT91C_DDRC2_CAS_5 |
			    AT91C_DDRC2_NB_BANKS_4 |
			    AT91C_DDRC2_NDQS_ENABLED |
			    ~AT91C_DDRC2_UNAL_SUPPORTED;
Settings for timings are taken from memory datasheet.

If anyone have any idea what could cause such strange behavior any help will be very useful.

Best regards
blue_z
Location: USA
Posts: 1763
Joined: Thu Apr 19, 2007 10:15 pm

Re: sama5d27 based custom board - Problem with ddr2 memory

Wed Oct 17, 2018 2:20 am

Seems like you skipped a development step or two, and should be testing with a memory diagnostic/exerciser rather than trying to execute AT91Bootstrap and whatever.

Regards

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 2 guests