Samsung S3C2501X Скачать руководство пользователя страница 1

S3C2501X

32-BIT RISC

MICROPROCESSOR

USER'S MANUAL

Revision 1

 

查询S3C2501X供应商

捷多邦,专业PCB打样工厂,24小时加急出货

Содержание S3C2501X

Страница 1: ...S3C2501X 32 BIT RISC MICROPROCESSOR USER S MANUAL Revision 1 查询S3C2501X供应商 捷多邦 专业PCB打样工厂 24小时加急出货 ...

Страница 2: ...lications intended to support or sustain life or for any other application in which the failure of the Samsung product could create a situation where personal injury or death may occur Should the Buyer purchase or use a Samsung product for any such unintended or unauthorized application the Buyer shall indemnify and hold Samsung and its officers employees subsidiaries affiliates and distributors h...

Страница 3: ...cessing Hi Registers in THUMB State 2 8 2 8 The Program Status Registers 2 8 2 8 1 The Condition Code Flags 2 9 2 8 2 The Control Bits 2 9 2 9 Exceptions 2 11 2 9 1 Action on Entering an Exception 2 11 2 9 2 Action on Leaving an Exception 2 11 2 9 3 Exception Entry Exit Summary 2 12 2 9 4 FIQ 2 12 2 9 5 IRQ 2 13 2 9 6 Abort 2 13 2 9 7 Software Interrupt 2 14 2 9 8 Undefined Instruction 2 14 2 10 E...

Страница 4: ... 3 16 3 5 7 Instruction Cycle Times 3 17 3 6 8 Assembler Syntax 3 17 3 6 PSR Transfer MRS MSR 3 19 3 6 1 Operand Restrictions 3 19 3 6 2 Reserved Bits 3 21 3 6 3 Instruction Cycle Times 3 21 3 6 4 Assembler Syntax 3 22 3 7 Multiply and Multiply Accumulate MUL MLA 3 23 3 7 1 CPSR Flags 3 24 3 7 2 Instruction Cycle Times 3 24 3 7 3 Assembler Syntax 3 24 3 8 Multiply Long and Multiply Accumulate Long...

Страница 5: ...List 3 44 3 11 7 Data Aborts 3 44 3 11 8 Instruction Cycle Times 3 44 3 11 9 Assembler Syntax 3 45 3 12 Single Data Swap SWP 3 47 3 12 1 Bytes and Words 3 47 3 12 2 Use of R15 3 47 3 12 3 Data Aborts 3 48 3 12 4 Instruction Cycle Times 3 48 3 12 5 Assembler Syntax 3 48 3 13 Software Interrupt SWI 3 49 3 13 1 Return from the Supervisor 3 49 3 13 2 Comment Field 3 49 3 13 3 Instruction Cycle Times 3...

Страница 6: ...e Summary 3 65 3 20 Format 1 Move Shifted Register 3 67 3 20 1 Operation 3 67 3 20 2 Instruction Cycle Times 3 67 3 21 Format 2 Add Subtract 3 68 3 21 1 Operation 3 68 3 21 2 Instruction Cycle Times 3 69 3 22 Format 3 Move Compare Add Subtract Immediate 3 70 3 22 1 Operations 3 70 3 22 2 Instruction Cycle Times 3 70 3 23 Format 4 ALU Operations 3 71 3 23 1 Operation 3 71 3 23 2 Instruction Cycle T...

Страница 7: ...Instruction Cycle Times 3 87 3 33 Format 14 Push Pop Registers 3 88 3 33 1 Operation 3 88 3 33 2 Instruction Cycle Times 3 89 3 34 Format 15 Multiple Load Store 3 90 3 34 1 Operation 3 90 3 34 2 Instruction Cycle Times 3 90 3 35 Format 16 Conditional Branch 3 91 3 35 1 Operation 3 91 3 35 2 Instruction Cycle Times 3 92 3 36 Format 17 Software Interrupt 3 93 3 36 1 Operation 3 93 3 36 2 Instruction...

Страница 8: ... Master Priority Register 4 21 4 8 7 Core PLL Control Register 4 22 4 8 8 System Bus PLL Control Register 4 23 4 8 9 PHY PLL Control Register 4 24 Chapter 5 Memory Controller 5 1 Overview 5 1 5 2 Features 5 2 5 3 Memory Map 5 3 5 4 Bus Interface Signals 5 5 5 5 Endian Modes 5 7 5 6 Ext I O Bank Controller 5 13 5 6 1 Features 5 13 5 6 2 External Device Connection 5 14 5 6 3 Ext I O Bank Controller ...

Страница 9: ...errupt Pending Register 6 11 Chapter 7 Ethernet Controller 7 1 Overview 7 1 7 2 Features 7 2 7 3 MAC Function Blocks 7 3 7 3 1 Media Independent Interface MII 7 3 7 3 2 Physical Layer Entity PHY 7 4 7 3 3 Buffered Dma Interface BDI 7 4 7 3 4 The MAC Transmitter Block 7 4 7 3 5 The MAC Receiver Block 7 6 7 3 6 Flow Control Block 7 7 7 3 7 Buffered DMA BDMA Overview 7 7 7 4 Ethernet Controller Speci...

Страница 10: ...GDMA Controller 9 1 Overview 9 1 9 2 Feature 9 1 9 3 GDMA Special Registers 9 3 9 3 1 GDMA Programmable Priority Registers 9 4 9 3 2 GDMA Control Registers 9 9 9 3 3 GDMA Source Destination Address Registers 9 12 9 3 4 GDMA Transfer Count Registers 9 13 9 3 5 GDMA Run Enable Registers 9 14 9 3 6 GDMA Interrupt Pending Register 9 15 9 4 GDMA Mode Operation 9 16 9 4 1 Software Mode 9 16 9 4 2 Extern...

Страница 11: ...mit Buffer Register 11 16 11 3 5 High Speed UART Receive Buffer Register 11 17 11 3 6 High Speed UART Baud Rate Divisor Register 11 18 11 3 7 High Speed UART Baud Rate Examples 11 19 11 3 8 High Speed UART Control Character 1 Register 11 20 11 3 9 High Speed UART Control Character 2 Register 11 21 11 3 10 High Speed UART Autoband Boundary Register 11 22 11 3 11 High Speed UART Autobaud Table Regsi...

Страница 12: ...Chapter 1432 bit Timers 14 1 Overview 14 1 14 2 Feature 14 1 14 3 Interval Mode Operation 14 2 14 4 Toggle Mode Operation 14 2 14 5 Timer Operation Guidelines 14 3 14 6 Timer Special Register 14 4 14 6 1 Timer Mode Register 14 4 14 6 2 Timer Data Registers 14 6 14 6 3 Timer Count Registers 14 7 14 6 4 Timer Interrupt Clear Registers 14 8 14 6 5 Watchdog Timer Register 14 9 Chapter 15Electrical Dat...

Страница 13: ... Arithmetic Shift Right 3 13 3 9 Rotate Right 3 14 3 10 Rotate Right Extended 3 14 3 11 PSR Transfer 3 20 3 12 Multiply Instructions 3 23 3 13 Multiply Long Instructions 3 25 3 14 Single Data Transfer Instructions 3 28 3 15 Little Endian Offset Addressing 3 30 3 16 Half word and Signed Data Transfer with Register Offset 3 34 3 17 Half word and Signed Data Transfer with Immediate Offset and Auto In...

Страница 14: ...2501X 4 5 4 4 AHB Programmable Priority Registers 4 6 4 5 Shows the Clock Generation Logic of the S3C2501X 4 14 4 6 Divided System Clock Timing Diagram 4 19 5 1 Memory Bank Address map 5 4 5 2 Memory Controller Bus Signals 5 6 5 3 8 bit ROM SRAM and Flash Basic Connection 5 14 5 4 8 bit ROM SRAM and Flash Basic Connection 8 bit Memory x 2 5 15 5 5 16 bit SRAM Basic Connection 5 16 5 6 16 bit ROM a...

Страница 15: ...cy 3 5 58 5 32 Burst Write Operation 5 59 6 1 I2C Block Diagram 6 1 6 2 Master Transmitter and Slave Receiver 6 3 6 3 Master Receiver and Slave Transmitter 6 4 6 4 Start and Stop Conditions 6 5 6 5 Data Transfer Format 6 7 6 6 I2C Control Status Register 6 10 7 1 Ethernet Diagram 7 1 7 2 Data Structure of Tx Buffer Descriptor 7 10 7 3 Data Structure of Rx Buffer Descriptor 7 11 7 4 Data Structure ...

Страница 16: ...egister 10 12 10 6 Console UART Transmit Data Register 10 13 10 7 Console UART Receive Data Register 10 14 10 8 Console UART Baud Rate Divisor Register 10 15 10 9 Console UART Baud Rate Generator BRG 10 16 10 10 Console UART Control Character 1 Register 10 17 10 11 Console UART Control Character 2 Register 10 17 10 12 Interrupt Based Serial I O Transmit and Receive Timing Diagram 10 18 10 13 Seria...

Страница 17: ... Normal High Speed UART 11 29 11 23 Infra Red Transmit Mode Frame Timing Diagram 11 29 11 24 Infra Red Receive Mode Frame Timing Diagram 11 30 12 1 I O Port Mode Registers 1 2 12 3 12 2 I O Function Control Register 1 12 5 12 3 I O Function Control Register 2 12 6 12 4 I O Port Control Register for GDMA 12 7 12 5 I O Port Control Register for External Interrupt 12 9 12 6 I O Port External Interrup...

Страница 18: ......

Страница 19: ...troller 1 34 2 1 PSR Mode Bit Values 2 10 2 2 Exception Entry Exit 2 12 2 3 Exception Vectors 2 14 2 4 ARM9TDMI Implementation Option 2 19 2 5 CP15 Register Map 2 21 2 6 ID Code Register 2 21 2 7 Cache Type Register Format 2 22 2 8 CP15 Register 1 2 23 2 9 Clocking Modes 2 23 2 10 Cacheable Register Format 2 24 2 11 Write Buffer Control Register 2 25 2 12 Protection Space Register Format 2 26 2 13...

Страница 20: ...nstruction 3 76 3 14 Summary of Format 7 Instructions 3 77 3 15 Summary of format 8 instructions 3 79 3 16 Summary of Format 9 Instructions 3 81 3 17 Half word Data Transfer Instructions 3 83 3 18 SP Relative Load Store Instructions 3 84 3 19 Load Address 3 85 3 20 The ADD SP Instruction 3 87 3 21 PUSH and POP Instructions 3 88 3 22 The Multiple Load Store Instructions 3 90 3 23 The Conditional Br...

Страница 21: ...idth Load Operation with Little Endian 5 11 5 13 External 8 bit Datawidth Store Operation with Little Endian 5 12 5 14 External 8 bit Datawidth Load Operation with Little Endian 5 12 5 15 Ext I O Bank Controller Special Registers 5 21 5 16 Bank n Control BnCON Register 5 23 5 17 Muxed Bus Control Register 5 25 5 18 WAIT Control Register 5 27 5 19 Supported SDRAM Configuration of 32 bit External Bu...

Страница 22: ...ter 7 19 7 11 BMTXSTAT Register 7 20 7 12 BMRXINTEN Register 7 21 7 13 BMRXSTAT Register 7 22 7 14 BDMARXLEN Register 7 23 7 15 CFTXSTAT Register 7 24 7 16 MACCON Register 7 25 7 17 CAMCON Register 7 26 7 18 MACTXCON Register 7 27 7 19 MACTXSTAT Register 7 28 7 20 MACRXCON Register 7 29 7 21 MACRXSTAT Register 7 30 7 22 STADATA Register 7 31 7 23 STACON Register 7 32 7 24 CAMEN Register 7 33 7 25 ...

Страница 23: ... DES 3DES Key 2 Right Side Register Description 8 7 8 10 DES 3DES Key 3 Left Side Register Description 8 7 8 11 DES 3DES Key 3 Right Side Register Description 8 7 8 12 DES 3DES IV Left Side Register Description 8 7 8 13 DES 3DES IV Right Side Register Description 8 7 8 14 DES 3DES Input Data FIFO Description 8 8 8 15 DES 3DES Output Data FIFO Description 8 8 9 1 GDMA Special Registers Overview 9 3...

Страница 24: ... 11 4 11 4 High Speed UART Status Register 11 9 11 5 High Speed UART Status Register Description 11 9 11 6 High Speed UART Interrupt Enable Register 11 14 11 7 High Speed UART Interrupt Enable Register Description 11 14 11 8 High Speed UART Transmit Register 11 16 11 9 High Speed UART Transmit Register Description 11 16 11 10 High Speed UART Receive Register 11 17 11 11 High Speed UART Receive Reg...

Страница 25: ... Interrupt Sources 13 10 13 8 IPRIORHI IPRIORLO Register 13 12 13 9 INTTSTHI INTTSTLO Register 13 12 14 1 TMOD Register 14 4 14 2 TDATA0 TDATA5 Registers 14 6 14 3 TCNT0 TCNT5 Registers 14 7 14 4 Timer Interrupt Clear Registers 14 8 14 5 WDT Register 14 9 14 6 Watchdog Timer Timeout Value 14 10 15 1 Absolute Maximum Ratings 15 1 15 2 Recommended Operating Conditions 15 1 15 3 D C Electric Characte...

Страница 26: ...e The ARM940T cached processor is a member of the ARM9 Thumb family of high performance 32 bit system on a chip processor solutions It provides a complete high performance CPU subsystem including ARM9TDMI RISC integer CPU 4KB instruction data caches write buffer and protection unit with an AMBA bus interface The ARM9TDMI core within the ARM940T executes both the 32 bit ARM and 16 bit Thumb instruc...

Страница 27: ... Mbps operation to increase price performance options and to support phased conversions Full IEEE 802 3 compatibility for existing applications Media Independent interface MII or 7 wire interface Station management STA signaling for external physical layer configuration and link negotiation On chip CAM 21 addresses Full duplex mode for doubled bandwidth Pause operation hardware support for full du...

Страница 28: ... port Controller 64 programmable I O ports Individually configurable to input output or I O mode for dedicated signals 6 external interrupt request 4 external GDMA request 4 external GDMA acknowledge 6 timer outputs 7 UART signals I2C Controller Master mode operation only Baud rate generator for serial clock Three PLLs for System Core and PHY Clock Each PLL0 for ARM940T The Input frequency is 10MH...

Страница 29: ... Sys Bus Arbiter Six GDMA 133 MHz APB BUS WDT Six Timers Clock Gen Reset Drv with 4 PLLs Interrupt Controller A H B I F ARM940T 166 MHz 4KB D Cache 4KB D Cache High Speed UART Console UART I2 C GPIOs 2 bank SDRAM 8 bank Flash ROM SRAM Ext I O External Bus Master 10 MHz OSC 20 MHz or 25 MHz REQ ACK DES 3DES Figure 1 1 S3C2501X Block Diagram ...

Страница 30: ...01X PRODUCT OVERVIEW 1 5 1 4 PACKAGE DIAGRAM TOP View A1 ball pad corner 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 A B C D E F G H J K L M N P R T U V W Y Figure 1 2 S3C2501X Pin Assignment Diagram ...

Страница 31: ...O A11 ADDR19 O C1 TXD0_0 TXD_10M O A12 ADDR16 O C2 MDC_0 O A13 ADDR12 O C3 PHY_CLKO O A14 ADDR9 O C4 GPIO61 I O A15 ADDR6 O C5 GPIO57 I O A16 ADDR2 O C6 GPIO54 I O A17 XDATA31 I O C7 GPIO50 I O A18 XDATA30 I O C8 GPIO46 I O A19 XDATA25 I O C9 GPIO42 I O A20 XDATA24 I O C10 ADDR22 O B1 PHY_CLKSEL I C11 ADDR18 O B2 GPIO63 I O C12 ADDR14 O B3 GPIO62 I O C13 ADDR10 AP O B4 GPIO58 I O C14 ADDR7 O B5 GP...

Страница 32: ...D8 GND F18 XDATA12 I O D9 GPIO43 I O F19 XDATA9 I O D10 ADDR23 ALE O F20 XDATA7 I O D11 VDD1 8 G1 RXD0_2 I D12 ADDR13 O G2 RXD0_1 I D 3 GND G3 VDD3 3 D14 ADDR4 O G4 CRS_0 I D15 VDD1 8 G17 XDATA11 I O D16 XDATA29 I O G18 XDATA8 I O D17 GND G19 XDATA6 I O D18 XDATA19 I O G20 XDATA5 I O D19 XDATA16 I O H1 RX_ERR_0 I D20 XDATA14 I O H2 RX_DV_0 LINK_10M I E1 TX_EN_0 O H3 RXD0_3 I E2 TXD0_3 O H4 GND E3 ...

Страница 33: ... L11 GND J12 GND L12 GND J17 XDATA1 I O L17 VDD3 3 J18 XDATA0 I O L18 nWBE1 nBE1 DQM1 O J19 nSDCAS O L19 nWBE0 nBE0 DQM0 O J20 nSDRAS O L20 nWBE2 nBE2 DQM2 O K1 GND_A M1 VDD1 8_A K2 VDD1 8 M2 VDD1 8 K3 BUS_FILTER O M3 PHY_FILTER O K4 VDD1 8 M4 GND_A K9 GND M9 GND K10 GND M10 GND K11 GND M11 GND K12 GND M12 GND K17 nSDCS1 O M17 nRCS5 O K18 nSDCS0 O M18 nRCS6 O K19 nSDWE nWE16 O M19 nRCS7 O K20 nWBE...

Страница 34: ... nRCS4 O U2 CRS_1 I P1 GND_A U3 RXD1_1 I P2 MDC_1 O U4 GND P3 COL_1 I U5 N C P4 TXD1_1 LOOP_10M O U6 VDD3 3 P17 B0SIZE1 I U7 HURXD GPIO35 I O P18 CKE O U8 GND P19 nRCS0 O U9 GPIO0 I O P20 nRCS1 O U10 VDD3 3 R1 MDIO_1 I O U11 xINT2 GPIO10 I O R2 TX_CLK_1 I U12 xGDMA_Req0 GPIO14 I O R3 TXD1_2 O U13 GND R4 VDD1 8 U14 TIMER2 GPIO24 I O R17 VDD3 3 U15 VDD3 3 R18 B0SIZE0 I U16 TMODE I R19 nEWAIT I U17 G...

Страница 35: ...7 HUnDSR GPIO38 I O V8 HUnCTS GPIO40 I O W8 HUnDCD GPIO41 I O V9 GPIO1 I O W9 GPIO2 I O V10 GPIO5 I O W10 GPIO4 I O V11 xINT1 GPIO9 I O W11 xINT0 GPIO8 I O V12 xINT5 GPIO13 I O W12 xINT4 GPIO12 I O V13 xGDMA_Req3 GPIO17 I O W13 xGDMA_Req2 GPIO16 I O V14 xGDMA_Ack3 GPIO21 I O W14 xGDMA_Ack1 GPIO19 I O V15 TIMER3 GPIO25 I O W15 TIMER0 GPIO22 I O V16 TIMER5 GPIO27 I O W16 TIMER4 GPIO26 I O V17 nRESET...

Страница 36: ...D I Y11 GPIO7 I O Y2 CLKSEL I Y12 xINT3 GPIO11 I O Y3 GPIO30 I O Y13 xGDMA_Req1 GPIO15 I O Y4 GPIO31 I O Y14 xGDMA_Ack0 GPIO18 I O Y5 GPIO33 I O Y15 xGDMA_Ack2 GPIO20 I O Y6 HUTXD GPIO36 I O Y16 TIMER1 GPIO23 I O Y7 HUnRTS GPIO39 I O Y17 GND Y8 HCLKO O Y18 SDA I O Y9 GPIO3 I O Y19 TMS I Y10 GPIO6 I O Y20 nTRST I ...

Страница 37: ... is high XCLK is used both clock sources BUS_FILTER 1 I poar50_abb PLL filter pin for System PLL If the PLL is used 320pF capacitor should be connected between the pin and ground PHY_FREQ 1 I Phic PHY clock frequency select for PHY PLL 0 20MHz 1 25MHz PHY_CLKSEL 1 I Phic Clock Select for PHY PLL If this pin is set to low the PHY PLL generates clock depending on PHY_FREQ state The PHY PLL goes into...

Страница 38: ...efined In this mode the CPU clock and system clock can operate independently as long as the CPU clock is faster than system clock CPU_FREQ 2 0 3 I phic CPU Clock Frequency Selection BUS_FREQ 2 0 3 I phic System Bus Clock Frequency Selection nRESET 1 I phis Not Reset NRESET is the global reset input for the S3C2501X and nRESET must be held to low for at least 64 clock cycles for digital filtering T...

Страница 39: ...issued at the same time as burst read or burst write by asserting high on ADDR 10 AP XDATA 31 0 32 I O phbsut20 External bi directional 32bit data bus The S3C2501X supports 8 bit 16bit 32bit bus with ROM SRAM Flash Ext IO bank but supports 16 bit or 32 bit bus with SDRAM bank nSDCS 1 0 2 O phot20 Not chip select strobe for SDRAM Two SDRAM banks are supported nSDRAS 1 O phot20 Not row address strob...

Страница 40: ... I O By controlling the nRCS signals you can map CPU address into the physical memory banks B0SIZE 1 0 2 I phic Bank 0 Data Bus Access Size Bank0 is used for the boot program You use these pins to set the size of the bank 0 data bus as follows 01 Byte 10 Half word 11 Word and 00 reserved nOE 1 O phot20 Not output enable Whenever a memory read access occurs the nOE output controls the output enable...

Страница 41: ... get the control of the bus and the XBMACK goes low XBMACK 1 O phob8 External bus Acknowledge TAP Control 5 TCK 1 I phic JTAG Test Clock The JTAG test clock shifts state information and test data into and out of the S3C2501X during JTAG test operations TMS 1 I phicu JTAG Test Mode Select This pin controls JTAG test operations in the S3C2501X This pin is internally connected pull up TDI 1 I phicu J...

Страница 42: ...ynchronously with minimum delay from the start of a collision on the medium in MII mode COL_10M is asserted when a 10 Mbit s PHY detects a collision TX_CLK_0 1 I phis Transmit Clock Transmit Clock for 10M The controller drives TXD 3 0 and TX_EN from the rising edge of TX_CLK In MII mode the PHY samples TXD 3 0 and TX_EN on the rising edge of TX_CLK For data transfers TXCLK_10M is provided by the 1...

Страница 43: ...more TX_CLK periods TX_ERR causes the PHY to emit one or more symbols which are not part of the valid data or delimiter set located somewhere in the frame that is being transmitted PCOMP_10M is asserted immediately after the packet s DA field is received PCOMP_10M is used with the Management Bus of the DP83950 Repeater Interface Controller from National Semiconductor The MAC can be programmed to a...

Страница 44: ...RXCLK_10 M clock comes from the 10Mbit s PHY RXD0 3 0 RXD_10M 4 I phis Receive Data Receive Data for 10M RXD is aligned on nibble boundaries RXD 0 corresponds to the first bit received on the physical medium which is the LSB of the byte in one clock period and the fifth bit of that byte in the next clock RXD_10M is shared with RXD 0 and it is a line for receiving data from the 10 Mbit s PHY RX_DV_...

Страница 45: ...t Data I O When a read command is being executed data that is clocked out of the PHY is presented on this pin When a write command is being executed data that is clocked out of the controller is presented on this pin for the Physical Layer Entity PHY COL_1 1 I phis Collision Detected Collision Detected for 10M COL is asserted asynchronously with minimum delay from the start of a collision on the m...

Страница 46: ...the first byte and the fifth bit of that byte during the next clock TXD_10M is shared with TXD 0 and is a data line for transmitting to the 10 Mbit s PHY LOOP_10M is shared with TXD 1 and is driven by the loop back bit in the control register TX_EN_1 1 O phob4 Transmit Enable Transmit Enable for 10M TX_EN provides precise framing for the data carried on TXD 3 0 This pin is active during the clock ...

Страница 47: ... Bus of the DP83950 Repeater Interface Controller from National Semiconductor The MAC can be programmed to assert PCOMP if there is a CAM match or if there is not a match The RIC Repeater Interface Controller uses this signal to compress shorten the packet received for management purposes and to reduce memory usage See the DP83950 Data Sheet published by National Semiconductor for details on the R...

Страница 48: ... LSB of the byte in one clock period and the fifth bit of that byte in the next clock RXD_10M is shared with RXD 0 and it is a line for receiving data from the 10 Mbit s PHY RX_DV_1 LINK_10M 1 I phis Receive Data Valid PHY asserts RX_DV synchronously holding it active during the clock periods in which RXD 3 0 contains valid data received PHY asserts RX_DV no later than the clock period when it pla...

Страница 49: ...bst8 Not HUART Data Terminal Ready This output signals the host or peripheral that HUART is ready to transmit or receive serial data General I O Port HUnDSR GPIO38 1 I O phbst8 Not HUART Data Set Ready This input signals in the HUART that the peripheral or host is ready to transmit or receive serial data General I O Port HUnRTS GPIO39 1 I O phbst8 Not request to send This pin output state goes Low...

Страница 50: ...Port GPIO GPIO 7 0 8 I O phbst8 General I O Ports Included GPIO 34 28 7 I O phbst8 General I O Ports xINT GPIO 63 42 22 I O phbst8 General I O Ports xGDMA_ Req xINT 5 0 GPIO 13 8 6 I O phbst8 External interrupt requests General I O Ports xGDMA _Ack xGDMA_Req 3 0 GPIO 17 14 4 I O phbst8 External DMA requests for GDMA General I O Ports Timer xGDMA_Ack 3 0 GPIO 21 18 4 I O phbst8 External DMA acknowl...

Страница 51: ...bcut12 I O 12mA LVCMOS Level Tri State Buffer 3 3V Pull up resistor phbsud4 I O 4sm LVCMOS Schmit trigger level Tri State Buffer 3 3 Pull up resister phbst8 I O 8mA LVCMOS Schmit trigger level Tri State Buffer 3 3V phbst16 I O 16mA LVCMOS Schmit trigger leve Tri State Buffer 3 3V Phbst24 I O 24mA LVCMOS Schmit trigger level Tri State Buffer 3 3V Phbsut20 I O 20mA LVCMOS Schmit trigger level Tri St...

