Hardware Design
The first is the selection of BANK0. If you choose to connect BANK0 to NAND Flash, you need to set the status of pins OM1 and OM0 to 0, which means it is NAND FLASH mode. . NANDFlash mode will automatically
The first 4MB of NANDFLASH content is copied to memory.
Secondly, the pins of S3C2440 SDRAM are as follows:
nSRAS: SDRAM row select pin
nSCAS: SDRAM column select pin
nSCS: chip select signal
DQM[3:0]: Mask is to mask unnecessary bits. For example, if a 32-bit chip connected needs to write 8-bit data, then the other bits will be masked.
SCLK: clock
SCKE: clock enable
nBE[3:0]: DATA mask. Because SDRAM can only extract 8 bits of data from the core at a time, this DQM is used to distinguish the upper eight bits and the eighth bit when the user selects 32-bit and 16-bit data. Generally connected to the LDQM and HDQM of SDRAM. LDQM connects to DQM0 HDQM connects to DQM1 (only for 16bit SRAM)
nWBE: Write Byte Enable
Among them, nBE, nWBE, and DQM share a pin array and their relationship is as follows:
If ROM is connected, nWBE needs to be connected to the nWE pin of the chip. byte enable
If you want to connect SRAM, nWE is connected to the nWE pin on the chip. UB and LB on the SRAM are connected to BE0 and BE1 respectively.
If connected to SDRAM, DQM0 needs to be connected to the LDQM on the chip and DQM1 needs to be connected to UDQM.
See the chip manual below:
1. CLK is connected to the SDRAM CLK of the chip
2. CKE: Clock enable
3. BA0 and BA1 form a selector that can select four BANKs (0,1,2,3) in SDRAM.
5 CS: Film Selection
6. CAS: column address selection
7. RAS: Row address selection
8. WE: Write enable
9. LDQM and UDQM masks. .
sequential operations
Determine the direction of the program and timing according to the manual:
1. The SDRAM we use is EM63A165TS
2. Let’s look at BWSCON first: Since we set the SDRAM to bank 6, the registers we want to look at are:
ST6: Whether UB and LB are used? Because SDRAM only uses DQM instead of UB/LB, it is 0
WS6: Wait. Because waiting is not used, it is 0 (SDRAM has no waiting pin)
DW6: Bit width selection 16 bits
3. Set BANKCON6. Since it is SDRAM, set MT to 11.
Tac: The time for address establishment before chip selection. Since HCLK is 100M, this bit can be set to 0.
cos can be set to 0 because the time is very short.
The last SCAN: Since the column in the manual is 9, 01 is selected.
4. Set refresh register:
22 and 23 bits are all 1 to refresh SDRAM
Trp manual is 21ns and HCLK is 100M (10ns) so it should be 01 3 clock cycles (10*3 >> 21ns)
Refresh frequency: The frequency in the manual is 8192. Refresh 64ms. Substitute into the formula Refresh period = (2^11-refresh_count+1)/HCLK
to 1267
5 bank Size: Use burst mode with bit 7 set to 1
Bit 5: SDRAM can enter sleep state
The fourth bit: SCLK is only executed when entering SDRAM access
Position 2:0: Select 64M
6: MRSRB6: 0x20
Previous article:2440 controller gleanings
Next article:How to set the S2C2440 clock
Recommended ReadingLatest update time:2024-11-15 09:33
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- imx6ull transplant alsa
- Central media report: Beixing is becoming a potential unicorn company
- Experts who are familiar with 7135 are welcome to explain and discuss if interested.
- Recommend a fast source code style conversion tool AStyle
- 【Silicon Labs BG22-EK4108A Bluetooth Development Review】 + First Look at the W7230F1 Development Board
- (c = getchar()) Under what circumstances will it be equal to EOF?
- Wireless Communication RED Directive ETSI EN 301489-1 V2.2.3 (2019-11) Standard Update
- When designing PCB, please package the ground properly and don’t be so stingy, okay?
- Talk about the future of Wi-Fi 6 and predict who will lead the wireless connection
- Thermostatic ferrochrome first edition, non-thermostatic ferrochrome