Analysis of the misaligned connection between Memory Controller and peripheral address lines of s3c2440

Publisher:ShuxiangLatest update time:2021-09-07 Source: eefocusKeywords:s3c2440  Memory  Controller Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As shown in the s3c2440 data sheet:


When the data bit width of the peripheral Flash is 8 bits, (the address line of the Memory Cotroller) A0——A0 (A0 of the peripheral Flash);


When the data bit width of the peripheral Flash is 16 bits, (the address line of the Memory Cotroller) A1——A0 (A0 of the peripheral Flash);


When the data bit width of the peripheral Flash is 32 bits, (the address line of the Memory Cotroller) A2——A0 (A0 of the peripheral Flash);

reason:


The smallest data unit corresponding to the CPU address line (LADDR0~LADDR20) is byte, that is, 8 bits;


In actual applications, the peripheral Flash used usually has a data bit width of 8 bits, 16 bits, and 32 bits. The CPU must accurately obtain data according to the 8-bit data bit width. There must be an intermediate layer between the CPU and the Flash to solve this problem, which is the Memory Controller.


According to the data bit width of the peripheral Flash, through hardware processing, read 8-bit data processing method according to each address. For example, the data bit width of NOR Flash is 16 bits, as shown in the figure:

1. Read data from Nor flash


1. Get 1 byte of data each time


a. When the CPU wants to obtain the data at address 0, the Memery Controller sends the address 0b000000000000000000000, the NOR Flash receives the address 0b000000000000000000000, and returns the first data on the data line (LDATA0~LDATA15) to the Memery Controller of the CPU. The Memery Controller selects the lower 8 bits and gives them to the CPU.


b. When the CPU wants to obtain the data at address 1, the Memery Controller sends the address 0b000000000000000000001. The NOR Flash receives the address 0b0000000000000000000000 and returns the first data on the data line (LDATA0~LDATA15) to the Memery Controller of the CPU. The Memery Controller selects the upper 8 bits and gives them to the CPU.


2. Get 2 bytes of data each time


When the CPU wants to obtain the data at address 0, 1, the Memery Controller sends the address 0b000000000000000000000, the NOR Flash receives the address 0b000000000000000000000, and returns the first data on the data line (LDATA0~LDATA15) to the Memery Controller of the CPU, and the Memery Controller selects this data to the CPU.


3. Get 4 bytes of data each time


When the CPU wants to get the data at address 0, 1, 2, 3:


a. The Memory Controller sends the address 0b000000000000000000000, and the NOR Flash receives the address 0b000000000000000000000, and returns the first data on the data line (LDATA0 ~ LDATA15) to the Memory Controller of the CPU, and the Memory Controller reads this data.


b. The Memory Controller sends the address 0b000000000000000000010. The NOR Flash receives the address 0b000000000000000000001 and returns the second data on the data line (LDATA0 ~ LDATA15) to the Memory Controller of the CPU. The Memory Controller reads this data and combines the two 16-bit data into a 32-bit data and returns it to the CPU.


2. Write data to NOR Flash


1. Write 1 byte of data each time


a. When the CPU wants to write data to address 0, the Memery Controller sends the address 0b000000000000000000000, the NOR Flash receives the address 0b000000000000000000000, the CPU transmits the 8-bit data to the Memery Controller, and the Memery Controller sends the data to the lower 8 bits of the NOR Flash data line (LDATA0~LDATA7).


b. When the CPU wants to write data to address 1, the Memery Controller sends the address 0b000000000000000000001, the NOR Flash receives the address 0b000000000000000000000, the CPU transmits the 8-bit data to the Memery Controller, and the Memery Controller sends the data to the high 8 bits of the NOR Flash data line (LDATA8~LDATA15).


2. Write 2 bytes of data each time


When the CPU wants to write data to address 0,1, the Memery Controller sends the address 0b000000000000000000000, the NOR Flash receives the address 0b000000000000000000000, the CPU transmits the 16-bit data to the Memery Controller, and the Memery Controller sends the data to the NOR Flash data lines (LDATA0~LDATA15).


2. Write 4 bytes of data each time


When the CPU wants to write data to address 0, 1, 2, 3:


a. The Memery Controller sends the address 0b000000000000000000000, and the NOR Flash receives the address 0b0000000000000000000000. The CPU transmits the 32-bit data to the Memery Controller, and the Memery Controller sends the lower 16 bits of the data to the NOR Flash data lines (LDATA0~LDATA15).


b. The Memery Controller sends the address 0b000000000000000000010. The NOR Flash receives the address 0b000000000000000000001. The Memery Controller sends the high 16 bits of data to the NOR Flash data lines (LDATA0~LDATA15).


 