Страница 52: ...03111 Table 1 4 S3C2501X Memory Controller Registers Address R W Description Reset Value B0CON 0xF0010000 R W Bank 0 control register 0xC514E488 B1CON 0xF0010004 R W Bank 1 control register 0xC514E488 B2CON 0xF0010008 R W Bank 2 control register 0xC514E488 B3CON 0xF001000C R W Bank 3 control register 0xC514E488 B4CON 0xF0010010 R W Bank 4 control register 0xC514E488 B5CON 0xF0010014 R W Bank 5 con...

Страница 53: ...r counter 0x00000000 BMTXINTENA 0xF00A0018 R W BDMA MAC Tx Interrupt enable register 0x00000000 BMRXINTENA 0xF00A001C R W BDMA MAC Rx Interrupt enable register 0x00000000 BMTXSTATA 0xF00A0020 R W BDMA MAC Tx Status register 0x00000000 BMRXSTATA 0xF00A0024 R W BDMA MAC Rx Status register 0x00000000 BDMARXLENA 0xF00A0028 R W Receive Frame Size 0x00000000 CFTXSTATA 0xF00A0030 R Transmit control frame...

Страница 54: ...0xF00C0020 R W BDMA MAC Tx Status register 0x00000000 BMRXSTATB 0xF00C0024 R W BDMA MAC Rx Status register 0x00000000 BDMARXLENB 0xF00C0028 R W Receive Frame Size 0x00000000 CFTXSTATB 0xF00C0030 R Transmit control frame status 0x00000000 MACCONB 0xF00D0000 R W MAC control 0x00000000 CAMCONB 0xF00D0004 R W CAM control 0x00000000 MACTXCONB 0xF00D0008 R W Transmit control 0x00000000 MACTXSTATB 0xF00D...

Страница 55: ...e register 0x00000000 DESKEY1L 0xF0090010 R W Key 1 left half 0x00000000 DESKEY1R 0xF0090014 R W Key 1 right half 0x00000000 DESKEY2L 0xF0090018 R W Key 2 left half 0x00000000 DESKEY2R 0xF009001C R W Key 2 right half 0x00000000 DESKEY3L 0xF0090020 R W Key 3 left half 0x00000000 DESKEY3R 0xF0090024 R W Key 3 right half 0x00000000 DESIVL 0xF0090028 R W IV left half 0x00000000 DESIVR 0xF009002C R W I...

Страница 56: ...48 R W GDMA channel 2 destination address register 0x00000000 DTCR2 0xF005004C R W GDMA channel 2 transfer count register 0x00000000 DRER2 0xF0050050 W GDMA channel 2 run enable register 0x00000000 DIPR2 0xF0050054 R WC GDMA channel 2 interrupt pending register 0x00000000 DCON3 0xF0050060 R W GDMA channel 3 control register 0x00000000 DSAR3 0xF0050064 R W GDMA channel 3 source address register 0x0...

Страница 57: ... character register 2 0x00000000 Table 1 12 S3C2501X High speed UART Controller Register Address R W Description Reset Value HUCON 0xF0080000 R W High Speed UART control register 0x00000000 HUSTAT 0xF0080004 R W High Speed UART status register HUINT 0xF0080008 R W High Speed UART interrupt enable register 0x00000000 HUTXBUF 0xF008000C W High Speed UART transmit data register HURXBUF 0xF0080010 R H...

Страница 58: ...terrupt mode register 0x00000000 EXTMOD 0xF0140004 R W External interrupt mode register 0x00000000 INTMASK 0xF0140008 R W Internal Interrupt mask register 0xFFFFFFFF EXTMASK 0xF014000C R W External Interrupt mask register 0x8000007F INTPRIOR0 0xF0140020 R W Interrupt priority register 0 0x03020100 INTPRIOR1 0xF0140024 R W Interrupt priority register 1 0x07060504 INTPRIOR2 0xF0140028 R W Interrupt ...

Страница 59: ...ster 0xFFFFFFFF TDATA1 0xF0040018 R W Timer 1 data register 0x00000000 TCNT1 0xF004001C R W Timer 1 count register 0xFFFFFFFF TDATA2 0xF0040020 R W Timer 2 data register 0x00000000 TCNT2 0xF0040024 R W Timer 2 count register 0xFFFFFFFF TDATA3 0xF0040028 R W Timer 3 data register 0x00000000 TCNT3 0xF004002C R W Timer 3 count register 0xFFFFFFFF TDATA4 0xF0040030 R W Timer 4 data register 0x00000000...

Страница 60: ...he processor mode or the contents of the registers 2 2 SWITCHING STATE 2 2 1 ENTERING THUMB STATE Entry into THUMB state can be achieved by executing a BX instruction with the state bit bit 0 set in the operand register Transition to THUMB state will also occur automatically on return from an exception IRQ FIQ UNDEF ABORT SWI etc if the exception was entered with the processor in THUMB state 2 2 2...

Страница 61: ...ess Word Address Most significant byte is at lowest address Word is addressed by byte address of most significant byte 24 15 16 Figure 2 1 Big Endian Addresses of Bytes within Words NOTE The data locations in the external memory are different with Figure 2 1 in the S3C2501X Please refer to the chapter 4 system manager 2 3 2 LITTLE ENDIAN FORMAT In Little Endian format the lowest numbered byte in a...

Страница 62: ...pport a data transfer or channel process IRQ irq Used for general purpose interrupt handling Supervisor svc Protected mode for the operating system Abort mode abt Entered after a data or instruction prefetch abort System sys A privileged user mode for the operating system Undefined und Entered when an undefined instruction is executed Mode changes may be made under software control or may be broug...

Страница 63: ...ormation Register 14 is used as the subroutine link register This receives a copy of R15 when a branch and link BL instruction is executed At all other times it may be treated as a general purpose register The corresponding banked registers R14_svc R14_irq R14_fiq R14_abt and R14_und are similarly used to hold the return values of R15 when interrupts and exceptions arise or when branch and link in...

Страница 64: ...er R0 R1 R2 R3 R4 R5 R6 R7 R10 R8 R9 R11 R12 R15 PC R13_und R14_und R0 R1 R2 R3 R4 R5 R6 R7 R10 R8 R9 R11 R12 R15 PC R13_irq R14_irq R0 R1 R2 R3 R4 R5 R6 R7 R10 R8 R9 R11 R12 R15 PC R13_abt R14_abt R10 R8 R9 R11 R12 R15 PC R13_svc R14_svc R0 R1 R2 R3 R4 R5 R6 R7 R0 R1 R2 R3 R4 R5 R6 R7 R8_fiq R9_fiq R10_fiq R11_fiq R12_fiq R13_fiq R14_fiq R15 PC R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R1...

Страница 65: ...s SPSRs for each privileged mode This is shown in Figure 2 4 CPSR CPSR SPSR_fiq CPSR SPSR_svc CPSR SPSR_abt CPSR SPSR_irq CPSR SPSR_und System User FIQ Supervisor About IRQ Undefined THUMB State Program Status Registers banked register THUMB State General Registers and Program Counter R0 R1 R2 R3 R4 R5 R6 R7 SP LR PC SP_fiq LR_fiq R0 R1 R2 R3 R4 R5 R6 R7 PC SP_svg LR_svc R0 R1 R2 R3 R4 R5 R6 R7 PC...

Страница 66: ...B state SP maps onto ARM state R13 THUMB state LR maps onto ARM state R14 The THUMB state program counter maps onto the ARM state program counter R15 This relationship is shown in Figure 2 5 R0 R1 R2 R3 R4 R5 R6 R7 R0 R1 R2 R3 R5 R6 R7 R8 R9 R10 R11 R12 Stack Pointer R13 Link Register R14 Program Counter R15 CPSR SPSR Stack Pointer SP Link Register LR Program Counter PC CPSR SPSR THUMB State ARM S...

Страница 67: ...values with the CMP and ADD instructions For more information refer to Figure 3 34 2 8 THE PROGRAM STATUS REGISTERS The ARM9TDMI contains a Current Program Status Register CPSR plus five Saved Program Status Registers SPSRs for use by exception handlers These register s functions are Hold information about the most recently performed ALU operation Control the enabling and disabling of interrupts S...

Страница 68: ...ftware The T bit This reflects the operating state When this bit is set the processor is executing in THUMB state otherwise it is executing in ARM state This is reflected on the TBIT external signal Note that the software must never change the state of the TBIT in the CPSR If this happens the processor will enter an unpredictable state Interrupt disable bits The I and F bits are the interrupt disa...

Страница 69: ... LR_svc SP_svc PC CPSR SPSR_svc R12 R0 R14_svc R13_svc PC CPSR SPSR_svc 10111 Abort R7 R0 LR_abt SP_abt PC CPSR SPSR_abt R12 R0 R14_abt R13_abt PC CPSR SPSR_abt 11011 Undefined R7 R0 LR_und SP_und PC CPSR SPSR_und R12 R0 R14_und R13_und PC CPSR 11111 System R7 R0 LR SP PC CPSR R14 R0 PC CPSR Reserved bits The remaining bits in the PSRs are reserved When changing a PSR s flag or control bits you mu...

Страница 70: ...the correct place on return from the exception This means that the exception handler need not determine which state the exception was entered from For example in the case of SWI MOVS PC R14_svc will always return to the next instruction regardless of whether the SWI was executed in ARM or THUMB state 2 Copies the CPSR into the appropriate SPSR 3 Forces the CPSR mode bits to a value which depends o...

Страница 71: ...rated the data abort 4 The value saved in R14_svc upon reset is unpredictable 2 9 4 FIQ The FIQ Fast Interrupt Request exception is designed to support a data transfer or channel process and in ARM state has sufficient private registers to remove the need for register saving thus minimizing the overhead of context switching FIQ is externally generated by taking the nFIQ input LOW This input can ex...

Страница 72: ... type Single data transfer instructions LDR STR write back modified base registers the Abort handler must be aware of this The swap instruction SWP is aborted as though it had not been executed Block data transfer instructions LDM STM complete If write back is set the base is updated If the instruction would have overwritten the base with data ie it has the base in the transfer list the overwritin...

Страница 73: ...le it takes the undefined instruction trap This mechanism may be used to extend either the THUMB or ARM instruction set by software emulation After emulating the failed instruction the trap handler should execute the following irrespective of the state ARM or Thumb MOVS PC R14_und This restores the CPSR and returns to the instruction following the undefined instruction 2 10 EXCEPTION VECTORS The f...

Страница 74: ...t are mutually exclusive since they each correspond to particular non overlapping decoding of the current instruction If a data abort occurs at the same time as a FIQ and FIQs are enabled ie the CPSR s F flag is clear ARM9TDMI enters the data abort handler and then immediately proceeds to the FIQ vector A normal return from FIQ will cause the data abort handler to resume execution Placing data abo...

Страница 75: ...ntinuous 20 MHz processor clock The maximum IRQ latency calculation is similar but must allow for the fact that FIQ has higher priority and could delay entry into the IRQ handling routine for an arbitrary length of time The minimum latency for FIQ or IRQ consists of the shortest time the request can take through the synchroniser Tsyncmin plus Tfiq This is 4 processor cycles 2 12 RESET When the nRE...

Страница 76: ...f system on a chip designs The EmbeddedICE software and hardware debug features of the ARM940T macrocell are accessed via a standard 5 pin JTAG port and are supported by ARM s Software Development Toolkit and Multi ICE interface hardware The EmbeddedICE features allow software download and debug of the final production system with no cost overhead there is no monitor code or other use of target re...

Страница 77: ...tection Unit CP15 ARM9TDMI Processor Core Integral EmbeddedICE AMBA Interface Instruction Cache 4K I Cache Control Data Cache 4K D Cache Control CPID 31 0 CPDIN 31 0 CPDOUT 31 0 BA 31 0 Bcontrol BD 31 0 DA 31 0 DD 31 0 IA 31 0 ID 31 0 JTAG Interface 4 0 Figure 2 7 ARM940T Block Diagram ...

Страница 78: ...defined in CP15 are accessible with MCR and MRC instructions Registers and operations provided by any coprocessors attached to the external coprocessor interface will be accessible with appropriate coprocessor instructions The ARM9TDMI processor core implements ARM Architecture v4T and so executes the ARM 32 bit instruction set and the compressed Thumb 16 bit instruction set The programmer s model...

Страница 79: ... data abort model significantly simplifies the software data abort handler 2 15 2 INSTRUCTION SET EXTENSION SPACES All ARM processors implement the undefined instruction space as one of the entry mechanisms for the undefined instruction exception That is ARM instructions with opcode 27 25 0b011 and opcode 4 1 are undefined on all ARM processors including the ARM9TDMI and ARM7TDMI ARM Architecture ...

Страница 80: ...n Read write 10 14 Reserved Undefined 15 Test Not accessed in normal operations NOTE Register locations 0 2 5 and 6 each provide access to more than one register The register accessed depends upon the value of the opcode_2 field See the register descriptions that follow for further information 2 16 1 1 Register 0 ID code This is a read only register which returns a 32 bit device ID code The ID cod...

Страница 81: ...register The register contains information about the size and architecture of the caches The format of the register is shown in Table 2 7 Table 2 7 Cache Type Register Format Register Bits Meaning Value 31 29 Reserved 000 28 25 Cache type 0111 24 Harvard Unified 1 defines Harvard cache 23 21 Reserved 000 20 18 DCache size 011 defines 4KB 17 15 DCache associativity 110 defines 64 way 14 DCache base...

Страница 82: ...nable bit D 1 Reserved should be zero 0 Protection unit enable P The bits in the control register have the following functions Bits 31 30 Control the clocking mode of the processor as shown in Table 2 9 Clocking modes are discussed in Chapter5 Clock Modes Table 2 9 Clocking Modes Clockin Mode Bit 31 Bit 30 FastBus mode 0 0 Reserved 1 0 Synchronous 0 1 Asynchronous 1 1 Bit 13 Selects the location o...

Страница 83: ...acheable bits If the opcode_2 field 1 the instruction cacheable bits are programmed For example MCR p15 0 Rd c2 c0 1 Write instruction cacheable bits MRC p15 0 Rd c2 c0 1 Read instruction cacheable bits The format for the data and instruction cacheable bits is similar as shown in Table2 10 Setting a bit makes an area cacheable clearing it makes it non cacheable All defined bits in the cacheable re...

Страница 84: ...ata area 7 6 Write buffer control bit B_d6 for data area 6 5 Write buffer control bit B_d5 for data area 5 4 Write buffer control bit B_d4 for data area 4 3 Write buffer control bit B_d3 for data area 3 2 Write buffer control bit B_d2 for data area 2 1 Write buffer control bit B_d1 for data area 1 0 Write buffer control bit B_d0 for data area 0 2 16 1 6 Register 5 Instruction and data space protec...

Страница 85: ...1 0 bits of area 2 3 2 ap1 1 0 bits of area 1 1 0 ap0 1 0 bits of area 0 The values of the Iapn 1 0 and Dapn 1 0 bits define the access permission for each area of memory The encoding is shown in Table 2 13 NOTE On reset the values of the Iapn 1 0 and Dapn 1 0 bits for all areas are undefined However as on reset the protection unit is disabled and all areas are effectively set to no access The pro...

Страница 86: ...a Protection Region Registers ARM instruction Protection region register MCR MRC p15 0 Rd c6 c7 0 Data memory region 7 MCR MRC p15 0 Rd c6 c6 0 Data memory region 6 MCR MRC p15 0 Rd c6 c5 0 Data memory region 5 MCR MRC p15 0 Rd c6 c4 0 Data memory region 4 MCR MRC p15 0 Rd c6 c3 0 Data memory region 3 MCR MRC p15 0 Rd c6 c2 0 Data memory region 2 MCR MRC p15 0 Rd c6 c1 0 Data memory region 1 MCR M...

Страница 87: ...ister The behavior is undefined if this is not the case Area sizes are given in Table 2 17 Table 2 17 Area Size Encoding Bit encoding Area size Bit encoding Area size 00000 to 01010 Reserved 10101 4MB 01011 4KB 10110 8MB 01100 8KB 10111 16MB 01101 16KB 11000 32MB 01110 32KB 11001 64MB 01111 64KB 11010 128MB 10000 128KB 11011 256MB 10001 256KB 11100 512MB 10010 512KB 11101 1GB 10011 1MB 11110 2GB 1...

Страница 88: ...egister 7 ARM instruction Data Protection region register MCR p15 0 Rd c7 c5 0 should be zero Flush ICache MCR p15 0 Rd c7 c5 2 Index segment Flush ICache single entry MCR p15 0 Rd c7 c6 0 should be zero Flush DCache MCR p15 0 Rd c7 c6 2 Index segment Flush DCache single entry MCR p15 0 Rd c7 c10 2 Index segment Clean DCache single entry MCR p15 0 Rd c7 c13 1 Address Prefetch ICache line MCR p15 0...

Страница 89: ...uses this to occur MCR p15 0 Rd c7 c0 4 The following instruction causes the same affect and has been added for backward compatibility with StrongARM SA 1 MCR p15 0 Rd c15 c8 2 This stalls the processor with internal clocks held high from the time that this instruction is executed until one of the signals nFIQ nIRQ or EDBGRQ is asserted Also if the debugger sets the debug request bit in the Embedd...

Страница 90: ...he processor core with CPnWAIT asserted until any outstanding accesses in the write buffer have been completed that is until all data has been written to memory 2 16 1 9 Register 9 Instruction and data lockdown registers These registers allow regions of the cache to be locked down The opcode_2 field determines whether the instruction or data caches are programmed If the opcode_2 field 0 the data l...

Страница 91: ...set the respective caches into a pseudo round robin replacement mode All defined bits in the test registers are set to zero at reset Table 2 22 CP15 Register 15 Register bit Function 31 4 Reserved 3 ITRRobin 2 DTRRobin 1 0 Reserved 2 16 1 11 Reserved Registers Accessing a reserved register is unpredictable ...

Страница 92: ...pt Undefined Single data transfer Cond 1 1 1 1 Ignored by processor Cond 1 1 1 0 CRn Rd CP Opc L CP CP 1 CRm Cond 1 1 1 0 CRn CRd CP Opc CP CP 0 CRm Cond 1 1 0 P U N W L Rn CRd CP Offset Cond 1 0 1 L Offset Cond 1 0 0 P U S W L Rn Register List Cond 0 1 1 1 Cond 0 1 1 P U B W L Rn Rd Offset Cond 0 0 0 P U 1 W L Rn Rd Offset 1 S H 1 Offset Cond 0 0 0 P U 0 W L Rn Rd 0 0 0 0 1 S H 1 Rm Cond 0 0 0 1 ...

Страница 93: ...CPSR flags Rn Op2 CMP Compare CPSR flags Rn Op2 EOR Exclusive OR Rd Rn AND NOT Op2 OR op2 AND NOT Rn LDC Load coprocessor from memory Coprocessor load LDM Load multiple registers Stack manipulation Pop LDR Load register from memory Rd address MCR Move CPU register to coprocessor register cRn rRn op cRm MLA Multiply accumulate Rd Rm Rs Rn MOV Move register or constant Rd Op2 MRC Move from coprocess...

Страница 94: ...arry Rd Op2 Rn 1 Carry SBC Subtract with carry Rd Rn Op2 1 Carry STC Store coprocessor register to memory Address CRn STM Store multiple Stack manipulation push STR Store register to memory address Rd SUB Subtract Rd Rn Op2 SWI Software Interrupt OS call SWP Swap register with memory Rd Rn Rn Rm TEQ Test bit wise equality CPSR flags Rn EOR Op2 TST Test bits CPSR flags Rn AND Op2 ...

Страница 95: ...ag is set In practice fifteen different conditions may be used these are listed in Table 3 2 The sixteenth 1111 is reserved and must not be used In the absence of a suffix the condition field of most instructions is set to Always suffix AL This means the instruction will always be executed regardless of the CPSR condition codes Table 3 2 Condition Code Summary Code Suffix Flags Meaning 0000 EQ Z s...

Страница 96: ...uctions 31 24 27 19 15 8 7 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 Cond Rn 28 16 11 12 23 20 4 3 3 0 Operand Register If bit0 of Rn 1 subsequent instructions decoded as THUMB instructions If bit0 of Rn 0 subsequent instructions decoded as ARM instructions 31 28 Condition Field Figure 3 2 Branch and Exchange Instructions 3 3 1 INSTRUCTION CYCLE TIMES The BX instruction takes 2S 1N cycles ...

Страница 97: ...R0 Branch and change to THUMB state CODE16 Assemble subsequent code as Into_THUMB THUMB instructions ADR R5 Back_to_ARM Generate branch target to word aligned address hence bit 0 is low and so change back to ARM state BX R5 Branch and change back to ARM state ALIGN Word align CODE32 Assemble subsequent code as ARM instructions Back_to_ARM ...

Страница 98: ...t of the pre fetch operation which causes the PC to be 2 words 8 bytes ahead of the current instruction 3 4 1 THE LINK BIT Branch with Link BL writes the old PC into the link register R14 of the current bank The PC value written into R14 is adjusted to allow for the pre fetch and contains the address of the instruction following the branch and link instruction Note that the CPSR is not saved with ...

Страница 99: ...l be used expression The destination The assembler calculates the offset Examples here BAL here Assembles to 0xEAFFFFFE note effect of PC offset B there Always condition used as default CMP R1 0 Compare R1 with zero and branch to fred if R1 was zero otherwise continue BEQ fred Continue to next instruction BL sub ROM Call subroutine at computed address ADDS R1 1 Add 1 to register 1 setting CPSR fla...

Страница 100: ...p1 Op2 0011 RSB Rd Op2 Op1 0100 ADD Rd Op1 Op2 0101 ADC Rd Op1 Op2 C 0110 SBC Rd OP1 Op2 C 1 0111 RSC Rd Op2 Op1 C 1 1000 TST set condition codes on Op1 AND Op2 1001 TEO set condition codes on OP1 EOR Op2 1010 CMP set condition codes on Op1 Op2 1011 SMN set condition codes on Op1 Op2 1100 ORR Rd Op1 OR Op2 1101 MOV Rd OP2 1110 BIC Rd Op1 AND NOT Op2 1111 MVN Rd NOT Op2 25 Immediate Operand 0 Opera...

Страница 101: ...immediate value Imm according to the value of the I bit in the instruction The condition codes in the CPSR may be preserved or updated as a result of this instruction according to the value of the S bit in the instruction Certain operations TST TEQ CMP CMN do not write the result to Rd They are used only to perform tests and to set the condition codes on the result and always have the S bit set Th...

Страница 102: ...10 Operand1 operand2 carry 1 RSC 0111 Operand2 operand1 carry 1 TST 1000 As AND but result is not written TEQ 1001 As EOR but result is not written CMP 1010 As SUB but result is not written CMN 1011 As ADD but result is not written ORR 1100 Operand1 OR operand2 MOV 1101 Operand2 operand1 is ignored BIC 1110 Operand1 AND NOT operand2 Bit clear MVN 1111 NOT operand2 operand1 is ignored The arithmeti...

Страница 103: ...s 3 5 2 1 Instruction Specified Shift Amount When the shift amount is specified in the instruction it is contained in a 5 bit field which may take any value from 0 to 31 A logical shift left LSL takes the contents of Rm and moves each bit by the specified amount to a more significant position The least significant bits of the result are filled with zeros and the high bits of Rm which do not map in...

Страница 104: ...L 0 and allow LSR 32 to be specified An arithmetic shift right ASR is similar to logical shift right except that the high bits are filled with bit 31 of Rm instead of zeros This preserves the sign in 2 s complement notation For example ASR 5 is shown in Figure 3 8 31 Contents of Rm Value of Operand 2 0 carry out 4 5 30 Figure 3 8 Arithmetic Shift Right The form of the shift field which might be ex...

Страница 105: ... The form of the shift field which might be expected to give ROR 0 is 31 Contents of Rm Value of Operand 2 0 carry out 4 5 Figure 3 9 Rotate Right used to encode a special function of the barrel shifter rotate right extended RRX This is a rotate right by one bit position of the 33 bit quantity formed by appending the CPSR C flag to the most significant end of the contents of Rm as shown in Figure ...

Страница 106: ...ll be a logical extension of the shift described above 1 LSL by 32 has result zero carry out equal to bit 0 of Rm 2 LSL by more than 32 has result zero carry out zero 3 LSR by 32 has result zero carry out equal to bit 31 of Rm 4 LSR by more than 32 has result zero carry out zero 5 ASR by 32 or more has result filled with and carry out equal to bit 31 of Rm 6 ROR by 32 has result equal to Rm carry ...

Страница 107: ...tate changes which atomically restore both PC and CPSR This form of instruction should not be used in User mode 3 5 5 USING R15 AS AN OPERAND If R15 the PC is used as an operand in a data processing instruction the register is used directly The PC value will be the address of the instruction plus 8 or 12 bytes due to instruction prefetching If the shift amount is specified in the instruction the P...

Страница 108: ... operand instructions opcode cond S Rd Op2 CMP CMN TEQ TST instructions which do not produce a result opcode cond Rn Op2 AND EOR SUB RSB ADD ADC SBC RSC ORR BIC opcode cond S Rd Rn Op2 where Op2 Rm shift or expression cond A two character condition mnemonic See Table 3 2 S Set condition codes if S present implied for CMP CMN TEQ TST Rd Rn and Rm Expressions evaluating to a register number expressi...

Страница 109: ...uality with 3 The S is in fact redundant as the assembler inserts it automatically SUB R4 R5 R7 LSR R2 Logical right shift R7 by the number in the bottom byte of R2 subtract result from R5 and put the answer into R4 MOV PC R14 Return from subroutine MOVS PC R14 Return from exception and restore CPSR from SPSR_mode ...

Страница 110: ...nts to be transferred to the condition code flags N Z C and V of CPSR or SPSR_ mode without affecting the control bits In this case the top four bits of the specified register contents or 32 bit immediate value are written to the top four bits of the relevant PSR 3 6 1 OPERAND RESTRICTIONS In user mode the control bits of the CPSR are protected from change so only the condition code flags of the C...

