Configuring DDR parameters for Linux on the 6410 platform

Publisher:美梦小狮子Latest update time:2016-04-25 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Some time ago, I was very anxious to solve the problem of upgrading from 128M to 256M DDR. Finally, after discussing with others, I finally got the correct result. Now I have to summarize it myself.

My own hardware platform uses the 6410 DMC1, which is a 32-bit DRAM controller. The address lines of two 16-bit 128M DDRs are connected together to the 16 address lines of the 6410. The data lines are connected together to form 32 bits on the 6410, and the other control pins are connected accordingly. The software was previously written to 128M and ran OK. When it was changed to 256M, a page allocation error occurred, resulting in a fatal error and crash. Finally, I found that I had missed a change.

 

In summary, there are three places to confirm:

1. smdk6410.h in UBOOT
#define MEMORY_BASE_ADDRESS  0x50000000
....
#define CONFIG_NR_DRAM_BANKS 1    //rico 1016
#define PHYS_SDRAM_1  MEMORY_BASE_ADDRESS
#define PHYS_SDRAM_1_SIZE 0x10000000 //rico  for DDR size
First, only one BANK, DMC1, is used. Secondly, the size of SDRAM should be changed to 256M.

2. smdk6410.h in UBOOT
#define DMC1_MEM_CFG  ((1<<30)+(0<<21)+(0<<18)+(2<<15)+(0<<14)+(0<<13)+(0<<7)+(0<<6)+(3<<3)+(2<<0))
#define DMC1_MEM_CFG2  ((1<<11)+(3<<8)+(1<<6)+(0<<4)+(0<<2)+(1<<0))
#define DMC1_CHIP0_CFG  ((1<<16)+(
0x50<<8)+(0xF0<<0))
#define DMC_DDR_32_CFG  0x0
The timing parameters of DDR can be confirmed according to the specification. Here are several register parameters that need to be written into the DDR controller during DDR initialization, including bit width, chip select requirements, etc. The error that caused my computer to crash before was that the chip select was wrong, so changing it to 256M caused page address addressing errors.

3. .config in Kernel

You can use vi .config to enter. Make sure CONFIG_SMDK6410_RAMSIZE_256M is turned on and replace CONFIG_SMDK6410_RAMSIZE_128M. It is reflected in arch\arm\mach-s3c6400\include\mach\Memory.h:
#ifdef CONFIG_SMDK6410_RAMSIZE_256M
#define PHYS_SIZE       (256 * 1024 * 1024)
#else
#define PHYS_SIZE       (128 * 1024 * 1024)

Reference address:Configuring DDR parameters for Linux on the 6410 platform

Previous article:LPC startup process and remapping concept
Next article:U-Boot transplant DM9000 network card

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号