Summarize:


1. When the peripheral data width is 8 bits, the CPU's LADDR0-LADDRx is directly connected to the peripheral's LDATA0-LDATAx;


2. When the peripheral data width is 16 bits, the CPU's LADDR1-LADDRx is directly connected to the peripheral's LDATA0-LDATAx. Regardless of whether the CPU's LADDR0 is 0 or 1, the address obtained by the peripheral is LADDR1-LADDRx, corresponding to the same 16-bit data. The Memory Controller selects or combines this data.


3. When the peripheral data width is 32 bits, the CPU's LADDR2-LADDRx is directly connected to the peripheral's LDATA0-LDATAx. When the CPU's LADDR0 and LADDR0 are 00, 01, 10, or 11, the addresses obtained by the peripheral are all LADDR2-LADDRx, corresponding to 32-bit data. The Memery Controller selects or combines this data.

Keywords:s3c2440  Memory  Controller Reference address:Analysis of the misaligned connection between Memory Controller and peripheral address lines of s3c2440

Previous article:S3C2440 bare metal ------- code relocation
Next article:S3C2440 Boot Loader Boot Code Function Brief Description

Recommended ReadingLatest update time:2024-11-16 08:31

Classification of S3C2440 interrupt registers and analysis of the interrupt process
S3C2440 has a total of 60 interrupt sources, including 15 sub-interrupt sources, which correspond to each bit in the SUBSRCPND register, and the other 45 interrupt sources correspond to each bit in the SRCPND. It should be noted that EINT4~7 correspond to the same SRCPND bit, and EINT8~23 also correspond to one SRCPND
[Microcontroller]
Classification of S3C2440 interrupt registers and analysis of the interrupt process
S3C2440 bare metal --- NandFlash programming_timing and initialization
1. NandFlash initialization  Nandflash initialization mainly includes the setting of the timing diagram and the enabling of the Nandflash controller. Let's first look at the timing diagram in the S3C2440 chip manual. In the above figure, we have set HCLK to 100M. Then the clock cycle is 1/100M=10ns  Then the figur
[Microcontroller]
S3C2440 bare metal --- NandFlash programming_timing and initialization
S3C2440 bare metal experiment (1)-----clock
The clock is very important for electronic devices. It is a benchmark for transmitting data. Without this benchmark, it will cause system chaos. The frequency of S3C2440 has two input modes: external clock source and internal crystal oscillator (as shown below). The input frequency is generally relatively low, for
[Microcontroller]
s3c2440 bare metal-memory controller (3-1, NorFlash principle of norflash programming)
1.Flash types and characteristics: Flash is generally divided into nand flash and nor flash. Their respective characteristics are as follows: - Nor NAND XIP (execution on chip) yes no Performance (erase) Very slow (5s, blocks too big) Fast(3ms) Performance (write) slow quick Performance (read) quick quick reli
[Microcontroller]
s3c2440 bare metal-memory controller (3-1, NorFlash principle of norflash programming)
Design of four-axis motion controller based on S3C2440 and PCL6045BL
Motion control systems have been widely used in industrial control fields. In recent years, industrial control has placed increasing demands on motion control systems. Traditional PC-based and low-end microcontrollers are increasingly exposed to problems such as high cost, high consumption, and low reliability, and ca
[Microcontroller]
04-S3C2440u-boot learning u-boot analysis (3) source code stage 1 and 2
Refer to "Wei Dongshan 1st Video" Lesson 09 Section 3 u-boot analysis source code stage 1.WMV 1. Phase 1 (1) Open u-boot-1.1.6_JZ2440cpuarm920tstart.S _start: b reset (jump to reset): 1. Set SVC32 mode; reset: /* * set the cpu to SVC32 mode */ mrs r0,cpsr bic r0,r0,#0x1f orr r0,r0,#0xd3 msr c
[Microcontroller]
04-S3C2440u-boot learning u-boot analysis (3) source code stage 1 and 2
【mini2440】MMU of S3C2440
1. What is MMU? Reference: https://blog.csdn.net/p1279030826/article/details/105827355 1.1 Background and Development With the development of computer science and technology, the problems that need to be solved are becoming more and more complex, and single-task batch processing can no longer meet the needs. Applica
[Microcontroller]
【mini2440】MMU of S3C2440
u-boot-2011.06 based on s3c2440 development board transplant hardware ECC
In order to understand how u-boot performs hardware ECC, let's briefly analyze the related functions. NandFlash performs read and write operations in pages as the smallest unit. The read operation that supports hardware ECC is ultimately completed by the nand_read_page_hwecc function (in the drivers/mtd/nand directo
[Microcontroller]
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
Guess you like

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号