Страница 111: ... PSR Contents to a Register 0 3 0 Source Register 22 Destination PSR 0 CPSR 1 SPSR_ current mode 31 28 Condition Field 15 21 Destination Register 19 16 Source PSR 0 CPSR 1 SPSR_ current mode 31 28 Condition Field 3 0 Source Register 11 4 Source operand is an immediate value 7 0 Unsigned 8 bit immediate value 11 8 Shift applied to Imm 22 Destination PSR 0 CPSR 1 SPSR_ current mode 25 Immediate Oper...

Страница 112: ... PSR register to a general register using the MRS instruction changing only the relevant bits and then transferring the modified value back to the PSR register using the MSR instruction Examples The following sequence performs a mode change MRS R0 CPSR Take a copy of the CPSR BIC R0 R0 0x1F Clear the mode bits ORR R0 R0 new_mode Select new mode MSR CPSR R0 Write back the modified CPSR When the aim...

Страница 113: ... R15 psr CPSR CPSR_all SPSR or SPSR_all CPSR and CPSR_all are synonyms as are SPSR and SPSR_all psrf CPSR_flg or SPSR_flg expression Where this is used the assembler will attempt to generate a shifted immediate 8 bit field to match the expression If this is impossible it will give an error Examples In User mode the instructions behave as follows MSR CPSR_all Rm CPSR 31 28 Rm 31 28 MSR CPSR_flg Rm ...

Страница 114: ...nstruction work on operands which may be considered as signed 2 complement or unsigned integers The results of a signed multiply nd of an unsigned multiply of 32 bit operands differ only in the upper 32 bits the low 32 bits of the signed and unsigned results are identical As these instructions only produce the low 32 bits of a multiply they can be used for both signed and unsigned multiplies For e...

Страница 115: ...he number of 8 bit multiplier array cycles is required to complete the multiply which is controlled by the value of the multiplier operand specified by Rs Its possible values are as follows 1 If bits 32 8 of the multiplier operand are all zero or all one 2 If bits 32 16 of the multiplier operand are all zero or all one 3 If bits 32 24 of the multiplier operand are all zero or all one 4 In all othe...

Страница 116: ...LL and SMULL take two 32 bit numbers and multiply them to produce a 64 bit result of the form RdHi RdLo Rm Rs The lower 32 bits of the 64 bit result are written to RdLo the upper 32 bits of the result are written to RdHi The multiply accumulate forms UMLAL and SMLAL take two 32 bit numbers multiply them and add a 64 bit number to produce a 64 bit result of the form RdHi RdLo Rm Rs RdHi RdLo The lo...

Страница 117: ...ired to complete the multiply which is controlled by the value of the multiplier operand specified by Rs Its possible values are as follows For Signed Instructions SMULL SMLAL If bits 31 8 of the multiplier operand are all zero or all one If bits 31 16 of the multiplier operand are all zero or all one If bits 31 24 of the multiplier operand are all zero or all one In all other cases For Unsigned I...

Страница 118: ...cumulate long 32 x 32 64 64 SMULL cond S RdLo RdHi Rm Rs Signed multiply long 32 x 32 64 SMLAL cond S RdLo RdHi Rm Rs Signed multiply Accumulate long 32 x 32 64 64 where cond Two character condition mnemonic See Table 3 2 S Set condition codes if S present RdLo RdHi Rm Rs Expressions evaluating to a register number other than R15 Examples UMULL R1 R4 R2 R3 R4 R1 R2 R3 UMLALS R1 R5 R2 R3 R5 R1 R2 R...

Страница 119: ...quired 31 27 19 15 0 Cond 28 16 11 12 21 23 B 20 L Rn Rd 22 01 I P U Offset W 26 24 25 15 12 Source Destination Registers 19 16 Base Register 20 Load Store Bit 0 Store to memory 1 Load from memory 21 Write back Bit 0 No write back 1 Write address into base 22 Byte Word Bit 0 Transfer word quantity 1 Transfer byte quantity 23 Up Down Bit 0 Down subtract offset from base 1 Up add offset to base 24 P...

Страница 120: ...ure 3 5 3 9 3 BYTES AND WORDS This instruction class may be used to transfer a byte B 1 or a word B 0 between an ARM9TDMI register and memory The action of LDR B and STR B instructions is influenced by the BIGEND control signal of ARM9TDMI core The two possible configurations are described below 3 9 3 1 Little Endian Configuration A byte load LDRB expects the data on data bus inputs 7 through 0 if...

Страница 121: ...oss data bus outputs 31 through 0 The external memory system should activate the appropriate byte subsystem to store the data A word load LDR should generate a word aligned address An address offset of 0 or 2 from a word boundary will cause the data to be rotated into the register so that the addressed byte occupies bits 31 through 24 This means that half words accessed at these offsets will be co...

Страница 122: ...register Rn gets updated before the abort handler starts Sometimes it may be impossible to calculate the initial value Example LDR R0 R1 R1 Therefore a post indexed LDR or STR where Rm is the same register as Rn should not be used 3 9 6 DATA ABORTS A transfer to or from a legal address may cause problems for a memory management system For instance in a system which uses virtual memory the required...

Страница 123: ...ing In this case base write back should not be specified Address can be 1 An expression which generates an address The assembler will attempt to generate an instruction using the PC as a base and a corrected immediate offset to address the location given by evaluating the expression This will be a PC relative pre indexed address If the address is out of range an error will be generated 2 A pre ind...

Страница 124: ... R1 R2 R4 Store R1 at R2 and write back R2 R4 to R2 LDR R1 R2 16 Load R1 from contents of R2 16 but don t write back LDR R1 R2 R3 LSL 2 Load R1 from contents of R2 R3 4 LDREQB R1 R6 5 Conditionally load byte at R6 5 into R1 bits 0 to 7 filling bits 8 to 31 with zeros STR R1 PLACE Generate PC relative offset to address PLACE PLACE ...

Страница 125: ...lculation may be written back into the base register if auto indexing is required 31 27 19 15 Cond 28 16 11 12 21 23 0 20 L Rn Rd 3 0 Offset Register 6 5 S H 0 0 SWP instruction 0 1 Unsigned halfwords 1 1 Signed byte 1 1 Signed half words 15 12 Source Destination Register 19 16 Base Register 20 Load Store 0 Store to memory 1 Load from memory 21 Write back 0 No write back 1 Write address into base ...

Страница 126: ... base may be either a 8 bit unsigned binary immediate value in the instruction or a second register The 8 bit offset is formed by concatenating bits 11 to 8 and bits 3 to 0 of the instruction word such that bit 11 becomes the MSB and bit 0 becomes the LSB The offset may be added to U 1 or subtracted from U 0 the base register Rn The offset modification may be performed either before pre indexed P ...

Страница 127: ...nfiguration A signed byte load LDRSB expects data on data bus inputs 7 through to 0 if the supplied address is on a word boundary on data bus inputs 15 through to 8 if it is a word address plus one byte and so on The selected byte is placed in the bottom 8 bit of the destination register and the remaining bits of the register are filled with the sign bit bit 7 of the byte Please see Figure 2 2 A h...

Страница 128: ... 0 The external memory system should activate the appropriate half word subsystem to store the data Note that the address must be half word aligned if bit 0 of the address is HIGH this will cause unpredictable behaviour 3 10 5 USE OF R15 Write back should not be specified if R15 is specified as the base register Rn When using R15 as the base register you must remember it contains an address 8 byte...

Страница 129: ...a corrected immediate offset to address the location given by evaluating the expression This will be a PC relative pre indexed address If the address is out of range an error will be generated 2 A pre indexed addressing specification Rn offset of zero Rn expression offset of expression bytes Rn Rm offset of contents of index register 3 A post indexed addressing specification Rn expression offset o...

Страница 130: ... the half word in R3 at R14 14 but don t write back LDRSB R8 R2 223 Load R8 with the sign extended contents of the byte address contained in R2 and write back R2 223 to R2 LDRNESH R11 R0 Conditionally load R11 with the sign extended contents of the half word address contained in R0 HERE Generate PC relative offset to address FRED STRH R5 PC FRED HERE 8 Store the half word in R5 at address FRED FRE...

Страница 131: ...d in the instruction with each bit corresponding to a register A 1 in bit 0 of the register field will cause R0 to be transferred a 0 will cause it not to be transferred similarly bit 1 controls the transfer of R1 and so on Any subset of the registers or all the registers may be specified The only restriction is that the register list should not be empty Whenever R15 is stored to memory the stored...

Страница 132: ...r transfers the addresses used and the value of Rn after the instruction has completed In all cases had write back of the modified base not been required W 0 Rn would have retained its initial value of 0x1000 unless it was also in the transfer list of a load multiple register instruction when it would have been overwritten with the loaded value 3 11 3 ADDRESS ALIGNMENT The address should normally ...

Страница 133: ...C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 Figure 3 20 Pre Increment Addressing Rn 1 R1 R1 2 R5 3 R1 R5 4 R7 Rn 0x100C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 0x100C 0x1000 0x0FF4 Figure 3 21 Post Decrement Addressing ...

Страница 134: ... Transfer The registers transferred are taken from the user bank rather than the bank corresponding to the current mode This is useful for saving the user state on process switches Base write back should not be used when this mechanism is employed 3 11 4 3 R15 not in List and S Bit Set User Bank Transfer For both LDM and STM instructions the user bank registers are transferred rather than the regi...

Страница 135: ...o the internal state of the processor will be the modification of the base register if write back was specified and this must be reversed by software and the cause of the abort resolved before the instruction may be retried 3 11 7 2 Aborts During LDM Instructions When ARM9TDMI detects a data abort during a load multiple instruction it modifies the operation of the instruction to ensure that recove...

Страница 136: ...truction are shown in the following table 3 6 Table 3 6 Addressing Mode Names Name Stack Other L Bit P Bit U Bit Pre Increment load LDMED LDMIB 1 1 1 Post Increment load LDMFD LDMIA 1 0 1 Pre Decrement load LDMEA LDMDB 1 1 0 Post Decrement load LDMFA LDMDA 1 0 0 Pre Increment store STMFA STMIB 0 1 1 Post Increment store STMEA STMIA 0 0 1 Pre Decrement store STMFD STMDB 0 1 0 Post Decrement store S...

Страница 137: ... in privileged modes STMFD R13 R0 R14 Save user mode regs on stack allowed only in privileged modes These instructions may be used to save state on subroutine entry and restore it efficiently on return to the calling routine STMED SP R0 R3 R14 Save R0 to R3 to use as workspace and R14 for returning BL somewhere This nested call will overwrite R14 LDMED SP R0 R3 R15 Restore workspace and return ...

Страница 138: ...e processor first reads the contents of the swap address Then it writes the contents of the source register Rm to the swap address and stores the old memory contents in the destination register Rd The same register may be specified as both the source and destination The lock output goes HIGH for the duration of the read and write operations to signal to the external memory manager that they are lo...

Страница 139: ...2 4 INSTRUCTION CYCLE TIMES Swap instructions take 1S 2N 1I incremental cycles to execute where S N and I are defined as squential S cycle non sequential and internal I cycle respectively 3 12 5 ASSEMBLER SYNTAX SWP cond B Rd Rm Rn cond Two character condition mnemonic See Table 3 2 B If B is present then byte transfer otherwise word transfer Rd Rm Rn Expressions evaluating to valid register numbe...

Страница 140: ...erating system may be constructed 3 13 1 RETURN FROM THE SUPERVISOR The PC is saved in R14_svc upon entering the software interrupt trap with the PC adjusted to point to the word after the SWI instruction MOVS PC R14_svc will return to the calling program and restore the CPSR Note that the link mechanism is not re entrant so if the supervisor code wishes to use software interrupts within itself it...

Страница 141: ...B Supervisor SWI entry point EntryTable Addresses of supervisor routines DCD ZeroRtn DCD ReadCRtn DCD WriteIRtn Zero EQU 0 ReadC EQU 256 WriteI EQU 512 Supervisor SWI has routine required in bits 8 23 and data if any in bits 0 7 Assumes R13_svc points to a suitable stack STMFD R13 R0 R2 R14 Save work registers and return address LDR R0 R14 4 Get SWI instruction BIC R0 R0 0xFF000000 Clear top 8 bit...

Страница 142: ...connected to the S3C2501X the coprocessor instructions are still described here in full for completeness Remember that any external coprocessor described in this section is a software emulation 31 24 27 19 15 Cond CRm 28 16 11 12 23 20 3 0 Coprocessor operand register 7 5 Coprocessor information 11 8 Coprocessor number 15 12 Coprocessor destination register 19 16 Coprocessor operand register 23 20...

Страница 143: ...er condition mnemonic See Table 3 2 p The unique number of the required coprocessor expression1 Evaluated to a constant and placed in the CP Opc field cd cn and cm Evaluate to the valid coprocessor register numbers CRd CRn and CRm respectively expression2 Where present is evaluated to a constant and placed in the CP field Examples CDP p1 10 c1 c2 c3 Request coproc 1 to do operation 10 on CR2 and C...

Страница 144: ...n subtract offset from base 1 Up add offset to base 24 Pre Post Indexing Bit 0 Post add offset after transfer 1 Pre add offset bofore transfer 31 28 Condition Field 31 27 19 15 Cond 28 16 11 12 21 23 N 20 L Rn CRd 22 110 P U CP W 24 25 Offset 8 7 0 Figure 3 26 Coprocessor Data Transfer Instructions 3 15 1 THE COPROCESSOR FIELDS The CP field is used to identify the coprocessor which is required to ...

Страница 145: ...if more than one is transferred will go to or come from an address one word 4 bytes higher than the first transfer and the address will be incremented by one word for each subsequent transfer 3 15 3 ADDRESS ALIGNMENT The base address should normally be a word aligned quantity The bottom 2 bits of the address will appear on A 1 0 and might be interpreted by the memory system 3 15 4 USE OF R15 If Rn...

Страница 146: ...ed address If the address is out of range an error will be generated 2 A pre indexed addressing specification Rn offset of zero Rn expression offset of expression bytes A post indexed addressing specification Rn expression offset of expression bytes write back the base register set the W bit if is present Rn is an expression evaluating to a valid ARM9TDMI register number NOTE If Rn is R15 the asse...

Страница 147: ...be moved to the CPSR to control the subsequent flow of execution 31 27 19 15 Cond 28 16 11 12 21 23 20 L CRn Rd 3 0 Coprocessor Operand Register 7 5 Coprocessor Information 11 8 Coprocessor Number 15 12 ARM Source Destination Register 19 16 Coprocessor Source Destination Register 20 Load Store Bit 0 Store to coprocessor 1 Load from coprocessor 21 Coprocessor Operation Mode 31 28 Condition Field 11...

Страница 148: ...ent in the coprocessor busy wait loop 3 16 5 ASSEMBLER SYNTAX MCR MRC cond p expression1 Rd cn cm expression2 MRC Move from coprocessor to ARM9TDMI register L 1 MCR Move from ARM9TDMI register to coprocessor L 0 cond Two character condition mnemonic See Table 3 2 p The unique number of the required coprocessor expression1 Evaluated to a constant and placed in the CP Opc field Rd An expression eval...

Страница 149: ...e undefined instruction mechanism involves offering this instruction to any coprocessors which may be present and all coprocessors must refuse to accept it by driving CPA and CPB HIGH 3 17 1 INSTRUCTION CYCLE TIMES This instruction takes 2S 1I 1N cycles where S N and I are defined as sequential S cycle non sequential N cycle and internal I cycle 3 17 2 ASSEMBLER SYNTAX The assembler has no mnemoni...

Страница 150: ... for Logical OR CMP Rn p If Rn p OR Rm q THEN GOTO Label BEQ Label CMP Rm q BEQ Label This can be replaced by CMP Rn p CMPNE Rm q If condition not satisfied try other test BEQ Label Absolute Value TEQ Rn 0 Test sign RSBMI Rn Rn 0 and 2 s complement if necessary Multiplication by 4 5 or 6 Run Time MOV Rc Ra LSL 2 Multiply by 4 CMP Rb 5 Test value ADDCS Rc Rc Ra Complete multiply by 5 ADDHI Rc Rc Ra...

Страница 151: ... ADDCS Rc Rc Rcnt Put relevant bit into result MOVS Rcnt Rcnt LSR 1 Shift control bit MOVNE Rb Rb LSR 1 Halve unless finished BNE Div2 Divide result in Rc remainder in Ra Overflow Detection in the ARM9TDMI 1 Overflow in unsigned multiply with a 32 bit result UMULL Rd Rt Rm Rn 3 to 6 cycles TEQ Rt 0 1 cycle and a register BNE overflow 2 Overflow in signed multiply with a 32 bit result SMULL Rd Rt R...

Страница 152: ...eedback rather like a cyclic redundancy check generator Unfortunately the sequence of a 32 bit generator needs more than one feedback tap to be maximal length i e 2 32 1 cycles before repetition so this example uses a 33 bit register with taps at bits 33 and 20 The basic algorithm is newbit bit 33 eor bit 20 shift left the 33 bit number and put in newbit at the bottom this operation is performed f...

Страница 153: ...Rb Ra LSL n D 1 Rb Ra D MOV Rb Rb LSL n 2 If C MOD 4 1 say C 2 n D 1 D odd n 1 D 1 ADD Rb Ra Ra LSL n D 1 Rb Ra D ADD Rb Ra Rb LSL n 3 If C MOD 4 3 say C 2 n D 1 D odd n 1 D 1 RSB Rb Ra Ra LSL n D 1 Rb Ra D RSB Rb Ra Rb LSL n This is not quite optimal but close An example of its non optimality is multiply by 45 which is done by RSB Rb Ra Ra LSL 2 Multiply by 3 RSB Rb Ra Rb LSL 2 Multiply by 4 3 1 ...

Страница 154: ...be less than c e g 0 1 BIC Rb Ra 3 Get word aligned address LDMIA Rb Rd Rc Get 64 bits containing answer AND Rb Ra 3 Correction factor in bytes MOVS Rb Rb LSL 3 now in bits and test if aligned MOVNE Rd Rd LSR Rb Produce bottom of result word if not aligned RSBNE Rb Rb 32 Get other shift amount ORRNE Rd Rd Rc LSL Rb Combine two halves to get result ...

Страница 155: ... 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 L 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 L 1 0 R 1 1 0 1 0 SP 1 L L S H 0 0 1 B L 0 1 H 0 1 B 0 0 1 1 1 I Op Op Op Op Op L 0 S 1 Offset5 Rs Rd Rn offset3 Rd Rs Rd Offset8 Rs Rd Hd Rd H1 H2 Rs Hs Rd Word8 Rd Rb Ro Ro Rb Rd Offset5 Rb Rd Rb Rd Offset5 Rd Rd Word8 Word8 SWord7 Rb Cond Rlist Rlist Softset8 Value8 Offset11 Offset Add sub...

Страница 156: ...V V 1 AND AND V V ASR Arithmetic shift right V V B Unconditional branch V Bxx Conditional branch V BIC Bit clear V V BL Branch and link V BX Branch and exchange V V CMN Compare negative V V CMP Compare V V V EOR EOR V V LDMIA Load multiple V LDR Load word V LDRB Load byte V LDRH Load half word V LSL Logical shift left V V LDSB Load sign extended byte V LDSH Load sign extended half word V LSR Logic...

Страница 157: ...odes Set SBC Subtract with carry V V STMIA Store multiple V STR Store word V STRB Store byte V STRH Store half word V SWI Software interrupt SUB Subtract V V TST Test bits V V NOTES 1 The condition codes are unaffected by the format 5 12 and 13 versions of this instruction 2 The condition codes are unaffected by the format 5 version of this instruction ...

Страница 158: ... Offset5 MOVS Rd Rs LSL Offset5 Shift Rs left by a 5 bit immediate value and store the result in Rd 01 LSR Rd Rs Offset5 MOVS Rd Rs LSR Offset5 Perform logical shift right on Rs by a 5 bit immediate value and store the result in Rd 10 ASR Rd Rs Offset5 MOVS Rd Rs ASR Offset5 Perform arithmetic shift right on Rs by a 5 bit immediate value and store the result in Rd 3 20 2 INSTRUCTION CYCLE TIMES Al...

Страница 159: ...ted from a Lo register The THUMB assembler syntax is shown in Table 3 9 NOTE All instructions in this group set the CPSR condition codes Table 3 9 Summary of Format 2 Instructions OP I THUMB Assembler ARM Equivalent Action 0 0 ADD Rd Rs Rn ADDS Rd Rs Rn Add contents of Rn to contents of Rs Place result in Rd 0 1 ADD Rd Rs Offset3 ADDS Rd Rs Offset3 Add 3 bit immediate value to contents of Rs Place...

Страница 160: ... format have an equivalent ARM instruction as shown in Table 3 9 The instruction cycle times for the THUMB instruction are identical to that of the equivalent ARM instruction Examples ADD R0 R3 R4 R0 R3 R4 and set condition codes on the result SUB R6 R2 6 R6 R2 6 and set condition codes ...

Страница 161: ...t8 MOVS Rd Offset8 Move 8 bit immediate value into Rd 01 CMP Rd Offset8 CMP Rd Offset8 Compare contents of Rd with 8 bit immediate value 10 ADD Rd Offset8 ADDS Rd Rd Offset8 Add 8 bit immediate value to contents of Rd and place the result in Rd 11 SUB Rd Offset8 SUBS Rd Rd Offset8 Subtract 8 bit immediate value from contents of Rd and place the result in Rd 3 22 2 INSTRUCTION CYCLE TIMES All instr...

Страница 162: ... Rs 0001 EOR Rd Rs EORS Rd Rd Rs Rd Rd EOR Rs 0010 LSL Rd Rs MOVS Rd Rd LSL Rs Rd Rd Rs 0011 LSR Rd Rs MOVS Rd Rd LSR Rs Rd Rd Rs 0100 ASR Rd Rs MOVS Rd Rd ASR Rs Rd Rd ASR Rs 0101 ADC Rd Rs ADCS Rd Rd Rs Rd Rd Rs C bit 0110 SBC Rd Rs SBCS Rd Rd Rs Rd Rd Rs NOT C bit 0111 ROR Rd Rs MOVS Rd Rd ROR Rs Rd Rd ROR Rs 1000 TST Rd Rs TST Rd Rs Set condition codes on Rd AND Rs 1001 NEG Rd Rs RSBS Rd Rs 0 ...

Страница 163: ...n are identical to that of the equivalent ARM instruction Examples EOR R3 R4 R3 R3 EOR R4 and set condition codes ROR R1 R0 Rotate right R1 by the value in R0 store the result in R1 and set condition codes NEG R5 R3 Subtract the contents of R3 from zero store the result in R5 Set condition codes ie R5 R3 CMP R2 R6 Set the condition codes on the result of R2 R6 MUL R0 R7 R0 R7 R0 and set condition ...

Страница 164: ...TION There are four sets of instructions in this group The first three allow ADD CMP and MOV operations to be performed between Lo and Hi registers or a pair of Hi registers The fourth BX allows a Branch to be performed which may also be used to switch processor state The THUMB assembler syntax is shown in Table 3 12 NOTE In this group only CMP Op 01 sets the CPSR condition codes The action of H1 ...

Страница 165: ...ge 8 15 to a register in the range 0 7 10 1 0 MOV Hd Rs MOV Hd Rs Move a value from a register in the range 0 7 to a register in the range 8 15 00 0 1 MOV Hd Hs MOV Hd Hs Move a value between two registers in the range 8 15 00 1 0 BX Rs BX Rs Perform branch plus optional state change to address in a register in the range 0 7 00 1 1 BX Hs BX Hs Perform branch plus optional state change to address i...

Страница 166: ...m THUMB to ARM state ADR R1 outofTHUMB Load address of outofTHUMB into R1 MOV R11 R1 BX R11 Transfer the contents of R11 into the PC Bit 0 of R11 determines whether ARM or THUMB state is entered ie ARM state here ALIGN CODE32 outofTHUMB Now processing ARM instructions 3 24 4 USING R15 AS AN OPERAND If R15 is used as an operand the value will be the address of the instruction 4 with bit 0 cleared E...

Страница 167: ...d from the resulting address into Rd NOTE The value specified by Imm is a full 10 bit address but must always be word aligned ie with bits 1 0 set to 0 since the assembler places Imm 2 in field Word 8 The value of the PC will be 4 bytes greater than the address of this instruction but bit 1 of the PC is forced to 0 to ensure it is word aligned 3 25 2 INSTRUCTION CYCLE TIMES All instructions in thi...

Страница 168: ...ormat 7 Instructions L B THUMB Assembler ARM Equivalent Action 0 0 STR Rd Rb Ro STR Rd Rb Ro Pre indexed word store Calculate the target address by adding together the value in Rb and the value in Ro Store the contents of Rd at the address 0 1 STRB Rd Rb Ro STRB Rd Rb Ro Pre indexed byte store Calculate the target address by adding together the value in Rb and the value in Ro Store the byte value ...

Страница 169: ... ARM instruction as shown in Table 3 14 The instruction cycle times for the THUMB instruction are identical to that of the equivalent ARM instruction Examples STR R3 R2 R6 Store word in R3 at the address formed by adding R6 to R2 LDRB R2 R0 R7 Load into R2 the byte found at the address formed by adding R7 to R0 ...

Страница 170: ...ormat 8 instructions L B THUMB Assembler ARM Equivalent Action 0 0 STRH Rd Rb Ro STRH Rd Rb Ro Store half word Add Ro to base address in Rb Store bits 0 15 of Rd at the resulting address 0 1 LDRH Rd Rb Ro LDRH Rd Rb Ro Load half word Add Ro to base address in Rb Load bits 0 15 of Rd from the resulting address and set bits 16 31 of Rd to 0 1 0 LDSB Rd Rb Ro LDRSB Rd Rb Ro Load sign extended byte Ad...

Страница 171: ...es for the THUMB instruction are identical to that of the equivalent ARM instruction Examples STRH R4 R3 R0 Store the lower 16 bits of R4 at the address formed by adding R0 to R3 LDSB R2 R7 R1 Load into R2 the sign extended byte found at the address formed by adding R1 to R7 LDSH R3 R4 R2 Load into R3 the sign extended half word found at the address formed by adding R2 to R4 ...

Страница 172: ... Assembler ARM Equivalent Action 0 0 STR Rd Rb Imm STR Rd Rb Imm Calculate the target address by adding together the value in Rb and Imm Store the contents of Rd at the address 0 1 LDR Rd Rb Imm LDR Rd Rb Imm Calculate the source address by adding together the value in Rb and Imm Load Rd from the address 1 0 STRB Rd Rb Imm STRB Rd Rb Imm Calculate the target address by adding together the value in...

Страница 173: ... the THUMB instruction are identical to that of the equivalent ARM instruction Examples LDR R2 R5 116 Load into R2 the word found at the address formed by adding 116 to R5 Note that the THUMB opcode will contain 29 as the Offset5 value STRB R1 R0 13 Store the lower 8 bits of R1 at the address formed by adding 13 to R0 Note that the THUMB opcode will contain 13 as the Offset5 value ...

Страница 174: ... Rd at the resulting address 1 LDRH Rd Rb Imm LDRH Rd Rb Imm Add Imm to base address in Rb Load bits 0 15 from the resulting address into Rd and set bits 16 31 to zero NOTE Imm is a full 6 bit address but must be half word aligned ie with bit 0 set to 0 since the assembler places Imm 1 in the Offset5 field 3 29 2 INSTRUCTION CYCLE TIMES All instructions in this format have an equivalent ARM instru...

Страница 175: ...the SP R7 Store the contents of Rd at the resulting address 1 LDR Rd SP Imm LDR Rd R13 Imm Add unsigned offset 255 words 1020 bytes in Imm to the current value of the SP R7 Load the word from the resulting address into Rd NOTE The offset supplied in Imm is a full 10 bit address but must always be word aligned ie bits 1 0 set to 0 since the assembler places Imm 2 in the Word8 field 3 30 2 INSTRUCTI...

Страница 176: ...ARM Equivalent Action 0 ADD Rd PC Imm ADD Rd R15 Imm Add Imm to the current value of the program counter PC and load the result into Rd 1 ADD Rd SP Imm ADD Rd R13 Imm Add Imm to the current value of the stack pointer SP and load the result into Rd NOTE The value specified by Imm is a full 10 bit value but this must be word aligned ie with bits 1 0 set to 0 since the assembler places Imm 2 in field...

Страница 177: ... times for the THUMB instruction are identical to that of the equivalent ARM instruction Examples ADD R2 PC 572 R2 PC 572 but don t set the condition codes bit 1 of PC is forced to zero Note that the THUMB opcode will contain 143 as the Word8 value ADD R6 SP 212 R6 SP R13 212 but don t set the condition codes Note that the THUMB opcode will contain 53 as the Word 8 value ...

Страница 178: ...er SP NOTE The offset specified by Imm can be up to 508 but must be word aligned ie with bits 1 0 set to 0 since the assembler converts Imm to an 8 bit sign magnitude number before placing it in field SWord7 The condition codes are not set by this instruction 3 32 2 INSTRUCTION CYCLE TIMES All instructions in this format have an equivalent ARM instruction as shown in Table 3 20 The instruction cyc...

Страница 179: ...in Table 3 21 NOTE The stack is always assumed to be full descending Table 3 21 PUSH and POP Instructions L B THUMB Assembler ARM Equivalent Action 0 0 PUSH Rlist STMDB R13 Rlist Push the registers specified by Rlist onto the stack Update the stack pointer 0 1 PUSH Rlist LR STMDB R13 Rlist R14 Push the Link Register and the registers specified by Rlist if any onto the stack Update the stack pointe...

Страница 180: ...THUMB instruction are identical to that of the equivalent ARM instruction Examples PUSH R0 R4 LR Store R0 R1 R2 R3 R4 and R14 LR at the stack pointed to by R13 SP and update R13 Useful at start of a sub routine to save workspace and return address POP R2 R6 PC Load R2 R6 and R15 PC from the stack pointed to by R13 SP and update R13 Useful to restore workspace and return from sub routine ...

Страница 181: ...ist STMIA Rb Rlist Store the registers specified by Rlist starting at the base address in Rb Write back the new base address 1 LDMIA Rb Rlist LDMIA Rb Rlist Load the registers specified by Rlist starting at the base address in Rb Write back the new base address 3 34 2 INSTRUCTION CYCLE TIMES All instructions in this format have an equivalent ARM instruction as shown in Table 3 22 The instruction c...

Страница 182: ...ch Instructions Code THUMB Assembler ARM Equivalent Action 0000 BEQ label BEQ label Branch if Z set equal 0001 BNE label BNE label Branch if Z clear not equal 0010 BCS label BCS label Branch if C set unsigned higher or same 0011 BCC label BCC label Branch if C clear unsigned lower 0100 BMI label BMI label Branch if N set negative 0101 BPL label BPL label Branch if N clear positive or zero 0110 BVS...

Страница 183: ...cifies a full 9 bit two s complement address this must always be half word aligned ie with bit 0 set to 0 since the assembler actually places label 1 in field SOffset8 2 Cond 1110 is undefined and should not be used Cond 1111 creates the SWI instruction see 3 35 2 INSTRUCTION CYCLE TIMES All instructions in this format have an equivalent ARM instruction as shown in Table 3 23 The instruction cycle...

Страница 184: ...nt Action SWI Value 8 SWI Value 8 Perform Software Interrupt Move the address of the next instruction into LR move CPSR to SPSR load the SWI vector address 0x8 into the PC Switch to ARM state and enter SVC mode NOTE Value 8 is used solely by the SWI handler it is ignored by the processor 3 36 2 INSTRUCTION CYCLE TIMES All instructions in this format have an equivalent ARM instruction as shown in T...

Страница 185: ...uction Table 3 25 Summary of Branch Instruction THUMB Assembler ARM Equivalent Action B label BAL label half word offset Branch PC relative Offset11 1 where label is PC 2048 bytes NOTE The address specified by label is a full 12 bit two s complement address but must always be half word aligned ie bit 0 set to 0 since the assembler places label 1 in the Offset11 field Examples here B here Branch on...

Страница 186: ...ction 1 H 0 In the first instruction the Offset field contains the upper 11 bits of the target address This is shifted left by 12 bits and added to the current PC address The resulting address is placed in LR 3 38 1 2 Instruction 2 H 1 In the second instruction the Offset field contains an 11 bit representation lower half of the target address This is shifted left by 1 bit and added to LR LR which...

Страница 187: ... Equivalent Action 0 BL label none LR PC OffsetHigh 12 1 temp next instruction address PC LR OffsetLow 1 LR temp 1 Examples BL faraway Unconditionally Branch to faraway next and place following instruction address ie next in R14 the Link register and set bit 0 of LR high Note that the THUMB opcodes will contain the number of half words to offset faraway Must be Half word aligned ...

Страница 188: ... using a sequence of 4 or more instructions Thumb ARM 1 Multiplication by 2 n 1 2 4 8 LSL Ra Rb LSL n MOV Ra Rb LSL n 2 Multiplication by 2 n 1 3 5 9 17 LSL Rt Rb n ADD Ra Rb Rb LSL n ADD Ra Rt Rb 3 Multiplication by 2 n 1 3 7 15 LSL Rt Rb n RSB Ra Rb Rb LSL n SUB Ra Rt Rb 4 Multiplication by 2 n 2 4 8 LSL Ra Rb n MOV Ra Rb LSL n MVN Ra Ra RSB Ra Ra 0 5 Multiplication by 2 n 1 3 7 15 LSL Rt Rb n S...

Страница 189: ...0 and ADD 1 SUB 1 to get abs value Save signs 0 or 1 in R0 R2 for later use in determining sign of quotient remainder PUSH R0 R2 Justification shift 1 bit at a time until divisor R0 value is just than dividend R1 value To do this shift dividend right by 1 and stop as soon as shifted value becomes LSR R0 R1 1 MOV R2 R3 B FT0 just_l LSL R2 1 0 CMP R2 R0 BLS just_l MOV R0 0 Set accumulator to 0 B FT0...

Страница 190: ...a2 a2 0 Central part is identical code to udiv without MOV a4 0 which comes for free as part of signed entry sequence MOVS a3 a1 BEQ divide_by_zero just_l Justification stage shifts 1 bit at a time CMP a3 a2 LSR 1 MOVLS a3 a3 LSL 1 NB LSL 1 is always OK if LS succeeds BLO s_loop div_l CMP a2 a3 ADC a4 a4 a4 SUBCS a2 a2 a3 TEQ a3 a1 MOVNE a3 a3 LSR 1 BNE s_loop2 MOV a1 a4 MOVS ip ip ASL 1 RSBCS a1 ...

Страница 191: ...ment in a1 returns quotient in a1 remainder in a2 MOV a2 a1 LSR a3 a1 2 SUB a1 a3 LSR a3 a1 4 ADD a1 a3 LSR a3 a1 8 ADD a1 a3 LSR a3 a1 16 ADD a1 a3 LSR a1 3 ASL a3 a1 2 ADD a3 a1 ASL a3 1 SUB a2 a3 CMP a2 10 BLT FT0 ADD a1 1 SUB a2 10 0 MOV pc lr 3 39 3 2 ARM Code udiv10 Take argument in a1 returns quotient in a1 remainder in a2 SUB a2 a1 10 SUB a1 a1 a1 lsr 2 ADD a1 a1 a1 lsr 4 ADD a1 a1 a1 lsr ...

Страница 192: ...n method and address remap function etc 4 2 FEATURES Key features of the system configuration include the following Various clock mode operation the fastbus mode sync mode and async mode Product code and revision number System clock control clock status Peripheral clock enable disable AHB bus master priority define Fixed Round Robin Core System PHY PLL Configuration Register Setting ...

Страница 193: ...00 0x00000000 0x48000000 Figure 4 1 S3C2501X Address map after resest Each memory block is mapped within the fixed location of memory space As shown in the figure 4 1 the maximum size of ROM SRAM Flash External IO bank is restricted to 16M bytes and the SDRAM bank can be mapped within 1G byte memory space It must be noticed that the base address of each bank is fixed and the bank size is variable ...

Страница 194: ...4000000 0x84000000 Memory bank5 0x05000000 0x85000000 Memory bank6 0x06000000 0x86000000 Memory bank7 0x07000000 0x87000000 SDRAM bank0 0x40000000 0x00000000 SDRAM bank1 0x80000000 0x40000000 4 5 EXTERNAL ADDRESS TRANSLATION The S3C2501X address bus is in some respects different than the bus used in other standard CPUs Based on the required data bus width of each memory bank the internal system ad...

Страница 195: ...Controller TIC block The Group A has the highest bus priority Group B has 3 AHB bus masters General DMA Ethernet Controller 0 Ethernet Controller 1 The S3C2501X can program the bus priority of each bus masters among Group B So the bus priority of bus masters in only Group B can be programmed Group C has the ARM940T CPU The relative priority of Group B and Group C is determined more or less in an a...

Страница 196: ...S3C2501X SYSTEM CONFIGURATION 4 5 TIC Group A ARM940T Group B Group C General DMA Ethernet Controller 0 Ethernet Controller 1 Figure 4 3 Priority Groups of S3C2501X ...

Страница 197: ...sters own their respective field position in HPRIR The ratio of the bus occupancy can be programmed by writing an arbitrary value on each field The arbitrary value can be 0x0 to 0xF The reset value of HPRIR register is 0x00000000 The position for each master is shown in Figure 4 4 The ratio of the bus occupancy of the bus master in the first field is intended to be hprir0 1 hprir2 1 hprir1 1 hprir...

Страница 198: ... 0 Reserved Master 1 0 GDMA 1 6 6 0 Reserved Master 2 0 GDMA 1 6 When HPRIR is 0x0 and only GDMA Ethernet controller 0 and 1 are used the expected bus occupancy for each channel is 1 3 However S3C2501X does not work that way instead GDMA gets 4 6 of the bus occupancy Ethernet controller 0 1 6 and Ethernet controller 1 1 6 In short GDMA is run four times more than Ethernet controller 0 and 1 This i...

Страница 199: ... GDMA 1 3 4 6 0 GDMA 1 3 0 Ethernet controller 0 1 3 1 6 3 Ethernet controller 0 1 3 0 Ethernet controller 1 1 3 1 6 3 Ethernet controller 1 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Problem Problem Solving Writing 0x000330 instead of 0x0 will give each channel of three masters with the same amount of bus occupancy This is because GDMA is run to fill the blank of reserved masters ...

Страница 200: ...ode is defined In this mode the ARM940T clock and the system bus clock is the same clock and the clock is from the CPU PLL output The two clocks are of the same phase and of the same frequency If the CLKMOD 1 0 is 10 or 01 the sync clock mode is defined In this mode the frequency of the ARM940T clock is always 2 times that of the system bus clock If the CLKMOD 1 0 is 11 the async clock mode is def...

Страница 201: ... 3 bxxx 166MHz 83MHz 3 b101 3 bxxx 166MHz 83MHz 3 b110 3 bxxx 166MHz 83MHz 3 b111 3 bxxx 166MHz 83MHz 2 b11 Async 3 b000 3 b000 166MHz 133MHz 3 b000 3 b001 166MHz 133MHz 3 b000 3 b010 166MHz 133MHz 3 b000 3 b011 166MHz 125MHz 3 b000 3 b100 166MHz 100MHz 3 b000 3 b101 166MHz 66MHz 3 b000 3 b110 166MHz 50MHz 3 b000 3 b111 166MHz 33MHz 2 b11 Async 3 b001 3 b000 150MHz 133MHz 3 b001 3 b001 150MHz 133M...

Страница 202: ...z 133MHz 3 b011 3 b001 125MHz 133MHz 3 b011 3 b010 125MHz 133MHz 3 b011 3 b011 125MHz 125MHz 3 b011 3 b100 125MHz 100MHz 3 b011 3 b101 125MHz 66MHz 3 b011 3 b110 125MHz 50MHz 3 b011 3 b111 125MHz 33MHz 2 b11 Async 3 b100 3 b000 100MHz 133MHz 3 b100 3 b001 100MHz 133MHz 3 b100 3 b010 100MHz 133MHz 3 b100 3 b011 100MHz 125MHz 3 b100 3 b100 100MHz 100MHz 3 b100 3 b101 100MHz 66MHz 3 b100 3 b110 100MH...

Страница 203: ...r enable bit is set to 1 the PLL multiplication factor is not from the external pin but from the corresponding PLLCON regiseter CPLLCON SPLLCON PPLLCON registers The PLL is controlled by the 3 control variables P M S When the PLL is under the control of the S W and the PLL control variables are dynamically changed by the S W the glitch may occur in the PLL output clock You can avoid the glitch gen...

Страница 204: ... 266MHz 00_0001 1000_0100 01 10MHz 233MHz 00_0001 0111_0000 01 10MHz 200MHz 00_0011 1001_1110 01 10MHz 166MHz 00_0001 0101_0010 01 10MHz 150MHz 00_0001 0100_1000 01 10MHz 133MHz 00_0001 0100_0011 01 10MHz 125MHz 00_0001 0111_0000 10 10MHz 100MHz 00_0011 1011_1000 10 10MHz 96MHz 00_0001 0100_1000 10 10MHz 66MHz 00_0001 0111_0000 11 10MHz 50MHz 00_0011 1011_1000 11 10MHz 48MHz 00_0001 0100_1000 11 1...

Страница 205: ...is defined as 1 2 4 8 16 The internal clock is PLL output clock between 166MHz and 33MHz CLKCON 1 6 The CLKCON 15 0 register CLKMOD 1 0 pins and CPU_FREQ 2 0 pins can control the AMBA clock divider The CLKMOD 1 0 pins and BUS_FREQ 2 0 pins can generate the various AMBA bus clock frequecies referring to the Table 3 The CLKCON 15 0 register can divide the various AMBA clock frequecies of the Table 4...

Страница 206: ...ister 0x25010000 CLKCON 0xF0000008 System clock control register 0x00000000 PCLKDIS 0xF000000C Peripheral clock disable register 0x0F000500 CLKST 0xF0000010 Clock Status register HPRIF 0xF0000014 AHB bus master fixed priority register 0x00543210 HPRIR 0xF0000018 AHB bus master round robin priority register 0x00000000 CPLLCON 0xF000001C Core PLL Configuration Register 0x0001039E SPLLCON 0xF0000020 ...

Страница 207: ...is bit is set to 1 the BUS PLL constant is from the SPLLCON register 0 PPLLREN 28 PPLLCON Register Enable This bit controls which value is used for the PHY PLL constant from the two constant values When this bit is set to 0 the PHY PLL constant is from PHY_FREQ setting When this bit is set to 1 the PHY PLL constant is from the PPLLCON register 0 CPLLFD 27 CPLL Filter Disable This bit determines wh...

Страница 208: ...Remap disable 1 Remap Enable ROM Bank0 0x00000000 ROM Bank0 0x80000000 ROM Bank1 0x01000000 ROM Bank1 0x81000000 ROM Bank2 0x02000000 ROM Bank2 0x82000000 ROM Bank3 0x03000000 ROM Bank3 0x83000000 ROM Bank4 0x04000000 ROM Bank4 0x84000000 ROM Bank5 0x05000000 ROM Bank5 0x85000000 ROM Bank6 0x06000000 ROM Bank6 0x86000000 ROM Bank7 0x07000000 ROM Bank7 0x87000000 SDRAM Bank0 0x40000000 SDRAM0 bank0...

Страница 209: ...ODE Register Address R W Description Reset Value PDCODE 0xF0000004 R Product code and revision number register 0x25010000 PDCODE Bit Description Initial State PC 31 16 Product code 0x2501 Reserved 15 8 Reserved 0x0 MajRev 7 4 Major revision number 0x0 MinRev 3 0 Minor revision number 0x0 ...

Страница 210: ...e internal system clock remains the same as the internal clock In other case the duty cycle of internal system clock is no logner 50 Register Address R W Description Reset Value CLKCON 0xF0000008 R W Clock control register 0x00000000 CLKCON Bit Description Initial State Reserved 31 16 Reserved 0 DVAL 15 0 System clock dividing value If all bits are 0 non divided clock is used Only one bit can be s...

Страница 211: ...d 1 Reserved 25 Reserved 1 Reserved 24 Reserved 1 SDRAMC 23 SDRAMC clock disable 0x0 MEMCON 22 MEMCON clock disable 0x0 DES 21 DES clock disable 0x0 IIC 20 IIC Clock disable 0x0 IOPC 19 IOPC clock disable 0x0 WDT 18 Watch dog timer clock disable 0x0 TIMER5 17 TIMER5 clock disable 0x0 TIMER4 16 TIMER4 clock disable 0x0 TIMER3 15 TIMER3 clock disable 0x0 TIMER2 14 TIMER2 clock disable 0x0 TIMER1 13 ...

Страница 212: ...e CLKST 11 0 should be taken for the BUS frequency because the CPU clock and system bus clock is the same In the sync mode the BUS frequency in the CLKST 23 12 should also be ignored and the half of the CPU frequency should be taken for the BUS frequency Register Address R W Description Reset Value CLKST 0xF0000010 R Clock Status register Read Only CLKST Bit Description Initial State Clock Mode 31...

Страница 213: ...1C R W Core PLL control register 0x0001039E CPLLCON Bit Description Initial State Reserved 31 12 0x0 S 17 16 Scaler 0x1 Reserved 15 14 0x0 P 13 8 Pre divider 0x3 M 7 0 Main divider 0x9E Output clock frequency is determined by following formula Fout Fin M 8 P 2 2 S If Fin 10MHz P 3 M 158 0x9E and S 1 Fout is 166 MHz FCLK signal of ARM940T core is connected to Fout 166MHz clock But BCLK signal of AR...

Страница 214: ...20 R W System BUS PLL control register 0x0001037D SPLLCON Bit Description Initial State Reserved 31 12 0x0 S 17 16 Scaler 0x1 Reserved 15 14 0x0 P 13 8 Pre divider 0x3 M 7 0 Main divider 0x7D Output clock frequency is determined by following formula Fout Fin M 8 P 2 2 S If Fin 10MHz P 3 M 125 0x7D and S 1 Fout is 133 MHz FCLK signal of ARM940T core is connected to Fout 133MHz clock But BCLK signal...

Страница 215: ...REN set to 0 Register Address R W Description Reset Value PPLLCON 0xF0000028 R W PHY PLL control register 0x00010311 PPLLCON Bit Description Initial State Reserved 31 12 0x0 S 17 16 Scaler 0x1 Reserved 15 14 0x0 P 13 8 Pre divider 0x3 M 7 0 Main divider 0x11 Output clock frequency is determined by following formula Fout Fin M 8 P 2 2 S If Fin 10MHz P 3 M 17 0x11 and S 1 Fout is 25MHz ...

Страница 216: ...trol signals for external memory accesses For example if a master block such as DMA controller or CPU generates an address that corresponds to a SDRAM bank the SDRAM controller generates the required SDRAM access signals To provide the required signals for bus traffic between the S3C2501X and ROM SRAM and the external I O banks To compensate for differences in bus width for data flowing between th...

Страница 217: ...24 bit external address pins 32 bit internal and external data bus Various timing control options NOTE By generating an external bus request an external device can access the S3C2501X s external memory interface pins In addition the S3C2501X can access slow external devices by using a WAIT signal The WAIT signal which is generated by the external device extends the duration of the CPU s memory acc...

Страница 218: ...fixed The initial system memory map following system start up is shown in Figure 5 1 Table 5 1 Base Address of Each Bank Bank Base Address EXT I O Bank 0 0x00000000 EXT I O Bank 1 0x01000000 EXT I O Bank 2 0x02000000 EXT I O Bank 3 0x03000000 EXT I O Bank 4 0x04000000 EXT I O Bank 5 0x05000000 EXT I O Bank 6 0x06000000 EXT I O Bank 7 0x07000000 SDRAM Bank 0 0x40000000 SDRAM Bank 1 0x80000000 ...

Страница 219: ...Bank 5 EXT I O Bank 4 EXT I O Bank 3 EXT I O Bank 1 EXT I O Bank 2 EXT I O Bank 0 NOTES 1 ROM SRAM Flash and External I O Bank have the same operation in internal logic Therefore you may connect a SRAM or a Flash Memory with a External I O Bank 2 Each EXT I O bank address is fixed with maximum address range S3C2501X has 24 address pins which restrict to 16M byte address 3 Each SDRAM bank supports ...

Страница 220: ...ss size for the Bank 0 nOE 1 LOW O Specifies read write state from S3C2501X When S3C2501X read from ext I O device nOE s value is 1 b0 nRCS 8 LOW O Specifies which ext I O device is selected nEWAIT nREADY 1 LOW I Signal be controlled from ext I O slow device to delay cycles in data read and write HCLKO 1 HIGH O S3C2501X system clock out CKE 1 HIGH O Clock enable for SDRAM nSDCS 2 LOW O Chip select...

Страница 221: ...gnals ROM SRAM Flash and SDRAM common signals External device interface signals Adjust with pin selection nOE nRCS 7 0 ADDR 23 0 HCLKO CKE nSDCS 1 0 nSDRAS nSDCAS nWBE nBE DQM 3 0 nEWAIT nREADY nSDWE nWE16 B0SIZE 1 0 XBMREQ DATA 31 0 XBMACK S3C2501X Figure 5 2 Memory Controller Bus Signals ...

Страница 222: ...Width STORE CPU Reg External Memory 32 bit 16 bit 8 bit Bit Num CPU Register Data 31 0 abcd 31 0 xxab 31 0 xxcd 31 0 xxxa 31 0 xxxb 31 0 xxxc 31 0 xxxd CPU Address WA HA HA 1 BA BA 1 BA 2 BA 3 Bit Num CPU Data Bus 31 0 abcd 31 0 abab 31 0 cdcd 31 0 aaaa 31 0 bbbb 31 0 cccc 31 0 dddd External Address ADDR EA Bit Num External DATA 31 0 dcba 31 0 xxba 31 0 dcxx 31 0 xxxa 31 0 xxbx 31 0 xcxx 31 0 dxxx...

Страница 223: ...ata 31 0 abcd 31 0 xxab 31 0 xxxa 31 0 xxxb CPU Address WA HA BA BA 1 Bit Num CPU Data Bus 31 0 abcd 31 0 abab 31 0 aaaa 31 0 bbbb External Address ADDR EA EA 1 EA EA Bit Num External DATA 15 0 ba 15 0 dc 15 0 ba 15 0 xa 15 0 bx Timing Sequence 1st 2nd Table 5 6 External 16 bit Datawidth Load Operation with Big Endian Transfer Width LOAD CPU Reg External Memory 32 bit 16 bit 8 bit Bit Num CPU Regi...

Страница 224: ...7 0 xxxa CPU Address WA HA BA Bit Num CPU Data Bus 31 0 abcd 31 0 abab 31 0 aaaa External Address EA EA 1 EA 2 EA 3 EA EA 1 EA Bit Num External DATA 7 0 a 7 0 b 7 0 c 7 0 d 7 0 a 7 0 b 7 0 a Timing Sequence 1st 2nd 3rd 4th 1st 2nd Table 5 8 External 8 bit Datawidth Load Operation with Big Endian Transfer Width LOAD CPU Reg External Memory 32 bit 16 bit 8 bit Bit Num CPU Register Data 31 0 abcd 15 ...

Страница 225: ... 0 xxxa CPU Address WA HA HA 1 BA BA 1 BA 2 BA 3 Bit Num CPU Data Bus 31 0 abcd 31 0 cdcd 31 0 abab 31 0 dddd 31 0 cccc 31 0 bbbb 31 0 aaaa External Address ADDR EA Bit Num External DATA 31 0 abcd 31 0 xxcd 31 0 abxx 31 0 xxxd 31 0 xxcx 31 0 xbxx 31 0 axxx Timing Sequence Table 5 10 External 32 bit Datawidth Load Operation with Little Endian Transfer Width LOAD CPU Reg External Memory 32 bit 16 bi...

Страница 226: ...r Data 31 0 abcd 31 0 xxab 31 0 xxxb 31 0 xxxa CPU Address WA HA BA BA 1 Bit Num CPU Data Bus 31 0 abcd 31 0 abab 31 0 bbbb 31 0 aaaa External Address ADDR EA 1 EA EA EA Bit Num External DATA 15 0 ab 15 0 cd 15 0 ab 15 0 xb 15 0 ax Timing Sequence 1st 2nd Table 5 12 External 16 bit Datawidth Load Operation with Little Endian Transfer Width LOAD CPU Reg External Memory 32 bit 16 bit 8 bit Bit Num C...

Страница 227: ...0 xxxa CPU Address WA HA BA Bit Num CPU Data Bus 31 0 abcd 31 0 abab 31 0 aaaa External Address ADDR EA 3 EA 2 EA 1 EA EA 1 EA EA Bit Num External DATA 7 0 a 7 0 b 7 0 c 7 0 d 7 0 a 7 0 b 7 0 a Timing Sequence 1st 2nd 3rd 4th 1st 2nd Table 5 14 External 8 bit Datawidth Load Operation with Little Endian Transfer Width LOAD CPU Reg External Memory 32 bit 16 bit 8 bit Bit Num CPU Register Data 31 0 a...

Страница 228: ...data bus Ext I O bank controller has three kind of the register for eight banks and then it can be controlled by various timing control options 5 6 1 FEATURES The following is a list of the Ext I O Bank Controller s features 8 banks ROM SRAM Flash Memory External I O interface 16M byte maximum address range per bank 24 bit external address pins 32 bit internal and external data bus Various timing ...

Страница 229: ...TERNAL DEVICE CONNECTION Figure 5 3 illustrates a simple connection between 8 bit ROM Flash and S3C2501X ADDR DATA nOE nCS nWE 8 bit ROM Flash nOE nRCS 0 ADDR 23 0 DATA 7 0 nWBE 0 S3C2501X Figure 5 3 8 bit ROM SRAM and Flash Basic Connection ...

Страница 230: ...it ROM Flash and S3C2501X for the consisting of 16 bit ROM SRAM Flash nOE nRCS 0 nWBE 0 nWBE 1 ADDR 23 0 DATA 7 0 DATA 15 8 ADDR 23 0 DATA 7 0 nOE nCS nWE 8 bit ROM Flash ADDR 23 0 DATA 7 0 nOE nCS nWE 8 bit ROM Flash S3C2501X Figure 5 4 8 bit ROM SRAM and Flash Basic Connection 8 bit Memory x 2 ...

Страница 231: ...6 Figure 5 5 illustrates a connection between 16 bit ROM SRAM and S3C2501X ADDR DATA nOE nCS Upper byte Lower byte 16 bit SRAM nWE nOE nRCS nBE 0 ADDR 23 0 DATA 15 0 nBE 1 nSDWE nWE16 S3C2501X Figure 5 5 16 bit SRAM Basic Connection ...

Страница 232: ...OLLER 5 17 Figure 5 6 illustrates a connection between 16 bit ROM Flash and S3C2501X ADDR DATA nOE nWE 16 bit ROM Flash nCS nOE nSDWE nWE16 ADDR 23 0 DATA 15 0 nRCS S3C2501X Figure 5 6 16 bit ROM and Flash Basic Connection ...

Страница 233: ... 5 7 illustrates a connection between 16 bit ROM and S3C2501X nOE nRCS ADDR 23 0 DATA 31 0 DATA 15 0 DATA 31 16 S3C2501X ADDR DATA nOE nCS nWE 16 bit ROM ADDR DATA nOE nCS nWE 16 bit ROM nSDWE nWE16 Figure 5 7 16 bit ROM Basic Connection 2 ...

Страница 234: ...n between 16 bit SRAM and S3C2501X nOE nRCS ADDR 23 0 DATA 31 0 nWBE 1 DATA 15 0 DATA 31 16 nWBE 0 ADDR DATA nOE nCS Upper byte 16 bit SRAM Lower byte ADDR DATA nOE nCS Upper byte 16 bit SRAM Lower byte nWBE 3 nWBE 2 S3C2501X Figure 5 8 16 bit SRAM Basic Connection 2 ...

Страница 235: ... ALE DATA 7 0 nWBE nREADY S3C2501X ROM SRAM Figure 5 9 ROM SRAM with Muxed Address Data Bus Connection NOTE If the external I O use nReady signal insteady of nWait you must select nReady in WAITCON register of memory controller ADDR 23 bit is used the address latch enable ALE signal to latch an address for the ROM and SRAM which have the muxed bus structure ...

Страница 236: ...ndard system configuration The special registers are also used to control access to all banks Table 5 15 Ext I O Bank Controller Special Registers Name Address Description Reset Value B0CON 0xF0010000 Bank 0 control register 0xC514E488 B0SIZE 3 0x8514E488 B0SIZE 2 0x4514E488 B0SIZE 1 B1CON 0xF0010004 Bank 1 control register 0xC514E488 B2CON 0xF0010008 Bank 2 control register 0xC514E488 B3CON 0xF00...

Страница 237: ... the nOE assertion to be delayed Thus the external memory may use more stable address Access cycles TACC extend nCS cycles to access external memory After nOE is deasserted chip selection hold time TCOH can be used when nCS is keep up B0CON is used to set the external access timings for external I O bank 0 B1CON is used to set the external access timing for I O bank 1 and so on BnCON Bank number F...

Страница 238: ...514E488 B0SIZE 1 B1CON 0xF0010004 R W Bank 1 control register 0xC514E488 B2CON 0xF0010008 R W Bank 2 control register 0xC514E488 B3CON 0xF001000C R W Bank 3 control register 0xC514E488 B4CON 0xF0010010 R W Bank 4 control register 0xC514E488 B5CON 0xF0010014 R W Bank 5 control register 0xC514E488 B6CON 0xF0010018 R W Bank 6 control register 0xC514E488 B7CON 0xF001001C R W Bank 7 control register 0x...

Страница 239: ... 12 cycles 1101 13 cycles 1110 14 cycles 1111 15 cycles 20 16 Access cycles nOE low time TACC 00000 reserved 00001 reserved 00010 reserved 00011 3 cycles 00100 4 cycles 00101 5 cycles 00110 6 cycles 00111 7 cycles 01000 8 cycles 01001 9 cycles 01010 10 cycles 01011 11 cycles 01100 12 cycles 01101 13 cycles 01110 14 cycles 01111 15 cycles 10000 16 cycles 10001 17 cycles 10010 18 cycles 10011 19 cyc...

Страница 240: ...as nCS nWBE nOE nEWAIT for 8 bit memory and nCS nWE16 nOE nEWAIT for 16 bit memory 3 The DW of bank 0 is the same with B0SIZE 1 0 pin That is read only value The initial value of other banks is 11 5 6 3 2 Muxed bus control register Ext I O Bank controller supports memory devices which have the muxed bus interface To use muxed bus memory device muxed bus enable MBE and muxed bus address cycle TMA f...

Страница 241: ...000 8 cycles 20 18 Muxed bus address cycle for bank 6 TMA6 001 1 cycle 010 2 cycles 011 3 cycles 100 4 cycles 101 5 cycles 110 6 cycles 111 7 cycles 000 8 cycles 23 21 Muxed bus address cycle for bank 7 TMA7 001 1 cycle 010 2 cycles 011 3 cycles 100 4 cycles 101 5 cycles 110 6 cycles 111 7 cycles 000 8 cycles 24 Address Data muxed bus enable for bank 0 MBE0 0 disable 1 enable 25 Address Data muxed...

Страница 242: ...e bank except first access cycle So TCOHDIS helps you to access slow External I O devices more quickly Performance by using COHDIS in the WAITCON register when slow External I O is used could be improved If you use slow External I O you must set TCOH to a proper value because you have to prevent the data collision But when you set TCOH to a non zero value all types of data access in the selected b...

Страница 243: ...EN2 9 External wait enable for bank 1 EWAITEN1 8 External wait enable for bank 0 EWAITEN0 7 nWait nReady select for bank 7 NREADY7 0 nWait 1 nReady 6 nWait nReady select for bank 6 NREADY6 5 nWait nReady select for bank 5 NREADY5 4 nWait nReady select for bank 4 NREADY4 3 nWait nReady select for bank 3 NREADY3 2 nWait nReady select for bank 2 NREADY2 1 nWait nReady select for bank 1 NREADY1 0 nWai...

Страница 244: ...29 5 6 4 TIMING DIAGRAM nRCS nOE ADDR DATA Addr HCLKO D ata Fetch tACC Data tRCSd tnOEd tADDRd tDATAd TACC 0x8 8 cycles TCOS 0x0 0 cycle TCOH 0x0 0 cycle TACS 0x0 0 cycle tRCSh tnOEh tADDRh tDATAh Figure 5 14 Read Timing Diagram 1 ...

Страница 245: ...R S3C2501X 5 30 nRCS nSDWE ADDR DATA Addr HCLKO tACC Data TACC 0x8 8 cycles TCOS 0x0 0 cycle TCOH 0x0 0 cycle TACS 0x0 0 cycle tADDRd tRCSh tnSDWEh tADDRh tDATAh tRCSd tnSDWEd tDATAd Figure 5 15 Write Timing Diagram 1 ...

Страница 246: ...R 5 31 nRCS nOE ADDR DATA Addr HCLKO Data Fetch tACC Data tCOH tACS tCOS TACC 0x5 5 cycles TCOS 0x1 1 cycle TCOH 0x1 1 cycle TACS 0x1 1 cycle tRCSd tnOEd tADDRd tDATAd tRCSh tnOEh tADDRh tDATAh Figure 5 16 Read Timing Diagram 2 ...

Страница 247: ...01X 5 32 nRCS nSDWE ADDR DATA HCLKO tACC Data tCOH tACS tCOS TACC 0x5 5 cycles TCOS 0x1 1 cycle TCOH 0x1 1 cycle TACS 0x1 1 cycle tADDRd tRCSh tnSDWEh tADDRh tDATAh tRCSd tnSDWEd tDATAd Addr Figure 5 17 Write Timing Diagram 2 ...

Страница 248: ...cycles TCOS 1 1 cycle TCOH 2 2 cycle TACS 1 1 cycle COHDIS 1 Enable Addr1 at Bank n tACC Data 1 tCOH tACS tCOS Addr2 at Bank n tACC Data 2 tACS tCOS nSDWE tCOH 1st access cycle at Bank n 2nd access cycle at Bank n Figure 5 18 Read after Write at the Same Bank COHDIS 1 ...

Страница 249: ...ALE DATA HCLKO Data Fetch tACC Data tCOH tMA tCOS TACC 0x4 4 cycles TCOS 0x1 1 cycle TCOH 0x1 1 cycle TMA 0x2 2 cycles MBE 1 Enable Addr tDATAd tRCSd tRCSh tnOEh tnOEd tDATAh tADDRh tALEh tALEd tADDRd Figure 5 19 Read Timing Diagram Muxed Bus ...

Страница 250: ...LE DATA HCLKO Data Fetch tACC Data tCOH tMA tCOS TACC 0x4 4 cycles TCOS 0x1 1 cycle TCOH 0x1 1 cycle TMA 0x2 2 cycles MBE 1 Enable Addr tDATAd tGCSd tGCSh tnSDWEh tnSDWEd tDATAh tADDRh tALEh tALEd tADDRd Figure 5 20 Write Timing Diagram Muxed Bus ...

Страница 251: ...DR DATA Addr HCLKO tACC tACS tCOS TACC 0x5 5 cycles TCOS 0x1 1 cycle TCOH 0x0 0 cycle TACS 0x1 1 cycle EWAITEN 1 Enable nEWAIT nReady tnOEd tADDRd tADDRh tnOEh tDATAh tRCSh tRCSd tDATAd Data tnWAITd tnWAITh Figure 5 21 Write Timing Diagram nEWAIT ...

Страница 252: ...LKO tACC tACS tCOS TACC 0x5 5 cycles TCOS 0x1 1 cycle TCOH 0x0 0 cycle TACS 0x1 1 cycle EWAITEN 1 Enable NREADY 1 nReady nEWAIT nReady tDATAd tRCSd tnSDWEd tADDRd tDATAh tADDRh tnSDWEh tRCSh Data tnWAITd tnWAITh Addr Figure 5 22 Write Timing Diagram nREADY ...

Страница 253: ...formance Supports for 16M bit 64M bit 128M bit and 256M bit SDRAM devices with two or four leaves Allows a direct interface to up to two banks of SDRAM Each bank supports 16 or 32 bits wide and up to 128M byte in size Support byte half word and word transaction CAS latency can be 1 2 or 3 Provides auto refresh and self refresh mode to sustain the contents of SDRAM memory ...

Страница 254: ... bus width is 32 bits Table 5 20 Illustrates the supported SDRAM configurations when external bus width is 16 bits If 16M bit device which has two leaves is used only ADDR 13 is used to select a leaf If SDRAM device which has four leaves is used both ADDR 14 and ADDR 13 are used to select a leaf Only the chip select signals nSDCS 1 0 are to select a bank The other SDRAM control signals are common ...

Страница 255: ... 32 M 2 64 M 4M x 16 1 12 8 HADDR 22 HADDR 21 16 M 2 32 M 2M x 32 1 11 8 HADDR 22 HADDR 21 8 M 2 16 M 128M bit 16M x 8 1 12 10 HADDR 22 HADDR 21 64 M 2 128 M 8M x 16 1 12 9 HADDR 22 HADDR 21 32 M 2 64 M 4M x 32 1 12 8 HADDR 22 HADDR 21 16 M 2 32 M 256M bit 32M x 8 1 13 10 HADDR 22 HADDR 21 128 M 2 256 M 16M x 16 1 13 9 HADDR 22 HADDR 21 64 M 2 128 M 8M x 32 1 13 8 HADDR 22 HADDR 21 32 M 2 64 M NOT...

Страница 256: ...x16 1 11 8 HADDR 20 2 M 2 4 M 64M bit 8M x 8 1 12 9 HADDR 21 HADDR 20 16 M 2 32 M 4M x 16 1 12 8 HADDR 21 HADDR 20 8 M 2 16 M 128M bit 16M x 8 1 12 10 HADDR 21 HADDR 20 32 M 2 64 M 8M x 16 1 12 9 HADDR 21 HADDR 20 16 M 2 32 M 256M bit 32M x 8 1 13 10 HADDR 21 HADDR 20 64M 2 128M 16M x 16 1 13 9 HADDR 21 HADDR 20 32 M 2 64 M NOTE Banks Number of external SDRAM memory bank used The controller suppor...

Страница 257: ...128M bit 16Mx8 22 21 25 24 9 8 7 6 5 4 3 2 8Mx16 22 21 24 9 8 7 6 5 4 3 2 4Mx32 22 21 9 8 7 6 5 4 3 2 256M bit 32Mx8 22 21 26 25 9 8 7 6 5 4 3 2 16Mx16 22 21 25 9 8 7 6 5 4 3 2 8Mx32 22 21 9 8 7 6 5 4 3 2 SDRAM Row Address AddrOut 14 0 Technology 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 16M bit 2Mx8 21 20 19 18 17 16 15 14 13 12 11 10 1Mx16 21 20 19 18 17 16 15 14 13 12 11 10 64M bit 8Mx8 22 21 23 20 19...

Страница 258: ...0 Technology 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 16M bit 2Mx8 20 19 18 17 16 15 14 13 12 11 10 9 1Mx16 20 19 18 17 16 15 14 13 12 11 10 9 64M bit 8Mx8 21 20 22 19 18 17 16 15 14 13 12 11 10 9 4Mx16 21 20 22 19 18 17 16 15 14 13 12 11 10 9 128M bit 16Mx8 21 20 22 19 18 17 16 15 14 13 12 11 10 9 8Mx16 21 20 22 19 18 17 16 15 14 13 12 11 10 9 256M bit 32Mx8 21 20 23 22 19 18 17 16 15 14 13 12 11 10 9 ...

Страница 259: ...L OP code MRS Refresh Auto refresh H L L L H X REF Self refresh L L L L H SREF Row activate H L L H H V X ACT Read with auto precharge H L H L H V H RDA without auto precharge L RD Write with auto precharge H L H L L V H WRA without auto precharge L WR Burst stop H L H H L X BST Precharge Bank selection H L L H L V L PRE All banks X H PALL Active power down L H X X X X APWDN Precharge power down L...

Страница 260: ...is completed before the requested data is read from memory to maintain data consistency between the write buffer and SDRAM memory 5 7 7 SELF REFRESH The SDRAM controller provides the auto refresh REF and self refresh SREF command to sustain the contents of the SDRAM The auto refresh is issued to SDRAM periodically when refresh timer is expired The self refresh is entered and exited by request of o...

Страница 261: ... 0 of the CFGREG to 01 This automatically issues a PALL command to the SDRAM 3 Write 0xF into the refresh timer register This provides a refresh cycle every 15 clock cycles 4 Wait for a time period equivalent to 120 clock cycles 8 refresh cycles 5 Program the normal operational value into the refresh timer 6 Program the CFGREG to their normal operation values 7 Program the INIT 1 0 to 10 This auto...

Страница 262: ...nd register 0x00000000 REFREG 0xF0020008 Refresh timer register 0x00000020 WBTOREG 0xF002000C Write buffer time out register 0x00000000 5 3 9 1 Configuration Register The configuration register is 32 bit read write some bits are read only register This register contains SDRAM control parameters such as external bus width memory type and various timing parameters Table 5 25 SDRAM Configuration Regi...

Страница 263: ...es 01 64M bit SDRAM memory devices 10 128M bit SDRAM memory devices 11 256M bit SDRAM memory devices R W 00 RP 9 8 Row Pre charge time 00 RP 1 cycle 01 RP 2 cycles 10 RP 3 cycles 11 RP 4 cycles R W 11 RCD 11 10 RAS to CAS delay 00 RCD 1 cycle 01 RCD 2 cycles 10 RCD 3 cycles 11 RCD 4 cycles R W 11 RC 15 12 Row Cycle 0000 RC 1 cycles 0001 RC 2 cycles 1110 RC 15 cycles 1111 RC 16 cycles R W 1001 RAS ...

Страница 264: ...mory devices 9 8 Row Pre charge time RP 00 1 cycle 01 2 cycles 10 3 cycles 11 4 cycles 11 10 RAS to CAS delay RCD 00 1 cycle 01 2 cycles 10 3 cycles 11 4 cycles 15 12 Row Cycle RC 0000 1 cycle 0001 2 cycles 0010 3 cycles 0011 4 cycles 0100 5 cycles 0101 6 cycles 0110 7 cycles 0111 8 cycles 1000 9 cycles 1001 10 cycles 1010 11 cycle 1011 12 cycles 1100 13cycles 1101 14 cycles 1110 15 cycles 1111 16...

Страница 265: ...t value INIT 1 0 Control bits for SDRAM device initialization 00 Normal operation 01 Automatically issue a PALL to the SDRAM 10 Automatically issue a MRS to the SDRAM 11 reserved R W 00 WBUF 2 Write buffer enable 0 Disable merging write buffer 1 Enable merging write buffer NOTE Disabling the write buffer will flush any stored value s to the external SDRAM memory R W 0 BUSY 3 SDRAM controller statu...

Страница 266: ... PALL to the SDRAM 10 Automatically issue a MRS to the SDRAM 11 reserved 2 Write buffer enable 0 Disable merging write buffer 1 Enable merging write buffer 3 SDRAM controller status bit 0 SDRAM controller is idle 1 SDRAM controller is busy 31 4 Reserved 31 0 3 4 1 2 RESERVED B U I N T B S Y Figure 5 24 SDRAM Command Register ...

Страница 267: ...x00000020 REFREG Bit Description R W Default value REFCYC 15 0 SDRAM refresh cycle R W 0x00000020 31 16 Reserved For example for common refresh period of 15 6us and a system bus clock frequency of 66MHz 15 6 x 10 6 x 66 x 106 1029 The refresh timer is set to 64 on reset To ensure a refresh interval of less than 15 6us after reset The minimum frequency of system bus clock allowed is 64 15 6 x 10 6 ...

Страница 268: ...00000000 WBTOREG Bit Description R W Default value WBTO 15 0 Write buffer time out delay time R W 0x00000000 31 16 Reserved A write to a merging write buffer loads the value in the timeout register into the time out down counter of the buffer When the time out counter reaches 0 the merging write buffer contents is written flushed to the external memory The down counter is clocked by system bus clo...

Страница 269: ...IMING Read ADDR DATA HCLKO nSDCAS nSDWE CKE nSDRAS nSDCS DQM nWBE Row Active Row Addr tCC tCL tCH tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tRDd tRDh tDQMd tDQMh tRCD Col Addr Data DQM Latency CAS Latency Figure 5 27 Single Read Operation CAS Latency 2 ...

Страница 270: ... DATA HCLKO nSDCAS nSDWE CKE nSDRAS nSDCS DQM nWBE Row Active Row Addr tCC tCL tCH tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tRDd tRDh tDQMd tDQMh tRCD Col Addr Data DQM Latency CAS Latency Figure 5 28 Single Read Operation CAS Latency 3 ...

Страница 271: ... 56 Write ADDR DATA HCLKO nSDCAS nSDWE nSDRAS nSDCS Data Row Active Row Addr tCC tCL tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tWDd tWDh tDQMd tDQMh tRCD tWEd tWEh DQM nWBE Col Addr CKE tCH Figure 5 29 Single Write Operation ...

Страница 272: ...a Data Data Write ADDR DATA HCLKO nSDCAS nSDWE CKE nSDRAS nSDCS Row Active Row Addr tRCD tCC tCL tCH tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tRDh tDQMd tDQMh CAS Latency DQM Latency tRDd DQM nWBE Figure 5 30 Burst Read Operation CAS Latency 2 ...

Страница 273: ...ol Addr HCLKO nSDCAS nSDWE CKE nSDRAS nSDCS Row Active Row Addr tCC tCL tCH tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tRDd tRDh tDQMd tDQMh tRCD Data Data Data Data DQM nWBE CAS Latency DQM Latency Figure 5 31 Burst Read Operation CAS Latency 3 ...

Страница 274: ... Addr Data Data Write ADDR DATA HCLKO nSDCAS nSDWE CKE nSDRAS nSDCS DQM nWBE Row Active Row Addr tRCD tCC tCL tCH tCSd tCSh tRASd tRASh tADDRd tCASd tCASh tADDRh tWDh tDQMd tDQMh tWDd Data Data tWEd tWEh Figure 5 32 Burst Write Operation ...

Страница 275: ...MEMORY CONTROLLER S3C2501X 5 60 NOTES ...

Страница 276: ...is limited only by the maximum bus capacitance of 400 pF 6 2 FEATURES Supports only single master mode Supports 8 bit bi directional serial data transfers Supports 7 bit addressing Figure 6 1 shows a block diagram of the S3C2501X I2C controller Data Control Serial Clock Line Control Serial Clock Prescaler Control status register IICCON RESET BUSY COND1 COND0 ACK LRB IEN Prescaler register IICPS Sy...

Страница 277: ...ter of the serial I2C Using a prescaler register the user can program the serial clock frequency that is supplied to the I2C controller The serial clock frequency is calculated as follows Serial clock frequency fSYSCLK 16 prescaler register value 1 3 where fSYSCLK is the system clock frequency ...

Страница 278: ... transfers proceed as follows Case 1 A master IC wants to send data to another IC slave 1 Master addresses slave 2 Master sends data to the slave master is transmitter slave is receiver 3 Master terminates the data transfer Start Condition Address P 9 Stop Condition SDA by Receiver SCL from Master 8 9 8 R W ACK ACK S SDA by Transmitter MSB Acknowledge from receiver Acknowledge from receiver 2 1 MS...

Страница 279: ...n 6 4 2 GENERAL CHARACTERISTICS Both SDA and SCL are bi directional lines which are connected to a positive supply voltage through a pull up resistor When the I2C is free the SDA and SCL lines are both high level The output stages of I2C interfaces connected to the bus have an open drain or open collector to perform the wired AND function Data on the I2C can be transferred at a rate up to 100 Kbit...

Страница 280: ... generated by the master The bus is considered to be busy after the start condition is generated The bus is considered to be free again when a brief time interval has elapsed following the stop condition Start condition a High to Low transition of the SDA line while SCL is high Stop condition a Low to High transition of the SDA line while SCL is high Start Condition Address P 9 Stop Condition SDA ...

Страница 281: ...lock pulse The receiver must pull down the SDA line during the acknowledge pulse so that it remains stable low during the high period of this clock pulse Usually a receiver which has been addressed is obliged to generate an acknowledge after each byte is received When a slave receiver does not acknowledge from the slave address the slave must leave the data line high The master can then generate a...

Страница 282: ...e slave Afterwards the direction depends on the data transfer direction In other words if the mater reads the data it sends the ACK Not Acknowledge S W R P A NAK Figure 6 5 Data Transfer Format 6 4 6 4 I2C Addressing The addressing procedure for the I2C is such that the first byte after the start condition determines which slave the master will select Usually this first byte immediately follows th...

Страница 283: ...ad only It holds the value of the last received bit over the I 2 C Normally this bit will be the value of the slave acknowledgement To check for slave acknowledgement you test the LRB 3 Acknowledge enable ACK The ACK bit is normally set to 1 This causes the I2C controller to send an acknowledge automatically after each byte This bit must be 0 when the I2C controller is operating in receiver mode a...

Страница 284: ... ACK not received 3 Acknow enable ACK Controls generation of an ACK signal in receive mode 0 Do not generate an ACK at 9th SCL No more received data is required from the slave 1 Generate an ACK signal at 9th SCL 5 4 COND 1 and COND 0 Generate a control such as start or stop 00 No effect 01 Generate start condition BF bit should be set simultaneously 10 Generate stop condition 11 SCL will be releas...

Страница 285: ...e shift register and read form the data buffer I2C data is always shifted in or out of the shift register 31 8 Reserved Not applicable 6 5 3 PRESCALER REGISTER IICPS Table 6 4 IICPS Register Register Address R W Description Rest Value IICPS 0xF00F0008 R W Prescaler register 0x00000000 Bit Number Bit Name Description 15 0 Prescaler value This prescaler value is used to generate the serial I2C clock...

Страница 286: ... prescaler counter It is read in test mode only to check the counter s current value 31 16 Reserved Not applicable 6 5 5 INTERRUPT PENDING REGISTER IICPND Table 6 6 IICPND Register Register Address R W Description Rest Value IICPND 0xF00F0010 R W Interrupt pending register 0x00000000 Bit Number Bit Name Description 0 Interrupt pending value This bit is set when the interrupt is generated and clear...

Страница 287: ...1X 6 12 IIC Setup Reset IICPS Setup IICCON Start BF IICBUF IIC Slave Address 0x0 IICBUF IIC Upper Address IICBUF IIC Lower Address IICBUF One Byte Data ALL Data Sent IICCON Stop Yes No Figure 6 7 Write Operation Flow Chart ...

Страница 288: ...F IICBUF IIC Slave Address 0x0 IICBUF IIC Upper Address IICBUF IIC Lower Address IICBUF One Byte Data ALL Data Receive Send No ACK Yes No IICCON Repeat Start ACK IICCON Start ACK IICBUF IIC Slave Address 0x1 Empty the BF Bit IICCON Stop Figure 6 8 Read Operation Flow Chart ...

Страница 289: ...I2C CONTROLLER S3C2501X 6 14 NOTES ...

Страница 290: ...ck a content addressable memory CAM for storing network addresses a number of commands status and error counter registers The MII supplies the transmission and reception clocks of 25MHz for 100M bps operation 2 5 MHz for the 10M bps speed or 1MHz for the 1M bps for Home PNA The MII conforms to the ISO IEC 802 3 standards B D I M I I 10 M b p s 7 W i r e MAC TxFIFO 80x9 MAC Preamble SFD CRC PAD JAM...

Страница 291: ...d and new physical media support compatible with existing 10M bps networks 100M bps or 10M bps operation to allow price performance options and to support phased conversions Full IEEE 802 3 compatibility for existing applications Media Independent interface MII or 7 wire interface Station management STA signaling for external physical layer configuration and link negotiation On chip CAM 21 MAC add...

Страница 292: ...also supports generation of pause frame and provides timers and counters for pause control MAC control command and status registers Controls programmable options including the enabling or disabling of signals that notify the system when conditions occur The status registers hold information for error handling software and the error counters accumulate statistical information for network management...

Страница 293: ...If no collision occurs and transmission is underway the additional 16 bytes handle system latency and avoid FIFO under run When the system interface has set the MACTXCON 0 bit the transmission state machine requests data from the BDI The system controller then fetches data from the system memory The data is stored in the MTxFIFO until the threshold for transmit data is satisfied When the MTxFIFO i...

Страница 294: ...mes and then retransmits the data After 16 attempts the transmission state machine sets an error bit and generates an interrupt if enabled to signify the failure to transmit a frame due to excessive collisions It flushes the MTxFIFO and the MAC is ready for the next frame 7 3 4 7 Transmit Data Parity Checker Data in the FIFO is even parity When data is read for transmission the transmission state ...

Страница 295: ... CAM1 and length type op code and operand to the CAM18 entry You must write the MAC transmit control register to set the send pause control bit In addition CAM19 and CAM20 can be used to construct a user define control frame 7 3 5 3 Parallel CRC Checker The receiver block computes a CRC across the data and the transmitted CRC and then checks that the resulting syndrome is valid A parallel CRC chec...

Страница 296: ...he BDMA engine controls the data feeding and reception between the MAC and the system bus AMBA using two buffers BDMA TxBUFF BTxBUFF and BDMA RxBUFF BRxBUFF The BTxBUFF and BRxBUFF hold data and status information for frames being transmitted and received respectively Each buffer is controlled by the block which consists of a bus arbiter a control and status block buffer descriptors 7 3 7 1 Bus Ar...

Страница 297: ...e design of the DMA and degrade the performance To avoid this you can use an alignment widget between the BDMA Buffer word and the MAC FIFO byte by controlling the widget field in Tx buffer descriptor The widget discards the first n bytes up to three where n is the value read from the Tx buffer descriptor that configures the alignment widget In the receiver the BDMA bus arbiter inserts a programma...

Страница 298: ...DMARXDPTR is not updated to the next pointer It always has the first buffer descriptor address Because BDMA pointers are fixed as initial addresses BDMA count register values indicate the number of frames to be handled by BDMA In addition users can determine how many buffer descriptors to use by controlling the BDMATXCON 3 0 BTxNBD and BDMARXCON 3 0 BRxNBD If the last buffer descriptor was used by...

Страница 299: ...send 24 Comp The transmition is finished 23 ParErr MTxFIFO Parity Error 22 LateColl The Collision occured after 64 byte times 21 NoCarr No Carrier sense is detected when MAC Tx transmits a frame 20 DeferErr MAC doesn t run the transmission process until 6071 nibble or 24284 bit times The current frame is aborted 19 Underflow MTxFIFO underflow 18 ExColl The excessive collision is occured 16 times c...

Страница 300: ...s set or when MACRXCON 0 MRxEn is clear 24 MRx10Stat The frame was received over 10Mbps wire 7 interface 23 BRxDone The reception process by the BDMA is done without error 22 RxParErr MRxFIFO Parity Error 21 MUFS Set when the size of the Rx frame is larger than the Maximum Untagged Frame Size 1518bytes if the long packet is not enabled in the MAC Rx control register 20 Overflow MRxFIFO Overflow 19...

Страница 301: ...er than 1518 byte the BRxBS should be at least 4 bytes larger than the BRxMFS or less than 1518 byte for the reception with a single or multiple buffer descriptors respectively BRxBS of BDMARXLEN not used BRxBS of BDMARXLEN BRxBS of BDMARXLEN Memory for Rx bufer descriptor not used not used BRXBDCNT N 1 BRXBDCNT 1 buffer pointer 1 status length buffer pointer 2 status length buffer pointer N statu...

Страница 302: ...XINTENA 0xF00A001C R W BDMA MAC Rx Interrupt enable register 0x00000000 BMTXSTATA 0xF00A0020 R W BDMA MAC Tx Status register 0x00000000 BMRXSTATA 0xF00A0024 R W BDMA MAC Rx Status register 0x00000000 BDMARXLENA 0xF00A0028 R W Receive Frame Size 0x00000000 CFTXSTATA 0xF00A0030 R Transmit control frame status 0x00000000 MACCONA 0xF00B0000 R W MAC control 0x00000000 CAMCONA 0xF00B0004 R W CAM control...

Страница 303: ...0xF00C0020 R W BDMA MAC Tx Status register 0x00000000 BMRXSTATB 0xF00C0024 R W BDMA MAC Rx Status register 0x00000000 BDMARXLENB 0xF00C0028 R W Receive Frame Size 0x00000000 CFTXSTATB 0xF00C0030 R Transmit control frame status 0x00000000 MACCONB 0xF00D0000 R W MAC control 0x00000000 CAMCONB 0xF00D0004 R W CAM control 0x00000000 MACTXCONB 0xF00D0008 R W Transmit control 0x00000000 MACTXSTATB 0xF00D...

Страница 304: ...IFO MTxFIFO at a new frame arrival 000 means no wait 001 means wait to fill 1 8 of the BDMA Tx Buffer 010 means wait to fill 2 8 of the buffer and so on through 100 which means wait to fill 4 8 of the BDMA Tx Buffer NOTE If the last data of the frame arrives in BDMA Tx Buffer the data transfer from the BDMA Tx Buffer to the MAC TxFIFO starts immediately regardless of the level of these bits 8 7 Re...

Страница 305: ...t bits determine how many bytes are invalid in the first word of each data frame These invalid bytes are inserted when the word is assembled by the BDMA 00 No invalid bytes 01 1 invalid byte 10 2 invalid bytes and 11 3 invalid bytes 8 6 Reserved Not applicable 9 Factorial test bits 10 BDMA Rx enable BRxEn When the Rx enable bit is set to 1 the BDMA Rx block is enabled Even if this bit is disabled ...

Страница 306: ...t buffer descriptor start address register contains the address of the first buffer descriptor on the frame to be sent 7 4 1 4 BDMA Receive Buffer Descriptor Start Address Register Table 7 7 BDMARXDPTR Register Registers Address R W Description Reset Value BDMARXDPTRA 0xF00A000C R W BDMA Rx buffer descriptor base register 0x00000000 BDMARXDPTRB 0xF00C000C R W BDMA Rx buffer descriptor base registe...

Страница 307: ...ter value is dependent on the BTxNBD of the BDMATXCON register Buffer descriptor current address BDMATXDPTR BTXBDCNT 3 7 4 1 6 BDMA Receive Buffer Descriptor Counter Table 7 9 BRXBDCNT Register Registers Address R W Description Reset Value BRXBDCNTA 0xF00A0014 R W BDMA Rx buffer descriptor counter of current pointer 0x00000000 BRXBDCNTB 0xF00C0014 R W BDMA Rx buffer descriptor counter of current p...

Страница 308: ...le MAC Tx deferral DeferErrIE This bit enables DeferErr interrupt 3 Enable MAC Tx no carrier NoCarrIE This bit enables NoCarr interrupt 4 Enable MAC Tx late collision LateCollIE This bit enables LateColl interrupt 5 Enable MAC Tx transmit parity TxParErrIE This bit enables TxParErr interrupt 6 Enable MAC Tx completion TxCompIE This bit enables TxComp interrupt 15 7 Reserved Not applicable 16 Tx co...

Страница 309: ...eferral Error DeferErr This bit is set when MAC doesn t run the transmission process from TX_EN falling to 6 071 nibble times or 24 284 bit times 3 No carrier NoCarr This bit is set if no carrier sense is detected during the transmission frame 4 Late collision LateColl This bit is set if a collision occurs after 512 bit times or 64 byte times 5 Transmit parity error TxParErr This bit is set if a p...

Страница 310: ...upt 3 Enable MAC Rx overflow OverflowIE This bit enables Overflow interrupt 4 Enable MAC Rx long error LongErrIE This bit enables LongErr interrupt 5 Enable MAC Rx receive parity RxParErrIE This bit enables RxParErr interrupt 6 Factorial test bit 15 7 Reserved Not applicable 16 Enable BDMA Rx done for every received frames BRxDoneIE This bit enables BRxDone interrupt 17 Enable BDMA Rx not owner in...

Страница 311: ... is set if the MAC received a frame longer than 1518 bytes It is not set if the long enable bit in the receive control register MACRXCON is set 5 Parity error RxParErr This bit is set if a parity error is detected in the MAC RxFIFO 6 Factorial test bit 15 7 Reserved Not applicable 16 BDMA Rx done in every received frames BRxDone This bit is set each time the BDMA receiver moves one received data f...

Страница 312: ...e BRxBS multiple buffer descriptors are used for the frame reception NOTE BRxBS value has to keep multiples of 16 in byte unit For long packet reception larger than 1518 bytes the BRxBS should be at least 4 bytes larger than the BRxMFS or less than 1518 bytes for the reception with a single or multiple buffer descriptor respectively 15 12 Reserved Not applicable 27 16 BDMA Maximum Rx Frame Size BR...

Страница 313: ...responsibility of the BDMA engine to read this register and to generate an interrupt to notify the system that the transmission of a MAC control packet has been completed Table 7 15 CFTXSTAT Register Registers Address R W Description Reset Value CFTXSTATA 0xF00A0030 R Transmit control frame status 0x00000000 CFTXSTATB 0xF00C0030 R Transmit control frame status 0x00000000 Bit Number Bit Name Descri...

Страница 314: ...rent frames has been completed 1 Halt immediate MHaltImm Set this bit to immediately stop all transmission and reception 2 Software reset MReset Set this bit to reset all MAC control and status register and MAC state machines This bit is automatically cleared 3 Full duplex Set this bit to start transmission while reception is in progress 4 MAC loopback MLoopBack Set this bit to cause transmission ...

Страница 315: ...ontroller accepts only the frames with the matched destination addresses Negative CAM comparison mode MCompEn 1 MNegCAM 1 The address comparison is same as the CAM comparison mode But the CAM controller rejects the frames with the matched destination addresses and accepts frames with the address outside the CAM address enabled No CAM comparison mode MCompEn 0 The CAM controller accepts frames with...

Страница 316: ...ress padding MNoPad Set this bit not to generate pad bytes for frames of less than 64 bytes 3 Suppress CRC MNoCRC Set this bit to suppress addition of a CRC at the end of a frame 4 Fast back off MFBack Set this bit to use faster back off times for testing 5 No defer MNoDef Set this bit to disable the defer counter The defer counter keeps counting until the carrier sense CrS bit is turned off 6 Sen...

Страница 317: ...nt MCollCnt This 4 bit value is the count of collisions that occurred while successfully transmitting the frame 12 Transmission deferred MTxDefer This bit is set if transmission of a frame was deferred because of a delay during transmission 13 Signal quality error SQEErr According to the IEEE802 3 specification the SQE signal reports the status of the PMA MAU or transceiver operation to the MAC la...

Страница 318: ...y 1 Receive halt request MRxHalt Set this bit to halt reception after completing the reception of any current frame 2 Long enable MLongEn Set this bit to receive frames with lengths greater than 1518 bytes 3 Short enable MShortEn Set this bit to receive frames with lengths less than 64 bytes 4 Strip CRC value MStripCRC Set this bit to check the CRC and then strip it from the message 5 Pass control...

Страница 319: ... Registers Address R W Description Reset Value MACRXSTATA 0xF00B0014 R W Receive status 0x00000000 MACRXSTATB 0xF00D0014 R W Receive status 0x00000000 Bit Number Bit Name Description 7 0 These bits are equal to the BMRXSTAT 7 0 8 Short Frame Error MRxShort This bit is set if the frame was received with short frame 9 Receive 10 Mb s status MRx10Stat This bit is set to 1 if the frame was received ov...

Страница 320: ...er Registers Address R W Description Reset Value STADATAA 0xF00B0018 R W Station management data 0x00000000 STADATAB 0xF00D0018 R W Station management data 0x00000000 Bit Number Bit Name Description 15 0 Station management data This register contains a 16 bit data value for the station management function ...

Страница 321: ...agement control and address 0x00006000 Bit Number Bit Name Description 4 0 PHY register address MPHYRegAddr A 5 bit address contained in the PHY of the register to be read or written 9 5 PHY address MPHYaddr The 5 bit address of the PHY device to be read or written 10 Write MPHYwrite To initiate a write operation set this bit to 1 For a read operation clear it to 0 11 Busy bit MPHYbusy To start a ...

Страница 322: ...the CAM is smaller than 21 entries the higher bits are ignored Table 7 24 CAMEN Register Registers Address R W Description Reset Value CAMENA 0xF00B0028 R W CAM enable 0x00000000 CAMENB 0xF00D0028 R W CAM enable 0x00000000 Bit Number Bit Name Description 20 0 CAM enable Set the bits in this 21 bit value to selectively enable CAM locations 20 through 0 To disable a CAM location clear the appropriat...

Страница 323: ...l register It also generates an interrupt if the corresponding interrupt enable bit is set If station management software wants more frequent interrupts you can set the missed error count register to a value closer to the rollover value of 0x7FFF For example setting a register to 0x7F00 would generate an interrupt when the count value reaches 256 occurrences Table 7 25 MISSCNT Register Registers A...

Страница 324: ...ause count received The count value indicates the number of time slots the transmitter was paused due to the receipt of control pause operation frames from the MAC 7 4 2 13 MAC Remote Pause Count Register Table 7 27 RMPZCNT Register Registers Address R W Description Reset Value RMPZCNTA 0xF00B0044 R Remote pause count 0x00000000 RMPZCNTB 0xF00D0044 R Remote pause count 0x00000000 Bit Number Bit Na...

Страница 325: ...ol frame you write the CAM0 entry with the destination address the CAM1 entry with the source address and the CAM 18 entry with length type opcode and operand You then set the send pause bit in the MAC transmit control register Table 7 28 CAM Register Registers Address R W Description Reset Value CAMA 0xF00B0080 0xF00B00FC R W CAM content 32 word Undefined CAMB 0xF00D0080 0xF00D00FC R W CAM conten...

Страница 326: ...o qualify as a valid station address the first bit transmitted the LSB of the first byte must be a 0 Length or type 2 byte The MAC treats length fields greater than 1500 byte as type fields Byte values less than or equal to 1500 indicate the number of logical link control LLC data bytes in the data field The MAC transmits the high order byte first Logical link control LLC data 46 to 1500 byte Data...

Страница 327: ...oint SNAP Subnetwork access protocol PID Protocol identifier LLC Logical lick control FCS Frame check sequence OR Data frame delivered to user Figure 7 5 Fields of an IEEE802 3 Ethernet Frame 7 5 1 1 Options That Affect the Standard MAC Frame There are a number of factors and options that can affect the standard MAC frame as described in Table 7 2 Some PHYs may deliver a longer or shorter preamble...

Страница 328: ...he first 64 bytes until after this station has acquired the net At that time the transmitter requests more data and transmits it until the signalling the end of data to be transmitted The transmitter appends the calculated CRC to the end of the frame A frame transmit operation can be subdivided into two operations 1 MII transmit interface operation and 2 BDMA MAC transmit interface operation 7 5 1...

Страница 329: ...0 random integer r 2K K min n back off limit 10 r is the number of slot times the MAC must wait in case of a collision and n is the number of retry attempts For example after the first collision n is 1 and r is a random number between 0 and 1 The pseudo random generator in this case is one bit wide and gives a random number of either 0 or 1 After the second attempt r is a random number between 0 a...

Страница 330: ...te time 8 byte preamble and SFD and 64 byte frame the main transmission state machine stops the transmission and transmits a jam pattern 32 bit 1 s It then increments the collision attempt counter returns control to the back off state machine and re transmits the frame when the back off time has elapsed and the gap time is valid If there are no collisions the transmitter block transmits the rest o...

Страница 331: ...of data must be present in the MTxFIFO The BDMA engine can start stuffing data into the MTxFIFO and then enable the transmit bit or it can enable the transmit bit first and then start stuffing data into the MTxFIFO The transmitting operation can only start if both of these conditions are met 7 5 1 4 Receiving a Frame The receiver block when enabled constantly monitors a data stream coming either f...

Страница 332: ... RX_DV signal which entered the MII from the PCS layer will be ON when the PCS layer recovers the Rx_clk from the receive bit stream and delivers the nibble data on RxD 3 0 data line The RX_DV signal must be ON before the starting frame delimiter SFD is received When the Rx_DV signal is ON the preamble and SFD parts of the frame header are delivered to MII synchronized with the 25MHz Rx_clk The ca...

Страница 333: ...eset the MRxFIFO is empty To enable the reception the system must set the receive enable bit in the MACRXCON register If the BDMA engine cannot transfer the received data to the BRxBUFF and memory due to the disabled BDMA or the inaccessibility on the system bus the MAC RxFIFO may overflow Carrier sense on Carrier sense ON after detection SFD store byte stream in in FIFO Recognize address Move the...

Страница 334: ... device register it must transmit the frame data up to a specific register address to the PHY device During the write time which is an undirected transmission the STA transmits a stream of turn around bits As a result by transmitting a write or read message to a PHY device through the MDIO the STA can issue a request to set the operation or to read the operation status As its response this message...

Страница 335: ...id and the frame must contain a valid pause opcode and a parameter pause period field If the length type field does not have the special value specified for MAC control frames the MAC takes no action and the frame is treated as a normal frame If the frame is marked as a MAC control frame and pass through is enabled it is passed to the software drivers User can set the control bit in the MAC contro...

Страница 336: ...signals the end of the pause operation and before allowing the transmit circuit to resume its operation If a second full duplex pause operation is recognized while the first operation is in effect the pause counter is reset with the current operand value Note that a count value of zero may cause pre mature termination of a pause operation that is already in progress 7 5 3 2 Remote Pause Operation ...

Страница 337: ...erflow of the MTxFIFO during transmission indicates that the system cannot keep up with the demand of the MAC and the transmission is aborted No Carrier The carrier sense signal CrS is monitored from the beginning of the start of frame delimiter SFD to the last byte transmitted A NoCarr indicates that CrS was never present during transmission a possible network problem but the transmission will NO...

Страница 338: ...orts a CRC error if it is invalid The PHY informs the MAC if it detects a medium error such as a coding violation by asserting the input pin RX_ER When the MAC sees RX_ER asserted it sets CRCErr bit of the BMRXSTAT register Frame too long The receiver block checks the length of the incoming frame at the end of reception including CRC but excluding preamble and SFD If the length is longer than the ...

Страница 339: ...td 802 3 Section 22 3 Signal Characteristics Output Valid TX_CLK TXD 3 0 TX_EN 4 9ns MIN 28ns MIN Figure 7 13 Timing Relationship of Transmission Signals at MII RX_CLK RXD 3 0 RX_DV Th 5ns Ts 3ns Input Valid Figure 7 14 Timing Relationship of Reception Signals at MII MDC MDIO Input Valid Ts 15ns Figure 7 15 MDIO Sourced by PHY MDC MDIO Output Valid Th 13ns Figure 7 16 MDIO Sourced by STA ...

Страница 340: ...r feedback and OFB output feedback But in the S3C2501X two modes are supported ECB and CBC The X9 52 standard Triple Data Encryption Algorithm Modes of Operation describes seven different modes for using TDEA Those are TECB TDEA electronic codebook mode of operation TCBC TDEA cipher block chaining mode of operation TCBC I TDEA cipher block chaining mode of operation interleaved TCFB TDEA cipher fe...

Страница 341: ...PW DATA key write sig IV indata register PWDATA PADDR PENABLE PSELx PWRITE PWDATA PRDATA Register dreg64 pbox sbox exp Status des_mode wr_indata in_mode sig outdata register left side data left side data left side data in_mode sig FSM state machine key2 key1 keygen FSM state machine key48 left side data right side data S Y S T E M B U S PR DATA DES 3DES Figure 8 1 DES 3DES Block Diagram ...

Страница 342: ...DESKEY1R 0xF0090014 R W Key 1 right half 0x00000000 DESKEY2L 0xF0090018 R W Key 2 left half Key 2 is the security key for the 2nd DES of 3DES 0x00000000 DESKEY2R 0xF009001C R W Key 2 right half 0x00000000 DESKEY3L 0xF0090020 R W Key 3 left half Key 3 is the security key for the 3rd DES of 3DES in the encryption mode or 1st DES of 3DES in the decryption mode 0x00000000 DESKEY3R 0xF0090024 R W Key 3...

Страница 343: ... data 0 CPU write read from left half to right half data in DESINFIFO out DESOUTFIFO 1 CPU write read from right half to left half data in DESINFIFO out DESOUTFIFO 4 Encryption or Decryption 0 DES 3DES data will be encrypted 1 DES 3DES data will be decrypted 5 DES or 3DES 0 DES algorithm is selected 1 Triple DES algorithm is selected 6 Encryption Mode ECB or CBC 0 DES 3DES will be running ECB Elec...

Страница 344: ...IFO is vacant 4 or 2 depends on DESCON 7 words or more this bit is set to 1 5 Empty DESINFIFO DESINFIFO is vacant all 6 Full DESINFIFO DESINFIFO has 8 words valid data CPU can t write in any more 7 Reserved This bit has 0 value 8 Valid DESOUTFIFO DESOUTFIFO has 4 or 2 depends on DESCON 7 valid words or more this bit is set to 1 9 Empty DESOUTFIFO DESOUTFIFO is vacant all 10 Full DESOUTFIFO DESOUTF...

Страница 345: ...status register 8 Valid DESOUTFIFO bit goes to high 8 3 4 DES 3DES RUN ENABLE REGISTER Table 8 5 DES 3DES Run Enable Register Description Bit Number Bit Name Description 0 Run Enable If you set this bit to 1 DES 3DES engine begin to run This bit is the same register as the Run Enable bit of the DES 3DES Control Register You can read this bit by addressing 0x00 too 8 3 5 DES 3DES KEY1 LEFT RIGHT SI...

Страница 346: ...hould be stored to this register The 8 th bit of each byte is parity bit and it isn t used for encryption decryption Table 8 11 DES 3DES Key 3 Right Side Register Description Bit Number Bit Name Description 33 64 Key 3 Right Half The right half of the Key3 should be stored to this register The 8 th bit of each byte is parity bit and it isn t used for encryption decryption 8 3 8 DES 3DES IV LEFT RI...

Страница 347: ... written data is the right half of data to be encrypted decrypted bit 33 64 The second one is the left half of data to be encrypted decrypted bit 1 32 Table 8 15 DES 3DES Output Data FIFO Description Bit Number Bit Name Description 31 0 DESOUTFIFO This FIFO can be read by CPU or DMA depends on control register value This FIFO consists of 8 words If data are transferred by DMA the 4 word burst tran...

Страница 348: ...a receiving which is controlled by DESCON 7 When the DESCON 7 is set to 0 the Valid DESOUTFIFO status means that DESOUTFIFO has at least 4 word valid data If is recommended when DMA mode is selected When the DESCON 7 is set to 1 the Valid DESOUTFIFO status means that DESOUTFIFO has at least 2 word valid data When the Available DESINFIFO or Valid DESOUTFIFO request signal interrupt or DMA signal is...

Страница 349: ... DES engine consumes fixed cycle per block 25 cycles for DES and 65 cycles for 3DES If the DES operating frequency is 133MHz and the DES has one block to be encrypted the DES performance is 341 Mbps for DES or 131 Mbps for 3DES For more real system condition the user have to consider how many cycles is needed for external memory access The memory access cycle should be included the performance cal...

Страница 350: ... software polling and or when it receives an appropriate internally generated GDMA interrupt The S3C2501X GDMA controller can increment or decrement source destination addresses and conduct 8 bit byte 16 bit half word or 32 bit word data transfer The GDMA does not check the cache coherency So software must ensure that source and destination addresses must be configured as non cacheable in the memo...

Страница 351: ... xGDMA_Req3 HUART xGDMA_Req0 HUART xGDMA_Req1 HUART Mode Selection Mode Selection GDMA Channel 1 GDMA_Req GDMA_Ack GDMA Channel 2 GDMA_Req GDMA_Ack GDMA Channel 3 GDMA_Req GDMA_Ack GDMA Channel 4 GDMA_Req GDMA_Ack GDMA Channel 5 GDMA_Req GDMA_Ack GDMA Channel 0 GDMA_Req GDMA_Ack xGDMA_Ack1 xGDMA_Ack2 xGDMA_Ack3 IOPCON1 IOPCON1 IOPCON1 DES DES DES DES DES DES Figure 9 1 GDMA Controller Block Diagra...

Страница 352: ...nnel 2 control register GDMA channel 2 source address register GDMA channel 2 destination address register GDMA channel 2 transfer count register GDMA channel 2 run enable register GDMA channel 2 interrupt pending register 0 00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 DCON3 DSAR3 DDAR3 DTCR3 DRER3 DIPR3 0xF0050060 0xF0050064 0xF0050068 0xF005006C 0xF0050070 0xF0050074 R W R W R...

Страница 353: ...n DPRIC 0x1 and the DPRIF has the reset value For example DPRIC 0x1 and the DPRIF is 0x00431520 the fixed priority order from the highest to the lowest is GDMA channel 0 channel 2 channel 5 channel 1 channel 3 and channel 4 If the GDMA priority configuration register 0xF0051000 DPRIC 0x0 the programmable round robin priority is run by DPRIR register All GDMA channels own their respective field pos...

Страница 354: ...el 3 3 DPRIR 15 12 channel 4 4 DPRIR 19 16 channel 5 5 DPRIR 23 20 DPRIF 16 15 12 11 8 7 4 3 0 19 20 23 24 31 dprif0 dprif1 dprif2 dprif3 dprif4 dprif5 Reserved DPRIR 16 15 12 11 8 7 4 3 0 19 20 23 24 31 dprir0 dprir1 dprir2 dprir3 dprir4 dprir5 Reserved 0 Priority configuration 0 Round robin 1 Fixed priority DPRIC 0 31 x 1 Figure 9 2 GDMA Programmable Priority Registers ...

Страница 355: ...MA 2 1 3 GDMA 2 1 6 4 0 Not used 0 GDMA 0 1 6 5 0 Not used 0 GDMA 0 1 6 6 0 Not used 0 GDMA 0 1 6 When DPRIR is 0x0 and only GDMA channel 0 1 and 2 are used the expected bus occupancy for each channel is 1 3 However S3C2501X does not work in that way instead GDMA channel 0 gets 4 6 of the bus occupancy GDMA 1 1 6 and GDMA 2 1 6 In short GDMA 0 is run four times more than GDMA 1 and 2 This is becau...

Страница 356: ...blem Solving by Method 1 Writing 0x000330 instead of 0x0 will give each channel of three GDMA with the same amount of bus occupancy 2 Method 2 DPRIR Channel Expected Bus Occupancy Real System Bus Occupancy DPRIR Channel Occupancy 0 GDMA 0 1 3 4 6 0 GDMA 0 1 3 0 GDMA 1 1 3 1 6 0 0 0 GDMA 2 1 3 1 6 0 GDMA 2 1 3 0 0 0 0 0 0 0 0 0 GDMA 4 1 3 0 0 0 0 0 Problem Problem Solving by Method 2 With leaving D...

Страница 357: ...od 2 0 3 or 1 4 or 2 5 3 Method 2 0 2 4 or 1 3 5 4 Method 1 N A 5 Method 1 N A 6 Method 2 1 2 3 4 5 and 6 This method works when 1 2 4 or 6 GDMA channels are needed but there is no solution when 4 or 5 GDMA channels are needed So we recommend that when you need 1 2 3 or 6 GDMA channels use Method 2 and when you need 4 or 5 GDMA channels use Method 1 ...

Страница 358: ...0 4 HUART RX mode HUART to memory 011 5 DES IN mode DES from memory 100 6 DES OUT mode DES to memory 101 4 Single Block mode This bit determines the number of external GDMA requests xGDMA_Req 0 3 that are required for a GDMA operation In Single mode when 4 0 the S3C2501X requires an external GDMA request for every GDMA operation In Block mode when 4 1 the S3C2501X requires only one external GDMA r...

Страница 359: ...ation When DCON MODE 3 1 is HUART TX mode HUART from memory 010 or DES IN mode DES from memory 100 these bits don t care 12 Interrupt enable If the interrupt enable bit is 1 a GDMA interrupt is generated when GDMA operation completes successfully If this bit is 0 the GDMA interrupt is not generated If you stop the GDMA operation by resetting the run enable bit the GDMA interrupt is not generated r...

Страница 360: ...e 9 8 Source address direction SD 00 Increase source address 01 Decrease source address 10 Do not change source address fixed 11 Reserved 11 10 Destination address direction DD 00 Increase destination address 01 Decrease destination address 10 Do not change destination address fixed 11 Reserved 12 Interrupt enable IE 0 Do not generate a interrupt when GDMA completes 1 Generate a interrupt when GDM...

Страница 361: ...DDAR0 1 2 3 4 5 Registers Registers Address R W Description Reset Value DSAR0 0xF0050004 R W GDMA channel 0 source address register 0x00000000 DSAR1 0xF0050024 R W GDMA channel 1 source address register 0x00000000 DSAR2 0xF0050044 R W GDMA channel 2 source address register 0x00000000 DSAR3 0xF0050064 R W GDMA channel 3 source address register 0x00000000 DSAR4 0xF0050084 R W GDMA channel 4 source a...

Страница 362: ...ansfer count register is not a multiple of 4 times transfer size the last misaligned data can be transferred by one transfer size Table 9 6 DTCR0 1 2 3 4 5 Registers Registers Address R W Description Reset Value DTCR0 0xF005000C R W GDMA channel 0 transfer count register 0x00000000 DTCR1 0xF005002C R W GDMA channel 1 transfer count register 0x00000000 DTCR2 0xF005004C R W GDMA channel 2 transfer c...

Страница 363: ...scription Reset Value DRER0 0xF0050010 W GDMA channel 0 run enable register 0xXXXXXXX0 DRER1 0xF0050030 W GDMA channel 1 run enable register 0xXXXXXXX0 DRER2 0xF0050050 W GDMA channel 2 run enable register 0xXXXXXXX0 DRER3 0xF0050070 W GDMA channel 3 run enable register 0xXXXXXXX0 DRER4 0xF0050090 W GDMA channel 4 run enable register 0xXXXXXXX0 DRER5 0xF00500B0 W GDMA channel 5 run enable register...

Страница 364: ... beginning of the GDMA interrupt service routine Table 9 8 DIPR0 1 2 3 Registers Registers Address R W Description Reset Value DIPR0 0xF0050014 R WC GDMA channel 0 interrupt pending register 0xXXXXXXX0 DIPR1 0xF0050034 R WC GDMA channel 1 interrupt pending register 0xXXXXXXX0 DIPR2 0xF0050054 R WC GDMA channel 2 interrupt pending register 0xXXXXXXX0 DIPR3 0xF0050074 R WC GDMA channel 3 interrupt p...

Страница 365: ...1 can be serviced by GDMA channel 1 and 5 The third external GDMA request xGDMA_Req2 can be serviced by GDMA channel 2 The fourth external GDMA request xGDMA_Req3 can be serviced by GDMA channel 3 If the slow external devices need the GDMA service the slow external devices can sample the external GDMA ACK signal by setting DCON 16 13 bits DCON 16 13 bits provide the range of 1 and 16 cycles of the...

Страница 366: ...D 11 10 of DCON register either the DDAR register In DES OUT mode you don t need to care the source address direction SD 9 8 of DCON register either the DSAR register 9 5 GDMA FUNCTION DESCRIPTION The following sections provide a functional description of the GDMA controller operations 9 5 1 GDMA TRANSFERS The GDMA transfers data directly between a requester and a target The requester and target c...

Страница 367: ... asserted after checking that xGDMA_Ack has been asserted xGDMA_Req xGDMA_Ack RD WR Cycle Figure 9 8 External GDMA Requests Single Mode 9 5 3 2 Block Mode The assertion of only one GDMA request xGDMA_Req or an internal request causes all of the data as specified by the control register settings to be transmitted in a single operation The GDMA transfer is completed when the transfer counter value r...

Страница 368: ...ch memory banks are selected The S3C2501X has the internal clock HCLK as the operating clock The clock frequency of HCLK is 133MHz Internal Clk HCLK xGDMA_Req xGDMA_Ack tXDAr Min 2 cycle tXDRs tXDRh tXDAf Programmable by DCON 16 13 tXDRs setup time tXDRh hold time tXDAr delay rising tXDAf delay falling 6 5 nsec worst best 0 nsec 7 982 nsec 3 103 nsec 8 002 nsec 2 703 nsec Figure 9 10 External GDMA...

Страница 369: ... to destination address Current xGDMA_Req signal is idle state deasserted when xGDMA_Ack siganl is idle state high Otherwise GDMA recognizes current xGDMA_Req signal as next one and transfers next data I recommand that xGDMA_Req signal is deasserted when xGDMA_Ack signal is active 2 is minimum two cycles 3 can be programmed by setting DCON 16 13 can be between 1 and 16 cycles HCLK xGDMA_Req Recomm...

Страница 370: ...be transferred by one transfer size HCLK xGDMA_Req Recommand deasserted time xGDMA_Ack Address Data DTCR N N 4 NOTE Address order is source address0 source address1 source address 2 source address3 destination address0 destination address1 destination address2 destination address3 and Data order is source data0 source data1 source data2 source data3 destination data0 destination data1 destination ...

Страница 371: ... xGDMA_Req Recommand deasserted time xGDMA_Ack Address Data NOTE is in the block mode GDMA starts to operate with first xGDMA_Req signal So in the ideal case GDMA does not care the number of xGDMA_Req signal pulse But I recommand that xGDMA_Req siganl is deasserted when xGDMA_Ack signal is active state SA0 DA0 SD0 DD0 SA1 DA1 SD1 DD1 Programmable by DCON 16 13 Programmable by DCON 16 13 a a Figure...

Страница 372: ...ammable by DCON 16 13 a SA2 SA3 SA1 SA0 DA0 DA1 DA2 DA3 SD2 SD3 SD1 SD0 DD0 DD1 DD2 DD3 a Figure 9 14 Block and Four Data Burst Timing one data burst source address0 and source data0 destination address0 and destination data0 four data burst source address0 and source data0 source address1 and source data1 source address2 and source data2 source address3 and source data3 destination address0 and d...

Страница 373: ...GDMA CONTROLLER S3C2501X 9 24 NOTES ...

Страница 374: ...unit has a baud rate generator transmitter receiver and a control unit as shown in Figure 10 1 The baud rate generator can be driven by the internal system clock PCLK2 or by the external clock EXT_UCLK The transmitter and receiver blocks have independent data registers and shifters Transmit data is written first to the transmit data register From there it is copied to the transmit shifter and then...

Страница 375: ...gister CUSTAT UART Interrupt Enable CUINT UART Control Register CUCON Transmit Shift Register Transmit Data Register CUTXBUF Receive Shift Register Receive Data Register CURXBUF IR Rx Decoder CURXD 0 1 IR Tx Decoder 0 1 Baud Rate Divisor Baud Rate Generator CUTXD Figure 10 1 Console UART Block Diagram ...

Страница 376: ... W Console UART status register W 0x00060800 CUINT 0xF0060008 R W Console UART interrupt enable register W 0x00000000 CUTXBUF 0xF006000C W Console UART transmit data register B CURXBUF 0xF0060010 R Console UART receive data register B CUBRD 0xF0060014 R W Console UART baud rate divisor register H 0x0000 CUCHAR1 0xF0060018 R W Console UART control character register 1 W 0x00000000 CUCHAR2 0xF006001...

Страница 377: ...R Set this bit to one to cause the Console UART to send a break If this bit value is zero a break does not send A break is defined as a continuous Low level signal on the transmit data output with the duration of more than one frame transmission time 5 Serial Clock Select SCSEL This select bit specifies the clock source 0 Internal PCLK2 1 External EXT_UCLK 6 Reserved Reserved 7 Loop back mode LOOP...

Страница 378: ... mode In IR receive mode the receiver must detect the 3 16 pulsed period to recognize a zero value in the receiver data register CURXBUF as the IR receive data When this bit is 0 normal Console UART mode is selected When it is 1 infra red TX RX mode is selected NOTE Changing this bit while tranmitting cause one Tx data losing Because level of infra red frame start bit and idle state of normal fram...

Страница 379: ... Send Break SBR 0 Send normal TxData 1 Send break signal 5 Serial Clock Select SCSEL 0 Internal PCLK2 1 External EXT_UCLK 6 Reserved This bit should be cleared 7 Loopback Mode LOOPB 0 Normal operating mode 1 Enable Loopback mode only for test 10 8 Parity Mode PMD 0xx No parity 100 Odd parity 101 Even parity 110 Parity forced checked as 1 111 Parity forced checked as 0 11 Stop Bits STB 0 1 stop bit...

Страница 380: ... 15 14 10 24 21 18 17 16 13 12 11 8 7 6 E C H O S C S E L 28 15 Reserved This bit should be cleared 29 Software Flow Control Enable SFEN 0 Disable Software Flow Control 1 Enable Software Flow Control 30 Echo Test Enable ECHO 0 Disable Echo Test 1 Enable Echo Test 31 Reserved This bit should be cleared Figure 10 3 Console UART Control Register ...

Страница 381: ...etected BKD This bit is automatically set to one to indicate that a break signal has been received in CURXBUF If the BSD interrupt enable bit CUINT 1 is 1 a interrupt is generated when a break occurs You can clear this bit by writing 1 to this bit 2 Frame Error FER This bit is automatically set to 1 whenever a frame error occurs during a serial data receive operation A frame error occurs when a ze...

Страница 382: ... is detected You can clear this bit by writing 1 to this bit NOTE Software Flow Control mode does not affects Tx Rx operation this bit This bit informs only whether UART receives control character or not Namely if user want to stop Tx Rx operation User must program that routine 10 6 Reserved Reserved 11 Receiver in idle RXIDLE This bit is only for CPU to monitor the receiver state of console UART ...

Страница 383: ...or Receive FIFO top or CURXBUF 1 Overrun Error occured 5 Control Character Detect CCD 0 No Control Character Receive FIFO top or CURXBUF 1 Control character present Receive FIFO top or CURXBUF 10 6 Reserved 11 Receiver in IDLE IDLE 0 Receiver is in active state 1 Receiver is in IDLE state 16 12 Reserved 17 Transmitter Idle TI 0 Transmit is in progress 1 Transmitter is in idle no data for Tx 18 Tra...

Страница 384: ...ART Interrupt Enable Register Description Bit Number Bit Name Description 0 RDVIE Receive Data Valid interrupt enable 1 BKDIE Break Signal Detected interrupt enable 2 FERIE Frame Error interrupt enable 3 PERIE Parity Error interrupt enable 4 OERIE Overrun Error interrupt enable 5 CCDIE Control Character Detect interrupt enable 16 6 Reserved 17 TIIE Transmitter Idle interrupt enable 18 THEIE Transm...

Страница 385: ... Interrupt Enable PERIE 4 Overrun Error Interrupt Enable OERIE 5 Control Character Detect Interrupt Enable CCDIE 16 6 Reserved 17 Transmitter Idle TIIE 18 Transmit Holding Register Empty Interrupt Enable THEIE 31 19 Reserved C C D I E O E R I E T H E I E T I I E F E R I E R D V I E B K D I E P E R I E 31 0 3 4 5 1 2 19 18 17 16 6 Figure 10 5 Console UART Interrupt Enable Register ...

Страница 386: ... data This field contains the data to be transmitted over the single channel Console UART When this register is written the transmit data register empty bit in the status register CUSTAT 18 should be 1 This is to prevent overwriting of transmit data that may already be present in the CUTXBUF Whenever the CUTXBUF is written with a new value the transmit register empty bit CUSTAT 18 is automatically...

Страница 387: ... Receive data This field contains the data received over the single channel Console UART When the Console UART finishes receiving a data frame the receive data ready bit in the Console UART status register CUSTAT 0 should be 1 This prevents reading invalid receive data that may already be present in the CURXBUF Whenever the CURXBUF is read the receive data valid bit CUSTAT 0 is automatically clear...

Страница 388: ...GOUT PCLK2 or EXT_UCLK CNT0 1 16CNT1 16 Table 10 12 CUBRD Registers Register Address R W Description Size Reset Value CUBRD 0xF0060014 R W Console UART baud rate divisor register H 0x0000 3 0 Baud rate divisor value CNT1 xxx0 Divide by 1 xxx1 Divide by 16 15 4 Time constant value for CNT0 31 15 16 0 18 17 19 21 20 22 23 24 25 26 27 28 29 30 CNT0 4 3 CNT1 Figure 10 8 Console UART Baud Rate Divisor ...

Страница 389: ...RD 3 0 Select Clock CUCON 5 Figure 10 9 Console UART Baud Rate Generator BRG Table 10 13 Typical Baud Rates Examples of Console UART Baud Rates PCLK2 66 5 MHz EXT_UCLK 29 4912 MHz BRGOUT CNT0 DEC HEX CNT1 Freq Dev CNT0 DEC HEX CNT1 Freq Dev 1200 3463 D87 0 1199 84 0 01 1535 5FF 0 1200 00 0 00 2400 1731 6C3 0 2399 68 0 01 767 2FF 0 2400 00 0 00 4800 865 361 0 4799 36 0 01 383 17F 0 4800 00 0 00 960...

Страница 390: ...egister Address R W Description Size Reset Value CUCHAR1 0xF0060018 R W Console UART control character register 1 W 0x00000000 CUCHAR2 0xF006001C R W Console UART control character register 2 W 0x00000000 31 15 16 7 0 Control Character 0 15 8 Control Character 1 23 16 Control Character 2 31 24 Control Character 3 CHAR0 0 24 23 7 8 CHAR1 CHAR3 CHAR2 Figure 10 10 Console UART Control Character 1 Reg...

Страница 391: ...E TRANSMIT CURXBUF INT_RXD CURXD INT_TXD THE CUTXD Parity Start Data Bits 5 8 Stop 1 2 Start Parity Data Bits 5 8 Stop 1 2 Start Start Data Bits Receive Data Receive Data Figure 10 12 Interrupt Based Serial I O Transmit and Receive Timing Diagram ...

Страница 392: ... Start Bit Stop Bit Data Bits SIO Frame Figure 10 13 Serial I O Frame Timing Diagram Normal Console UART 0 1 0 1 0 0 1 1 0 1 Start Bit Stop Bit Data Bits IR Transmit Frame Bit frame T 3 16T 7 16T 6 16T Figure 10 14 Infra Red Transmit Mode Frame Timing Diagram ...

Страница 393: ...SERIAL I O CONSOLE UART S3C2501X 10 20 0 1 0 1 0 0 1 1 0 1 Start Bit Stop Bit Data Bits IR Receive Frame Bit frame T 3 16T 13 16T Figure 10 15 Infra Red Receive Mode Frame Timing Diagram ...

Страница 394: ...e baud rate generator can be driven by the internal system clock divided by 2 PCLK2 or by the external clock EXT_UCLK Auto Baud Rate Generator tries to get the baud rate from input data in this mode The transmitter and receiver blocks have independent data buffer registers and data shifters And 32 byte transmit FIFO and 32 byte receive FIFO is also provided which include transmit and receive buffe...

Страница 395: ...egister RxBuffer Register Receiver FIFO 32 Bytes IR Tx Encoder IR Rx Decoder 1 0 HUART TX pin HUART RX pin EXT_UCLK Baud Rate Divisor Transmit Data Receive Data Transmit Control Receive Control Receive Status Transmit Status Control Character Register PCLK2 HUCON UCLK HUCON IR S Y S T E M B U S 0 1 0 1 UART_CLK Receiver Shift Register Figure 11 1 High Speed UART Block Diagram ...

Страница 396: ...errupt enable register W 0x00000000 HUTXBUF 0xF008000C W High Speed UART transmit data register B HURXBUF 0xF0080010 R High Speed UART receive data register B HUBRD 0xF0080014 R W High Speed UART baud rate divisor register H 0x00000000 HUCHAR1 0xF0080018 R W High Speed UART control character register 1 W 0x00000000 HUCHAR2 0xF008001C R W High Speed UART control character register 2 W 0x00000000 HU...

Страница 397: ...Send Break SBR Set this bit to one to cause the High Speed UART to send a break If this bit value is zero a break does not send A break is defined as a continuous Low level signal on the transmit data output with the duration of more than one frame transmission time 5 Serial Clock Selection UCLK This selection bit specifies the clock source 0 Internal PCLK2 1 External EXT_UCLK 6 Auto Baud Rate Det...

Страница 398: ...uld be cleared by zero 16 Transmit FIFO enable TFEN S3C2501X High Speed UART block support 32 byte FIFO If this bit set to one transmit data moved to Tx FIFO and then sent 17 Receive FIFO enable RFEN S3C2501X High Speed UART block support 32 byte FIFO If this bit set to one receive data moved to Rx FIFO NOTE Changing these bits TFEN RFEN while transmitting receiving sending receiving unexpected da...

Страница 399: ...re flow control or not If this bit set to one High Speed UART will control all pins concerning to hardware flow control 29 Software Flow Control Enable SFEN This bit determines whether High Speed UART select software flow control or not If this bit set to one High Speed UART will act in software flow control In this mode you have to use Control Character register 30 Echo Mode ECHO If this bit is s...

Страница 400: ... 0 Normal operating mode 1 Enable Loopback mode only for test 10 8 Parity mode PMD 0xx No parity 100 Odd parity 101 Even parity 110 Parity forced checked as 1 111 Parity forced checked as 0 11 Stop Bits STB 0 1 stop bit 1 2 stop bits 13 12 Word Length WL 00 5 bit 01 6 bit 10 7 bit 11 8 bit 14 Infra red mode IR 0 normal operating mode 1 Infra red Tx Rx mode 15 Reserved This bit should be cleared 31...

Страница 401: ...depth 24 Data Terminal Ready to pin DTR 0 HUnDTR goes high level 1 HUnDTR goes low level 25 Request To Send to pin RTS 0 HUnRTS goes high level 1 HUnRTS goes low level 27 26 Reserved This bit should be cleared 28 Hardware Flow Control Enable HFEN 0 Disable Hardware Flow Control 1 Enable Hardware Flow Control 29 Software Flow Control Enable SFEN 0 Disable Software Flow Control 1 Enable Software Flo...

Страница 402: ... can clear this bit by reading Receive FIFO or HURXBUF NOTE Whether Receive FIFO top or HURXBUF depends on the HUCON 17 1 Break Signal Detected BKD This bit automatically set to one to indicate that a break signal has been received in Receive FIFO top or HURXBUF If the BSD interrupt enable bit HUINT 1 is 1 a interrupt is generated when a break occurs You can clear this bit by writing 1 to this bit...

Страница 403: ...received data whether the data is good frame or not If the DCD interrupt enable bit HUINT 6 is 1 a interrupt is generated when a data carrier is detected This bit can be used for error check bit in hardware flow control mode 7 Receive FIFO Data trigger level reach RFREA In Receive FIFO mode this bit indicates Receive FIFO has valid data and reaches Rx trigger level So High Speed UART request DMA t...

Страница 404: ...peed UART When HUnCTS level is low this bit is set And HUnCTS high this bit is cleared 16 CTS Event occurred E_CTS This bit is set to 1 whenever HUnCTS level changed If the E_CTS interrupt enable bit HUINT 16 is 1 a interrupt is generated when a CTS event is occurred You can clear this bit by writing 1 to this bit 17 Transmitter Idle TI HUSTAT 17 is automatically set to 1 when the transmit holding...

Страница 405: ...n is Low at the receiver checking time 1 DCD pin is High at the receiver checking time 7 Receive FIFO Data Trigger Level Reach RFREA 0 No valid data in HURXBUF or Not reached to trigger level 1 In RxFIFO mode RxFIFO has valid data and reach trigger level In non FIFO mode HURXBUF has valid data 8 Receive FIFO Empty RFEMT 0 Receive FIFO is not empty 1 Receive FIFO is empty 9 Receive FIFO Full RFFUL ...

Страница 406: ...ransmitter Idle TI 0 Transmit is in progress 1 Transmitter is in idle no data for Tx 18 Transmit Holding Register Empty THE 0 TxFIFO at trigger level or tranmit holding register is not empty 1 In TxFIFO mode TxFIFO at trigger level is empty In non FIFO mode transmit holding register is empty 19 Transmit FIFO Empty TFEMT 0 Transmit FIFO is not empty 1 Transmit FIFO is empty 20 Transmit FIFO full TF...

Страница 407: ...le 2 FERIE Frame Error interrupt enable 3 PERIE Parity Error interrupt enable 4 OERIE Overrun Error interrupt enable 5 CCDIE Control Character Detect interrupt enable 6 DCDLIE DCD High at receiver checking time interrupt enable 7 RFREAIE Receive FIFO Data trigger level reach interrupt enable 9 8 Reserved 10 OVFFIE Receive FIFO overrun interrupt enable 11 Reserved 12 E_RxTOIE Receive Event time out...

Страница 408: ...e OVFFIE 11 Reserved 12 Receive Event Time out Interrupt Enable E_RxTOIE 13 AutoBaud Rate Detection done interrupt enable AUBDDNIE 15 14 Reserved 16 CTS event occured Interrupt Enable E_CTSIE 17 Transmitter Idle TIIE 18 Transmit Holding Register Empty Interrupt Enable THEIE This bit used in FIFO mode for interrupt enable when transmit FIFO empty as much transmit data trigger level 31 19 Reserved 3...

Страница 409: ...ransmit Register Registers Offset Address R W Description Reset Value HUTXBUF 0xF008000C W High Speed UART transmit buffer register Table 11 9 High Speed UART Transmit Register Description Bit Number Bit Name Description 7 0 Transmit data This field contains the data to be transmitted over the single channel High Speed UART When this register is written the transmit buffer register empty bit in th...

Страница 410: ...ster Registers Offset Address R W Description Reset Value HURXBUF 0xF0080010 R High Speed UART receive buffer register Table 11 11 High Speed UART Receive Register Description Bit Number Bit Name Description 7 0 Receive data This field contains the data received over the single channel High Speed UART When the High Speed UART finishes receiving a data frame the receive data ready bit in the High S...

Страница 411: ...PCLK2 or EXT_UCLK CNT0 1 16CNT1 16 Table 11 12 High Speed UART Transmit Register Registers Offset Address R W Description Reset Value HUBRD 0xF0080014 R W High Speed UART baud rate divisor register 0x00 31 19 15 16 3 0 Baud reate divisor value CNT1 xxx0 divide by 1 xxx1 divide by 16 15 4 Time constant value for CNT0 CNT0 0 18 17 20 30 29 28 27 26 25 24 23 22 21 3 4 CNT1 Figure 11 7 High Speed UART...

Страница 412: ... 11 8 High Speed UART Baud Rate Generator BRG Table 11 13 Typical Baud Rates Examples of High Speed UART Baud Rates PCLK2 66 5 MHz EXT_UCLK 29 4912 MHz BRGOUT CNT0 DEC HEX CNT1 Freq Dev CNT0 DEC HEX CNT1 Freq Dev 1200 3463 D87 0 1199 84 0 01 1535 5FF 0 1200 00 0 00 2400 1731 6C3 0 2399 68 0 01 767 2FF 0 2400 00 0 00 4800 865 361 0 4799 36 0 01 383 17F 0 4800 00 0 00 9600 432 160 0 9598 73 0 01 191...

Страница 413: ...r For example even if you want to use one control character all control characters will have same value with it Table 11 14 High Speed UART Control Charater 1 Register Registers Offset Address R W Description Reset Value HUCHAR1 0xF0070018 R W High Speed UART control character1 register 0x00 31 15 16 7 0 Control Character 0 15 8 Control Character 1 23 16 Control Character 2 31 24 Control Character...

Страница 414: ... For example even if you want to use one control character all control characters will have same value with it Table 11 15 High Speed UART Control Character 2 Register Registers Offset Address R W Description Reset Value HUCHAR2 0xF008001C R W High Speed UART control character2 register 0x00 31 15 16 7 0 Control Character 4 15 8 Control Character 5 23 16 Control Character 6 31 24 Control Character...

Страница 415: ...est boundary value is ABT3 Refer figure 11 13 for detail range ABT3 ABB3 ABB1 ABT0 ABB0 ABT3 ABT0 Figure 11 11 AutoBaud Boundary Register Range Table 11 16 High Speed UART AutoBaud Boundary Register Registers Offset Address R W Description Reset Value HUABB 0xF0080020 R W High Speed UART autobaud boundary register 0x170B0502 31 15 16 7 0 AutoBaud Boundary 0 15 8 AutoBaud Boundary 1 23 16 AutoBaud ...

Страница 416: ...ghest table value also ABT3 is highest boundary value of total range If out of range value is detected it will be written normally without modification If 0x1F was detected Rewrite 0x1F If 0x0B was detected If 0x04 was detected Rewrite 0x07 Rewrite 0x03 ABT3 0x1F ABB3 0x17 ABT2 0x0F ABB2 0x0B ABT1 0x07 ABB1 0x05 ABT0 0x03 ABB0 0x02 Figure 11 13 Example of AutoBaud Table Register Setting Table 11 1...

Страница 417: ...ata on trigger level of TX FIFO High Speed UART generates interrupt INT_TXD or sends a request signal to GDMA During this operation trigger level should be 30 32 empty depth FIFO depth 24 32 16 32 or 8 32 CPU or GDMA fills data into TX FIFO by byte Rx FIFO Operation If received data are filled up to RX FIFO trigger level High Speed UART generate interrupt INT_RXD or send request signal to GDMA The...

Страница 418: ...PEED UART 11 25 Start Bit Data Size TXD RTS CTS Figure 11 15 When CTS Signal Level is High During Transmit Operation Start Bit Data Region TXD RTS CTS Stop Bit Figure 11 16 When CTS Signal Level is Low During Transmit Operation ...

Страница 419: ...ed UART compares received data with control characters and if they are identical it sets 1 at state bit CCD HUSTAT 5 and generates interrupt which masked by Interrupt enable register 11 4 4 AUTO BAUD RATE DETECTION To use Auto Baud Rate Detection Set ABB AutoBaud rate Boundary ABT AutoBaud rate Table Register and Auto Baud Detect bit AUBD HUCON 6 When RXD level is low High Speed UART counts low le...

Страница 420: ...E TRANSMIT HURXBUF INT_RXD RX DATA INT_TXD THE TX DATA Parity Start Data Bits 5 8 Stop 1 2 Start Parity Data Bits 5 8 Stop 1 2 Start Start Data Bits Receive Data Receive Data Figure 11 19 Interrupt Based Serial I O Transmit and Receive Timing Diagram ...

Страница 421: ...rity Start Data Bits 5 8 Stop 1 2 Figure 11 20 DMA Based Serial I O Timing Diagram Tx Only RECEIVER HU_RXBUF uart_rx_req RX DATA Previous Receive Data Parity Data Bits 5 8 Stop 1 2 Start Start Data Bits Valid Receive Data RMODE Select DMA Mode uart_rx_ack Figure 11 21 DMA Based Serial I O Timing Diagram Rx Only ...

Страница 422: ... Start Bit Stop Bit Data Bits SIO Frame Figure 11 22 Serial I O Frame Timing Diagram Normal High Speed UART 0 1 0 1 0 0 1 1 0 1 Start Bit Stop Bit Data Bits IR Transmit Frame Bit frame T 3 16T 7 16T 6 16T Figure 11 23 Infra Red Transmit Mode Frame Timing Diagram ...

Страница 423: ...SERIAL I O HIGH SPEED UART S3C2501X 11 30 0 1 0 1 0 0 1 1 0 1 Start Bit Stop Bit Data Bits IR Transmit Frame Bit frame T 3 16T 13 16T Figure 11 24 Infra Red Receive Mode Frame Timing Diagram ...

Страница 424: ...ut Mode Output Mode If you select IOPCON1 14 for xGDMA Req 0 then the port is used for GDMA Req port mode I O port signal decision register IOPGDMA is used when IOPCON1 is selected for GDMA Req Ack IOPGDMA controls external GDMA Req Ack signals IOPEXTINTPND register is used for external interrupt status IOPEXTINTPND is set when external interrupt is generated and is cleared when IOPEXTINTPND regis...

Страница 425: ...errupt 0x00000000 IOPEXTINT PND 0xF0030018 R W I O port external interrupt clear register 0x00000000 IOPDATA1 0xF003001C R W I O port data register for port 0 to 31 Undefined IOPDATA2 0xF0030020 R W I O port data register for port 32 to 63 Undefined IOPDRV1 0xF0030024 R W I O port drive control register for port 0 to 31 0x00000000 IOPDRV2 0xF0030028 R W I O port drive control register for port 32 ...

Страница 426: ...PIO 21 GPIO 20 GPIO 19 GPIO 18 GPIO 17 GPIO 16 GPIO 15 GPIO 14 GPIO 13 GPIO 12 GPIO 11 GPIO 10 GPIO 9 GPIO 8 GPIO 7 GPIO 6 GPIO 5 GPIO 4 GPIO 3 GPIO 2 GPIO 1 GPIO 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 GPIO 63 GPIO 62 GPIO 61 GPIO 60 GPIO 59 GPIO 58 GPIO 57 GPIO 56 GPIO 55 GPIO 54 GPIO 53 GPIO 52 GPIO 51 GPIO 50 GPIO 49 GPIO 48 GPIO 47 GPIO 46 GPIO 45 GPIO 44 GPIO 43 GPI...

Страница 427: ...4 is used for GDMA Req port If you set the IOPGDMA 14 to 1 then port14 is used for GPIO NOTE If the port is used for a function s port such as an external interrupt request or an external GDMA Req Ack signal its signal function is determined by IOPGDMA or IOPEXTINT register Table 12 3 IOPCON1 2 Register Register Address R W Description Reset Value IOPCON1 0xF0030008 R W I O port function control r...

Страница 428: ...GPIO 18 xGDMA Req 3 GPIO 17 xGDMA Req 2 GPIO 16 xGDMA Req 1 GPIO 15 xGDMA Req 0 GPIO 14 External Interrupt xINT 5 GPIO 13 External Interrupt xINT 4 GPIO 12 External Interrupt xINT 3 GPIO 11 External Interrupt xINT 2 GPIO 10 External Interrupt xINT 1 GPIO 9 External Interrupt xINT 0 GPIO 8 GPIO 31 GPIO 30 GPIO 29 GPIO 28 GPIO 27 GPIO 26 GPIO 25 GPIO 24 GPIO 23 GPIO 22 GPIO 21 GPIO 20 GPIO 19 GPIO 1...

Страница 429: ...ARTnDTR1 GPIO 37 High speed UART TXD1 HUARTTXD1 GPIO 36 High speed UART RXD1 HUARTRXD1 GPIO 35 GPIO 34 GPIO 33 GPIO 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 31 1 0 12 13 14 9 10 11 6 7 8 3 4 5 1 2 1 X X 1 1 1 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 IOPCON2 X X X X X 1 1 1 GPIO 63 Default signal GPIO 62 GPIO 6...

Страница 430: ...rol external GDMA Acknowledge2 output for port 20 xGDMA_Ack2 10 0 active low 1 active high 9 Control external GDMA Acknowledge1 output for port 19 xGDMA_Ack1 9 0 active low 1 active high 8 Control external GDMA Acknowledge0 output for port 18 xGDMA_Ack0 8 0 active low 1 active high 7 6 Control external GDMA Request3 input for port 17 xGDMA_Req3 7 0 filtering off 1 filtering on 6 0 active low 1 act...

Страница 431: ...t provides level or rising or falling edge detection If you set rising or falling edge detection rising or falling edge interrupt makes interrupt status high You can clear the interrupt by writing IOPEXTINTPND register to 1 If you set level detection then external interrupt level goes direct to interrupt controller External signals can be active high or low so you must set the active high or low b...

Страница 432: ...ing edge detection 11 8 Control external interrupt request2 input for port 10 xINT2 11 0 active low 1 active high 10 0 filtering off 1 filtering on 9 8 00 level detection 01 rising edge detection 10 falling edge detection 7 4 Control external interrupt request1 input for port 9 xINT1 7 0 active low 1 active high 6 0 filtering off 1 filtering on 5 4 00 level detection 01 rising edge detection 10 fa...

Страница 433: ...PEXTINTPND Register Register Address R W Description Reset Value IOPEXTINTPND 0xF0030018 R W I O port external interrupt clear register 0x00000000 NOTE IOPEXTINTPND is set when external interrupt is generated and is cleared by writing 1 to the appropriate bit of IOPEXTINTPND register 5 EXTINTCLR5 4 EXTINTCLR4 3 EXTINTCLR3 2 EXTINTCLR2 1 EXTINTCLR1 0 EXTINTCLR0 31 0 6 3 4 5 1 2 X X X X X X IOPEXTIN...

Страница 434: ... R W I O port data register for port 32 to 63 Undefined 12 3 7 I O PORT DRIVE CONTROL REGISTER IOPDRV1 2 The I O port drive control registers IOPDRV1 2 control the pad type for which is operating as a tri state output mode or an open drain output mode This register s each bit value programmed as write 1 value for open drain output mode or write 0 value for tri state output mode Table 12 8 IOPDRV1 ...

Страница 435: ...I O PORTS S3C2501X 12 12 NOTES ...

Страница 436: ...tten to the pre defined interrupt priority register field to obtain that priority The interrupt priorities are pre defined from 0x0 to 0x26 Interrupt mode register INTMOD EXTMOD Defines the interrupt mode IRQ or FIQ for each interrupt source Interrupt mask register INTMASK EXTMASK Indicates that the current interrupt has been disabled if the corresponding mask bit is 1 If an interrupt mask bit is ...

Страница 437: ...nterrupt 26 32 bit Timer 1 interrupt 25 32 bit Timer 0 interrupt 24 GDMA channel 5 interrupt 23 GDMA channel 4 interrupt 22 GDMA channel 3 interrupt 21 GDMA channel 2 interrupt 20 GDMA channel 1 interrupt 19 GDMA channel 0 interrupt 18 DES interrupt 17 Ethernet 1 RX interrupt 16 Ethernet 1 TX interrupt 15 Ethernet 0 RX interrupt 14 Ethernet 0 TX interrupt 13 Reserved 12 Reserved 11 Reserved 10 Res...

Страница 438: ...nterrupt 0 13 4 INTERRUPT CONTROLLER SPECIAL REGISTERS 13 4 1 INTERRUPT MODE REGISTERS Bit settings in the interrupt mode registers INTMOD and EXTMOD specify if an interrupt is to be serviced as a fast interrupt FIQ or a normal interrupt IRQ Table 13 3 INTMOD EXTMOD Register Register Address R W Description Reset Value INTMOD 0xF0140000 R W Internal interrupt mode register 0x00000000 EXTMOD 0xF014...

Страница 439: ...t Timer 3 interrupt 27 32 bit Timer 2 interrupt 26 32 bit Timer 1 interrupt 25 32 bit Timer 0 interrupt 24 GDMA channel 5 interrupt 23 GDMA channel 4 interrupt 22 GDMA channel 3 interrupt 21 GDMA channel 2 interrupt 20 GDMA channel 1 interrupt 19 GDMA channel 0 interrupt 18 DES interrupt 17 Ethernet 1 RX interrupt 16 Ethernet 1 TX interrupt 15 Ethernet 0 RX interrupt 14 Ethernet 0 TX interrupt 13 ...

Страница 440: ...0 IRQ interrupt mode 1 FIQ interrupt mode 4 EXT 4 interrupt 3 EXT 3 interrupt 2 EXT 2 interrupt 1 EXT 1 interrupt 0 EXT 0 interrupt 31 0 12 13 14 9 10 11 6 7 8 3 4 5 1 2 X X X X X X EXTMOD 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 R Figure 13 2 External Interrupt Mode Register EXTMOD 13 4 2 INTERRUPT MASK REGISTERS The interrupt mask registers INTMASK and EXTMASK contain interrupt mask bits ...

Страница 441: ... bit Timer 3 interrupt 27 32 bit Timer 2 interrupt 26 32 bit Timer 1 interrupt 25 32 bit Timer 0 interrupt 24 GDMA channel 5 interrupt 23 GDMA channel 4 interrupt 22 GDMA channel 3 interrupt 21 GDMA channel 2 interrupt 20 GDMA channel 1 interrupt 19 GDMA channel 0 interrupt 18 DES interrupt 17 Ethernet 1 RX interrupt 16 Ethernet 1 TX interrupt 15 Ethernet 0 RX interrupt 14 Ethernet 0 TX interrupt ...

Страница 442: ...upon request And if global mask bit bit 31 is 1 no interrupts include internal and external interrupts are serviced After the global mask bit is cleared the interrupt is serviced The 6 interrupt sources are mapped as follows 5 EXT 5 interrupt 0 non Masking 1 Masking 4 EXT 4 interrupt 3 EXT 3 interrupt 2 EXT 2 interrupt 1 EXT 1 interrupt 0 EXT 0 interrupt 31 Global interrupt mask bit 0 Enable all i...

Страница 443: ...R4 0xF0140030 R W Interrupt priority register 4 0x13121110 INTPRIOR5 0xF0140034 R W Interrupt priority register 5 0x17161514 INTPRIOR6 0xF0140038 R W Interrupt priority register 6 0x1B1A1918 INTPRIOR7 0xF014003C R W Interrupt priority register 7 0x1F1E1D1C INTPRIOR8 0xF0140040 R W Interrupt priority register 8 0x23222120 INTPRIOR9 0xF0140044 R W Interrupt priority register 9 0x00262524 INTPRIOR0 3...

Страница 444: ... is 0x00000027 This register is valid only under the IRQ or FIQ mode in the ARM940T In the interrupt service routine you should read this register before changing the CPU mode NOTE If the lowest interrupt priority priority 0 is pending the INTOFFSET value will be 0x00000000 The reset value will therefore be changed to 0x00000027 to be different from interrupt pending priority 0 Table 13 6 INTOFFSE...

Страница 445: ... 5 interrupt 0 x 1F 30 GDMA channel 4 interrupt 0 x 1E 29 GDMA channel 3 interrupt 0 x 1D 28 GDMA channel 2 interrupt 0 x 1C 27 GDMA channel 1 interrupt 0 x 1B 26 GDMA channel 0 interrupt 0 x 1A 25 DES interrupt 0 x 19 24 Ethernet 1 RX interrupt 0 x 18 23 Ethernet 1 TX interrupt 0 x 17 22 Ethernet 0 RX interrupt 0 x 16 21 Ethernet 0 TX interrupt 0 x 15 20 Reserved Reserved 19 Reserved Reserved 18 ...

Страница 446: ...f Interrupt Sources Returned Default Offset Value Hex 9 Reserved Reserved 8 Reserved Reserved 7 IIC interrupt 0 x 7 6 Reserved Reserved 5 External interrupt 5 0 x 5 4 External interrupt 4 0 x 4 3 External interrupt 3 0 x 3 2 External interrupt 2 0 x 2 1 External interrupt 1 0 x 1 0 External interrupt 0 0 x 0 ...

Страница 447: ...et register INTOFFSET Table 13 8 IPRIORHI IPRIORLO Register Register Address R W Description Reset Value IPRIORHI 0xF0140010 R High bits 38 32 bit Interrupt by priority register 0x00000000 IPRIORLO 0xF0140014 R Low bits 31 0 bit Interrupt by priority register 0x00000000 13 4 6 INTERRUPT TEST REGISTER The interrupt test registers INTTSTHI and INTTSTLO are used to monitor a interrupt pending status ...

Страница 448: ...ue registers and Timer Interrupt Clear register TIC which is used to clear the current interrupt These timers can operate in interval mode or in toggle mode The output signals are TOUTn The user can enable or disable timers by setting control bits in Timer Mode register TMOD An interrupt request is generated whenever a timer count out down count occurs Watchdog Timer WDT has Watchdog Timer registe...

Страница 449: ...4 TOGGLE MODE OPERATION In toggle mode the timer pulse continues to toggle whenever a time out occurs An interrupt request is generated whenever the level of the timer output signal is inverted that is when the level toggles The toggle pulse is output directly at the configured output pin Using toggle mode you can achieve a flexible timer clock range with 50 duty In toggle mode the timer frequency...

Страница 450: ...he associated interrupt is generated The base value TDATA is then reloaded to the count register TCNT and the timer continues decrement of its count register value TCNT If a timer is disabled you can write a new base value into its registers TDATA If the timer is halted while it is running the base value is not automatically re loaded fSYSCLK 32 Bit Timer Count Register TCNTn Down Counter 32 Bit T...

Страница 451: ...25 14 4 14 6 1 TIMER MODE REGISTER The timer mode register TMOD is used to control the operation of the six 32 bit timers Table 14 1 TMOD Register Register R W Description TMOD 0xF0040000 Timer mode register 0x00000000 ...

Страница 452: ... 6 3 4 5 1 2 T M D 0 T E 1 T E 0 T M D 1 T C L R 1 T C L R 0 T E 2 T M D 2 T C L R 2 T E 3 T M D 3 T C L R 3 T E 4 T M D 4 T C L R 4 T E 5 T M D 5 T C L R 5 7 13 10 11 12 8 9 17 14 15 16 9 Timer 3 enable TE3 0 Disable timer 3 1 Enable timer 3 10 Timer 3 mode selection TMD3 0 Interval mode 1 Toggle mode 11 Timer 3 initial TOUT3 value TCLR3 0 Initial TOUT3 is 0 in toggle mode 1 Initial TOUT3 is 1 in...

Страница 453: ...s the specific time to reach interrupt service routine after time out takes place The elapsed time from time out to interrupt service routine is approximately 27 cycles 200n sec at 133 MHz Therefore TDATA should be set to the bigger value than 0x1A to avoid another time out while it is carrying out the process between time out and interrupt routine Table 14 2 TDATA0 TDATA5 Registers Register Addre...

Страница 454: ...ster Address Description Reset Value 0xF0040014 R W 0xFFFFFFFF TCNT1 R W Timer 1 count register TCNT2 0xF0040024 Timer 2 count register 0xFFFFFFFF 0xF004002C R W 0xFFFFFFFF TCNT4 R W Timer 4 count register TCNT5 0xF004003C Timer 5 count register 0xFFFFFFFF 31 0 Timer Count 31 0 Timer 0 5 count value Figure 14 5 Timer Count Registers TCNT0 TCNT5 ...

Страница 455: ... clear 1 interrupt clear 1 Timer0 interrupt clear TIC0 0 no interrupt clear 1 interrupt clear 2 Timer1 interrupt clear TIC1 0 no interrupt clear 1 interrupt clear 3 Timer2 interrupt clear TIC2 0 no interrupt clear 1 interrupt clear 4 Timer3 interrupt clear TIC3 0 no interrupt clear 1 interrupt clear 5 Timer4 interrupt clear TIC4 0 no interrupt clear 1 interrupt clear 6 Timer5 interrupt clear TIC5 ...

Страница 456: ...r set two or more bits of WDTVAL the lowest significant bit of those let the watch dog timer time out Table 14 5 WDT Register Register Address R W Description Reset Value WDT 0xF0040008 R W Watchdog Timer Register 0x00000000 Watchdog Timer Timerout Value WDTVAL 17 0 Watchdog Timer Timerout Value WDTVAL 29 Watchdog Timer Counter Reset RST When set to 1 Watchdog Timer Counter is reset 30 Watchdog Ti...

Страница 457: ... X X X X X X X 1 0 0 2 491 5us X X X X X X X X X 0 0 0 2 983 0us X X X X X X X X 1 0 0 0 2 1 97ms X X X X X X X 1 0 0 0 0 2 3 93ms X X X X X X X 0 0 0 0 0 2 7 86ms X X X X X X 1 0 0 0 0 0 2 15 72ms X X X X X 1 0 0 0 0 0 0 2 31 45ms X X X X X 0 0 0 0 0 0 0 2 62 91ms X X X X 1 0 0 0 0 0 0 0 2 125 82ms X X X 1 0 0 0 0 0 0 0 0 2 251 65ms X X X 0 0 0 0 0 0 0 0 0 2 503 31ms X X 1 0 0 0 0 0 0 0 0 0 2 1 0...

Страница 458: ...e 3 3V input buffer 3 8 VOUT DC output voltage 3 3V input buffer 3 8 ILATCH Latch up current 200 mA TSTG Storage termperature 65 to 150 C 15 3 RECOMMENDED OPERATING CONDITIONS Table 15 2 Recommended Operating Conditions Symbol Parameter Rating Unit VDD DC supply voltage 1 8V Core 1 8 5 V 3 3V I O 3 3 5 PLL DC supply voltage 1 8V Core 1 8 5 VIN DC input voltage 3 3V input buffer 3 0 3 6 VOUT DC out...

Страница 459: ...4 V Schmitt trigger positive going CMOS 2 0 V _ Schmitt trigger negative CMOS 0 8 V IH High level input current A Input buffer IN V 10 Input buffer with pull down 33 60 IL Low level input current A Input buffer IN V 10 Input buffer with pull up 60 10 V High level output voltage V IOH µA DD 0 05 Type B1 OH 1 2 4 Type B2 OH 2 Type B4 I 4 mA IOH 8 Type B12 I mA Type B12 OH 12 Type B16 I 16 mA IOH mA ...

Страница 460: ...2 mA Type B4 IOL 4 mA Type B8 IOL 8 mA Type B12 IOL 12 mA Type B16 IOL 16 mA Type B20 IOL 20 mA Type B24 IOL 24 mA IOZ Tri state output leakage current VOUT VSS or VDD 10 10 µA IDS Quiescent supply current 100 µA IDD Maximum operating current VDD 3 3 V 1 8 V Frequency 133MHz note mA CIN Input capacitance Any Input Bi directional Buffers 4 pF COUT Output capacitance Any Output Buffer 4 pF NOTE Late...

Страница 461: ...ency 33 166 MHz System bus frequency 33 133 MHz USB Frequency 48 48 MHz Table 15 5 Clock AC timing specification Characteristic Min Max Units Internal PLL lock time 150 µs Frequency of operation XCLK 133 MHz XCLK cycle time 7 5 ns XCLK duty cycle 45 55 Frequency of operation HCLKO 133 MHz HCLKO cycle Time 7 5 ns HCLKO duty cycle 45 55 ...

Страница 462: ...xed bus address hold time 1 09 2 72 ns tnWAITd ROM SRAM WAIT signal delay time 1 5 11 ns tnWAITh ROM SRAM WAIT signalhold time 1 5 11 ns tCC SDRAM Clock Cycle Time 7 5 7 5 ps tCH SDRAM Clock High Pulse Width 4 1 4 5 ps tCL SDRAM Clock Low Pulse Width 3 4 3 5 ps tCASd SDRAM Column Address Strobe Delay Time 2 0 4 7 ps tCASh SDRAM Column Address Strobe Hold Time 2 0 4 6 ps tRASd SDRAM Row Address Str...

Страница 463: ...ELECTRICAL DATA S3C2501X 15 6 NOTES ...

Страница 464: ...S3C2501X MECHANICAL DATA 16 1 16 MECHANICAL DATA 16 1 OVERVIEW The S3C2501X is available in a 272 pin BGA package 272 BGA 2727 AN ...

Страница 465: ...0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 K J H G F E D C B A N M L 1 17 0 05 0 36 0 56 0 10 2 13 2 33 0 20 0 15 MAX 272 BGA 2727 AN φ0 38 MAX 18 19 20 1 27 Y W V U 272 φ0 76 0 015 15 17 17 1 27 T R P 27 00 0 10 24 00 0 10 Figure 16 1 272 BGA 2727 AN Package Dimensions ...

Отзывы: