Page 1
LH79524/LH79525 User’s Guide Version 1.0...
Page 2
Suggested applications (if any) are for standard use; See Important Restrictions for limitations on special applications. See Limited Warranty for SHARP’s product warranty. The Limited Warranty is in lieu, and exclusive of, all other warranties, express or implied. ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR USE AND FITNESS FOR A PARTICULAR PURPOSE, ARE SPECIFICALLY EXCLUDED.
Page 12
Table of Contents LH79524/LH79252 User’s Guide 11.2.2.26 Multiplexing Control 20 Register (MUXCTL20) ......11-38 11.2.2.27 Resistor Configuration Control 20 Register (RESCTL20) ..11-40 11.2.2.28 Multiplexing Control 21 Register (MUXCTL21) ......11-42 11.2.2.29 Resistor Configuration Control 21 Register (RESCTL21) ..11-43 11.2.2.30 Multiplexing Control 22 Register (MUXCTL22) ......
Page 13
LH79524/LH79252 User’s Guide Table of Contents 13.2.2.4 Software Reset Register (SOFTRESET)........13-14 13.2.2.5 Reset Status Register (RSTSTATUS).......... 13-15 13.2.2.6 Reset Status Clear Register (RSTSTATUSCLR) ......13-16 13.2.2.7 System Clock Prescaler Register (SYSCLKPRE) ......13-17 13.2.2.8 CPU Clock Prescaler Register (CPUCLKPRE) ......13-18 13.2.2.9 Peripheral Clock Control Register 0 (PCLKCTRL0) .....
Page 14
Table of Contents LH79524/LH79252 User’s Guide Chapter 15 – Timers 15.1 Theory of Operation ..................15-2 15.1.1 Counter Clear Upon Compare Match ............ 15-3 15.1.2 Capture Signal Sampling............... 15-4 15.1.3 PWM Mode.................... 15-4 15.1.3.1 Timer Interrupts ................15-5 15.2 Register Reference ..................15-6 15.2.1 Memory Map ..................
Page 15
LH79524/LH79252 User’s Guide Table of Contents 16.3.2.3 Flag Register (UARTFR) .............. 16-11 16.3.2.4 IrDA Low-Power Counter Register (UARTILPR) ......16-12 16.3.2.5 Integer Baud Rate Divisor Register (UARTIBRD) ......16-13 16.3.2.6 Fractional Baud Rate Divisor Register (UARTFBRD) ....16-14 16.3.2.7 Line Control Register (UARTLCR_H)........... 16-15 16.3.2.8 UART Control Register (UARTCR) ..........
Page 16
Table of Contents LH79524/LH79252 User’s Guide 17.2.3.6 OUT Maximum Packet Size Register EP 1 and 2 (OUTMAXP) ... 17-26 17.2.3.7 Control Status Register 1 for OUT EP1 and EP2 (OUTSCSR1) .. 17-27 17.2.3.8 Control Status Register 2 for OUT EP1 and EP 2 (OUTCSR2) ... 17-29 17.2.3.9 Count 0 Register (OUTCOUNT0)..........
Page 17
Figure 3-2. Active Pullup Circuit ................. 3-5 Chapter 4 – Color Liquid Crystal Display Controller Figure 4-1. LH79524/LH79525 LCD System, Simplified Block Diagram....4-1 Figure 4-2. Block Diagram of a Typical Advanced LCD Panel........4-2 Figure 4-3. Color LCD Controller Block Diagram ............4-4 Figure 4-4.
Page 18
List of Figures LH79524/LH79252 User’s Guide Chapter 7 – External Memory Controller Figure 7-1. External Memory Controller Block Diagram..........7-2 Figure 7-2. Automatic Address Shifting..............7-4 Figure 7-3. 32-bit Memory Bank Constructed From 8-bit Devices ......7-6 Figure 7-4. 16-bit Memory Bank Constructed From 8-bit Devices ......7-6 Figure 7-5.
Page 19
LH79524/LH79252 User’s Guide List of Figures Chapter 14 – Synchronous Serial Port Figure 14-1. SSP Timing Waveform Parameters ............. 14-3 Figure 14-2. Motorola SPI Frame Format (Continuous Transfer) ......14-4 Figure 14-3. Motorola SPI Frame Format with SPH = 0 .......... 14-4 Figure 14-4.
Page 20
Table 1. Register Name ..................xxxvii Table 2. Bit Fields....................xxxvii Chapter 1 – Overview Table 1-1. LH79524/LH79525 Differences..............1-1 Table 1-2. Clock Descriptions ..................1-4 Table 1-3. Port C Settings For Boot ................1-8 Table 1-4. Default Bus Master Priority ..............1-12 Table 1-5.
Page 27
List of Tables LH79524/LH79252 User’s Guide Chapter 9 – I C Module Table 9-1. I C Clock Parameters ................9-3 Table 9-2. Sample I C HIGH Period Counts .............. 9-3 Table 9-3. I C Register Summary ................9-6 Table 9-4. ICCON Register ..................9-7 Table 9-5.
Page 29
Table 12-17. ICR Fields ................... 12-7 Chapter 13 – Reset, Clock, and Power Controller Table 13-1. LH79524/LH79525 Clocks and Maximum Frequencies......13-5 Table 13-2. Clock and Enable States for Different Power Modes ......13-6 Table 13-3. RCPC Register Summary ..............13-8 Table 13-4.
(logical 1 at reset) or pull down (logical 0 at reset) resistors. Multiplexed Pins The LH79524 is manufactured in a CABGA package with 208 pins. The LH79525 is man- ufactured in a LQFP package with 176 pins. Some pins have only one function, but others are multiplexed and may carry as many as three functions.
Peripheral Devices The LH79524/LH79525 is an SoC built using the ARM720T RISC core as a base. Objects within the chip but external to the core processor and its support devices are referred to throughout this User’s Guide as ‘blocks’...
LH79524/LH79525 User’s Guide Preface Register Tables All Registers are presented in tabular format. A primary table presents each register’s name, address, permissions, bit-field names and the register’s contents at reset. Subse- quent tables detail the specific names and function(s) of all bit fields in the register and explain any important variations that may exist.
Preface LH79524/LH79525 User’s Guide Numeric Values Binary values are prefixed with 0b; for example, 0b00001000. Hexadecimal values are expressed with UPPERCASE letters and prefixed with 0x; for example, 0x0FBC. All numeric values not specifically identified with the above prefixes as either binary or hexadecimal are decimal values.
LH79524/LH79525 User’s Guide Preface Block diagrams can include symbols representing Registers and the bit fields within them. Figure 2 shows that the BITFIELDNAME bit field in the REGISTERNAME register enables or disables the signal named OUTPUT. REGISTERNAME:BITFIELDNAME INPUT f ( )
What’s in This User’s Guide Chapter 1 – Overview This Chapter lists the features of the LH79524/LH79525 SoC and presents a simplified block diagram of the device, with the major architectural features identified. Also presented is an overview of the ARM720T processor and MMU. The theory of operation covers bus architecture, bus arbitration, and the base addresses for each of the Advanced High-Per- formance Bus (AHB) and Advanced Peripheral Bus (APB) devices and the APB Bridge.
Chapter 11 – I/O Configuration This Chapter is an overview of the LH79524/LH79525 I/O Configuration and pin multiplex- ing. The Chapter provides a block diagram, programmer’s model, register summary and descriptions.
Preface LH79524/LH79525 User’s Guide Chapter 15 – Timers This Chapter describes the LH79524/LH79525 Timers. The Chapter includes a short over- view and block diagram, signal descriptions, operation sequences, register summaries, register descriptions, and interface signals. Chapter 16 – UARTs This Chapter presents the LH79524/LH79525 UART blocks. The Chapter includes a brief overview, block diagram, programmer’s model, programmable parameters, register sum-...
Counters/Timers, Real Time Clock, Watchdog Timer, Pulse Width Modulators, and an on-chip Phase-Locked Loop. JTAG support is provided to simplify debugging. Table 1-1 summarizes the differences in features between the LH79524 and the LH79525. All other peripherals and functional blocks are identical (unless noted in the Chapter detail- ing that block’s function).
BUS BRIDGE DEVICE 16550 COLOR UART (3) w/SIR TEST SUPPORT CONTROLLER 10 CHANNEL 10-BIT ADC LINEAR ADVANCED (WITH TSC and REGULATOR BROWNOUT INTERFACE DETECTOR) ADVANCED ADVANCED HIGH PERPHERAL PERFORMANCE BUS (APB) BUS (AHB) LH79525-1 Figure 1-1. LH79524/LH79525 Block Diagram Version 1.0...
Overview 1.1 Bus Architecture The LH79524 and LH79525 both internally employ the ARM Advanced Microprocessor Bus Architecture (AMBA) 2.0 bus and bus protocol. They have four Bus Masters on the Advanced High-performance Bus (AHB) that control access to the external memory and the on-chip peripherals.
Overview LH79524/LH79525 User’s Guide 1.3 Clock Strategy The SoCs have two crystal oscillators. One oscillator, CLK OSC, is used to drive both PLLs and the three UARTs, among others. This oscillator supports a frequency range from 10 to 20 MHz. The second oscillator, RTC CLK, is a 32.768 kHz oscillator, also requiring a 1.8 V source.
Page 48
LH79524/LH79525 User’s Guide Overview Table 1-2. Clock Descriptions (Cont’d) FREQUENCY NAME DESCRIPTION (MAX.) This clock controls the data rate for pixel transfers to an external LCD panel. This clock can be separately enabled, disabled and prescaled. CLCD Clock 50.803 MHz (n ≤...
Overview LH79524/LH79525 User’s Guide 1.3.1 Bus Clocking Modes The ARM720T core (including the cache) and its AHB interface can be operated using either the Fastbus operation mode or one of two Standard clocking modes (Synchronous or Asynchronous). The clocking modes can have significant impact on power consumption and system throughput, depending upon the application and the speed of external memory.
LH79524/LH79525 User’s Guide Overview 1.3.1.2 Synchronous and Asynchronous Bus Clocking Modes Although the frequency of FCLK must always be greater than (or equal to) HCLK, the two Standard modes vary the relationship between these two clock signals. In the Synchro- nous Mode, the FCLK frequency must be programmed to be an even integer multiple of the HCLK frequency.
If nTRST is asserted, only the JTAG circuitry is set to its default state. There are two types of internal resets for the LH79524/LH79525. A software reset resets all internal registers, except the JTAG circuitry, to their default state. The other internal reset is the watchdog timer (WDT) reset, which also resets all internal registers, except the JTAG circuitry, to their default state.
LH79524/LH79525 User’s Guide Overview 1.4.1 Resetting the Test Access Port Controller The on-chip Test Access Port (TAP) Controller has an independent reset pin, nTRST. However, it must also be reset at power on, or any time the SoC is reset to ensure it exits the power up sequence in Normal Mode.
Overview LH79524/LH79525 User’s Guide SYSTEM RESET TO nRESETIN OTHER PERIPHERALS nRESETIN PUSHBUTTON RESET LH79524/LH79525 POWER ON RESET nTRST nTRST LH79525-118 Figure 1-5. Reset Circuit for TAP Controller Including a Push Button 1.4.2 Hardware Requirements at Reset A number of pins contain on-chip pull up or pull down resistors that provide a logic state following reset.
LH79524/LH79525 User’s Guide Overview 1.4.2.3 Active Pull Ups The boot mode — NOR Flash, NAND Flash, SRAM, I2C, or UART — is selected by the value latched on the rising edge of the nRESETOUT signal from the state of Port C, pins [7:4].
• A static and dynamic memory controller with a 24-bit address and 16/32-bit data interface • A 4-channel general purpose DMA controller All system resources accessible by the LH79524/LH79525 are memory mapped. These include external resources (e.g. ROM, PROM, SRAM, SDRAM, External Peripherals) and internal resources (system configuration registers, peripheral configuration registers, and internal memory).
LH79524/LH79525 User’s Guide Overview This memory map partition has four configurations, based on the setting of the REMAP bits in the Reset, Clock, and Power Controller. The external static memory bank is divided into four sections, each having a Chip Select associated with it.
1.8 Memory Management Unit (MMU) The ARM720T core in the LH79524/LH79525 includes an MMU that performs three pri- mary functions: It translates virtual addresses into physical addresses, it enables cache and write buffering for particular ranges of virtual addresses, and it controls memory access permissions.
Chapter 2 Analog-to-Digital Converter/ Brownout Detector The LH79524/LH79525 incorporate an analog-to-digital converter (ADC) and implements a touch screen controller (TSC) and brownout detector with interrupt. 2.1 Theory of Operation The ADC and TSC incorporate: • 10-bit ADC with integrated sample and hold, and fully-differential high impedance signals, and single-ended or ratiometric reference inputs •...
This configuration also requires a single external MOSFET. • Details for wiring 4-, 5-, 7, and 8-wire touch panels appear in the application note ‘Using the SHARP ADC with Resistive Touch Screens’, available at www.sharpsma.com. Version 1.0...
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.1.3 Clock Generator The ADC has a programmable measurement clock derived from the ADC peripheral clock generated by the RCPC. The clock source is selectable from HCLK or the System oscilla- tor clock, and can be prescaled. The clock supplies the time base for the measurement sequencer and the successive-approximation circuitry.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide The analog input voltage (VIN) is held on a track/hold. The N-bit register is set to midscale (100...0, where the most-significant bit is set to 1) to implement the binary search algo- rithm. This forces the DAC output (VDAC) to be VREF ÷ 2, where VREF is the reference voltage provided to the ADC.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector Four comparison periods are necessary for a 4-bit ADC. Generally, an N-bit SAR ADC requires N comparison periods and will not be ready for the next conversion until the current conversion is completed. Another feature of SAR ADCs is that power dissipation scales with the sample rate. By comparison, flash or pipelined ADCs usually have constant power dissipation as opposed to sample rate.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.1.7 Timing Formulas The throughput-conversion time consists of one cycle of Get Data state added to 16 cycles of measurement. Starting from the Idle state, the time for a complete measurement sequence, in clock cycles, is calculated as: 1CIS + MS ×...
16 entries. The interrupt is cleared when the FIFO is read. 2.1.9 Application Details An application note entitled ‘Using the SHARP ADC with Resistive Touch Screens’ is avail- able from SHARP that provides more detailed application information dealing with use and programming of the ADC.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2 Register Reference This section provides the ADC and Brownout Detector register memory mapping and bit fields. 2.2.1 Memory Map The base address for the ADC is 0xFFFC3000. Table 2-1 Summarizes the ADC registers. Address offsets in the table are from the base address.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2 Register Descriptions 2.2.2.1 High Word Register (HW) HW is the High Word Register. This Read Only status register shows the contents of the current conversion’s high word in the control bank. There is a one-to-one correspondence between the contents of the control bank high word and the contents of this register for the current conversion in progress.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.2 Low Word Register (LW) LW is the Control Bank Low Word Register. This Read Only status register displays the contents of the current conversion’s low word in the control bank. There is a one-to-one correspondence between the contents of the control bank low word and the contents of this register for the current conversion in progress.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.3 Results Register (RR) RR is the Results register. This register contains the oldest entry of the 16-entry × 16-bit wide result FIFO. Its index in the FIFO’s memory array is contained in the Read Pointer (RDPTR) bit field in the FIFO Status Register (see Section 2.2.2.9).
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.4 Interrupt Mask Register (IM) IM is the Interrupt Mask /Enable register. The active bits used in this register are Read/ Write and enable the interrupts. Software can read the status of the interrupt bits through the IS Register, even if corresponding mask bits are set in this register.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.5 Power Configuration Register (PC) In this register, the clock divider bits are programmed to set the system clock frequency for analog operation. Program bits [3:0] to the number of conversions necessary, depending on the conversion. Bit [4] can be used as an enable for external I/O pads. If this bit is set to 1, the Battery Control Logic Pin (BATCNTL) will be a valid output.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector Table 2-12. PC Fields (Cont’d) NAME DESCRIPTION Touch Screen Controller Power Mode Tis field also affects the of the A2DCLK, Band Gap, and A2D signals (see Table 2-13). 00 = Turns off Power Mode and clock; sets the BROWNOUT field (bit [9]) of the GS Register, indicating that a brownout is detected, even if VDDA_ADC is at the correct voltage.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.6 General Configuration Register (GC) In this register, the SSM field triggers the state machine to retrieve the data from the Control Bank and store it in the appropriate registers for the ADC. If the SSM bits are set to 0b11 at the end of a sequence, the state machine continues to convert data.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.7 General Status Register (GS) GS is the General Status Register. In this Read Only register, the 4-bit signal CBSTATE field shows the current state of the Control Bank state machine. The CBTAG signal con- tains the control bank entry number of the conversion that is taking place.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.8 Interrupt Status Register (IS) IS is the Interrupt Status register. This Read Only register provides the unmasked value of each interrupt. The BROWNOUT, PENSYNC, and EOS interrupts are latched and must be cleared by writing to the Interrupt Clear (IC) register. The FWATER and FOVRN inter- rupts are cleared when the contents of the FIFO no longer exceed their thresholds.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.9 FIFO Status Register (FS) FS is the FIFO Status Register. This Read Only register indicates the FIFO fill status. Table 2-20. FS Register FIELD RESET FIELD WRPTR RDPTR RESET ADDR 0xFFFC3000 + 0x20 Table 2-21.
Each entry is a 16-bit register, with its own address space. Table 2-22 shows sample entries for the Control Bank. More details, and examples can be found in SHARP’s Application Note ‘Using the Sharp ADC with Resistive Touch Screens’, available at http://www.sharpsma.com.
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.11 Idle High Word Register (IHWCTRL) IHWCTRL is the high word of the Idle Register. The active bits used in this register are Read/Write. This register specifies the idle setting time and the inputs connected to the ADC during the Idle state.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.12 Idle Low Word Register (ILWCTRL) ILWCTRL is the low word of the Idle Register. The active bits used in this register are Read/Write. This register specifies the inputs connected to the ADC during the Idle state. This register is used with the IHWCTRL Register (see Section 2.2.2.11).
LH79524/LH79525 User’s Guide Analog-to-Digital Converter/Brownout Detector 2.2.2.13 Masked Interrupt Status Register (MIS) MIS is the Masked Interrupt Status register. This Read Only register gives the masked value of each interrupt. The BROWNOUT, PENSYNC, and EOS interrupts are latched and must be cleared by writing to the Interrupt Clear (IC) register. The FWATER and FOVRN interrupts are cleared when the contents of the FIFO no longer exceed their thresholds.
Analog-to-Digital Converter/Brownout Detector LH79524/LH79525 User’s Guide 2.2.2.14 Interrupt Clear Register (IC) IC is the Interrupt Clear Register. Bits [2:0] of this Write Only register correspond to the three latched interrupts.Writing a 1 to a bit clears the corresponding interrupt; writing a 0 to a bit has no effect.
Chapter 3 Boot Controller The Boot Controller is the same for both the LH79524 and LH79525. All references in this chapter apply to both devices. The Boot Controller provides a glueless interface to external NAND Flash devices and support for memory-mapped peripherals or NAND flash devices when performing AHB burst read accesses of undetermined length.
Boot Controller LH79524/LH79525 User’s Guide 3.1 Theory of Operation The Boot Controller is a slave module that connects to the APB. It provides hardware sup- port for configuring the External Memory Controller (EMC) interface on power-up, and allows multiple boot devices and scenarios to be used in different applications. The Boot Controller employs no error checking other than that specified by a protocol, if applicable, and does not utilize the MMU or caches.
LH79524/LH79525 User’s Guide Boot Controller Table 3-1. Boot Configuration for Silicon Version A.0 PC[7:4] DEVICE TYPE DATA BUS WIDTH CONTROL NOR Flash or SRAM 16-bit nBLEx LOW for Reads NOR Flash or SRAM 16-bit nBLEx HIGH for Reads NOR Flash or SRAM...
External Memory Controller's nOE, enabled by the signal on external address pin A23. Note that the LH79524/LH79525 memory controller automatically indexes address signals on the address pins, depending on the width of the memory devices. For example, with 8-bit addressing, the A0 signal is presented on pin A0, and the A23 signal is presented on pin A23.
LH79524/LH79525 User’s Guide 3.1.2.2.1 NAND Flash Chip Select Because of the hardware implementation of the NAND Flash signalling, the LH79524/ LH79525 chip select used for NAND Flash addressing must be nCS0 for booting; nCS1 cannot be used. Connect the nCS0 pin to the NAND Flash nCE input pin if that device is used for booting.
LH79524/LH79525 User’s Guide Boot Controller 3.1.4 Booting from UART Another boot option is to boot using UART0. The transfer protocol implementation is XMODEM with 128-byte packets. All UART0 parameters are summarized in Table 3-6. The Boot Controller automatically handles initialization and setup of UART0; the source of the boot code must be compatible with the parameters in the table.
Boot Controller LH79524/LH79525 User’s Guide 3.2.2 Register Definitions 3.2.2.1 Power-up Boot Configuration Register (PBC) Reading from the PBC register returns the value that the PC[7:4] pins were driven during a power-on reset. This value is used by software contained in the Boot ROM, as well as the Boot Controller, to determine the type and configuration of the external device from which the CPU is to boot.
LH79524/LH79525 User’s Guide Boot Controller 3.2.3 nCS1 Override Register (CS1OV) Bit 0 in the CS1OV register programs the function of the nCS1 signal. This bit has different functions for read and write. Reading returns the nCS1 Override Enable current status.
Boot Controller LH79524/LH79525 User’s Guide 3.2.4 External Peripheral Mapping Register (EPM) This register determines which chip selects will have burst accesses to their address regions converted to a series of non-sequential transfers. The register provides individual selectability for each of nCS0, nCS1, nCS2, and nCS3. At reset, accesses to all four chip select regions have conversion enabled.
The ALI-specific description begins in Section 4.4. The only difference between the LH79524 CLCDC and the LH79525 CLCDC is the pixel bit depth. The LH79524 supports up to 16 bits-per-pixel (bpp) depth, and the LH79525 supports up to 12 bpp.
Row and Column driver chips directly. The DC-DC conversion is also handled off-panel, by a separate device operating the panel’s high voltage supplies and illuminator. The DC-DC conversion must be handled by a separate device, since the LH79524/LH79525 do not supply this function.
– Dual-panel monochrome STN panels, with 4-bit and 8-bit bus interface per panel – Single-panel color STN panels, with an 8-bit bus interface (LH79524 only) – Dual-panel color STN panels, with 8-bit bus interface per panel (LH79524 only) • Resolution up to 1024 × 1024 dots per inch (DPI) •...
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller In 12 or 16-bit-per-pixel Mode, the CLCDC uses the unpacked data directly to generate the pixel value. In all other bit-per-pixel modes, the CLCDC uses the unpacked data to index its palette RAM; the CLCDC uses the value indexed from the palette to generate the pixel value.
Least Significant Green palette data Unused LR[3:0] Least Significant Red palette data Unused NOTE: *Blue and red palette data can be swapped by programming CTRL:BGR. Table 4-5. Palette Data Storage (LH79524 with 16-Bit CLCDC) NAME* DESCRIPTION Intensity 30:26 MB[4:0] Most Significant Blue palette data...
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.3.6.1 Grayscale Algorithm A patented grayscale algorithm drives the monochrome and color STN panels. • For monochrome displays, the gray-scale algorithm provides 15 gray scales. • For color displays, the 3-color components (red, green, and blue) are grayscaled simul- taneously.
LSB of the R, G, and B components of a 6:6:6 TFT panel. NOTES: 1. LH79525 with 12-Bit CLCDC 2. LH79524 with 16-Bit CLCDC Table 4-7. Supported Color STN LCD Panels (LH79524 only) COLOR STN SOURCE NOTE (SINGLE AND DUAL PANEL, 8-BIT BUS)
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller Table 4-9 shows the intensity that can be obtained from each of the 16 possible 4-bit pal- ette combinations. Only 15 of the combinations are useful because the values 0b0110 and 0b1000 produce the same result.
When LCD data is written to a LCD panel, the manner in which the LCD data is multiplexed onto the external data bus varies for STN, TFT, AD-TFT, or HR-TFT panels. Table 4-10 and Table 4-11 show the data multiplexing for each supported panel. Table 4-10. LH79524 LCD Data Multiplexing CABGA CABGA...
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.3.8.1.1 STN Horizontal Timing Restrictions The CLCDC’s dedicated DMA system requests new data at the start of each horizontal dis- play line. Time must be allowed for the DMA transfer operation to occur. Time must also be allowed for the data to propagate down the FIFO path within the LCD interface.
STN panels. In addition the power down sequence must be fol- lowed or LCD life can be degraded. Figure 4-4 is an example of these timing requirements for the SHARP LM057QCTT03 Color STN LCD Panel, and the accompanying timing specifications. Always refer to your specific LCD panel’s Data Sheet to determine the specific turn-on and turn-off require-...
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.3.9.1 Minimizing a Retained Image on the LCD While it is very important to follow the power turn-off sequence to ensure longevity of the LCD panel, this sequence alone will not ensure there is no retained image (ghosting) left on the LCD panel after the LCD has been powered down.
The Advanced LCD Interface (ALI) provides the additional processing required to inter- face the LH79524 and LH79525 to AD-TFT, HR-TFT, or any display technology that uses this method of connection. Figure 4-5 shows the ALI between the CLCDC and the LCD output pins.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.4.1 ALI Theory of Operation All ALI Control and Status Registers can be accessed through the APB. One of the regis- ters, the ALI Setup Register, can be programmed to select Bypass Mode or Active Mode.
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5 CLCDC Register Reference This section contains the register definitions for the CLCDC. ALI registers are found in the next section. 4.5.1 Enabling the CLCDC Following reset, the CLCDC Data Clock is gated OFF. Prior to using the CLCDC, it must be enabled by turning on the LCD Data Clock in the PCLKCTRL1 register of the Reset, Clock, and Power Controller block (see Section 13.2.2.10).
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3 CLCDC Register Descriptions 4.5.3.1 Horizontal Timing Panel Control Register (TIMING0) The TIMING0 Register controls: • Horizontal Synchronization Pulse Width (HSW) • Horizontal Front Porch (HFP) period • Horizontal Back Porch (HBP) period •...
Page 117
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.3.1.1 Horizontal Timing Restrictions The LCD DMA requests new data at the start of a horizontal display line. Some time must be allowed for the DMA transfer and for the data to propagate down the FIFO path in the LCD interface.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.2 Vertical Timing Panel Control Register (TIMING1) The TIMING1 Register controls the: • Number of Lines-Per-Panel (LPP) • Vertical Synchronization Pulse Width (VSW) • Vertical Front Porch (VFP) period • Vertical Back Porch (VBP) period Table 4-16.
Page 119
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller Table 4-17. TIMING1 Fields (Cont’d) NAME DESCRIPTION Lines Per Panel LPP specifies the number of active lines (rows of pixels) per panel. The LPP bit field is a 10-bit value allowing between 1 and 1,024 lines.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.3 Clock and Signal Polarity Control Register (TIMING2) The TIMING2 Register controls the CLCDC timing. Table 4-18. TIMING2 Register FIELD PCD_HI RESET FIELD PCD_LO RESET ADDR 0xFFFF4000 + 0x08 Table 4-19. TIMING2 Fields...
Page 121
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller Table 4-19. TIMING2 Fields (Cont’d) NAME DESCRIPTION Invert the Vertical Synchronization Signal IVS selects the polarity of the LCDFP signal. 1 = LCDFP is active LOW 0 = LCDFP is active HIGH AC Bias Signal Frequency ACB sets the frequency of the LCDEN signal.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.4 Upper Panel Frame Buffer Base Address Register (UPBASE) The UPBASE Register is one of two Color LCD DMA Base Address Registers (the other is LPBASE, described in Section 4.5.3.5). Together with LPBASE, this Read/Write regis- ter programs the base address of the frame buffer.
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.3.5 Lower Panel Frame Buffer Base Address Register (LPBASE) The LPBASE Register is one of two Color LCD DMA Base Address Registers (the other is UPBASE, described in Section 4.5.3.4). Together with UPBASE, this Read/Write register programs the base address of the frame buffer.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.6 Interrupt Enable Register (INTREN) INTREN is the Interrupt Enable Register. Setting bits within this register enables the corresponding Raw Interrupt Status bit values to be passed to the Raw Interrupt Status Register (see Section 4.5.3.8).
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.3.7 CLCDC Control Register (CTRL) CTRL controls the CLCDC operating mode. All registers should be set up prior to program- ming LCDEN to 1. Note that the operating mode (color/mono, bits-per-pixel, etc.) can only be changed between frames to avoid corruption of the current frame data.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide Table 4-27. CTRL Fields NAME DESCRIPTION 31:17 Reserved Reading returns 0. Write the reset value. LCD DMA FIFO Watermark Level 1 = Requests data when either of the two DMA FIFOs have eight or more WATERMARK empty locations.
Page 127
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller Table 4-27. CTRL Fields (Cont’d) NAME DESCRIPTION Monochrome STN LCD LCD is Monochrome (Black and White) STN. This bit has no effect in TFT mode. 1 = STN LCD is monochrome 0 = STN LCD is color LCD Bits-Per-Pixel For the LH79525, 12 bpp is selected by 0b100.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.8 Raw Interrupt Status Register (STATUS) STATUS is the Raw Interrupt Status Register. The status of the interrupts without masking applied is contained in this register. Table 4-28. STATUS Register FIELD RESET...
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.3.9 Masked Interrupt Status Register (INTERRUPT) The INTERRUPT Register is a Read Only register. It is a bit-by-bit logical AND of the Raw Interrupt Status Register (see Section 4.5.3.8) and the INTREN Register (see Section 4.5.3.6).
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.10 Interrupt Clear Register (INTCLR) Writing a 1 to an active bit in this register causes that interrupt to be cleared. This is a write- only register. Table 4-32. INTCLR Register FIELD...
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.3.11 LCD Upper Panel and Lower Panel Frame Buffer Current Address Register (UPCURR and LPCURR) UPCURR and LPCURR are registers that contain an approximate value of the upper and lower panel data DMA addresses when read. The registers can change at any time and provide a coarse indication of the current LCD DMA memory pointer.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.3.12 256 × 16-bit Color Palette Register (PALETTE) The PALETTE Registers contain 256 palette entries organized as 128 locations of two entries per word. TFT displays use 12 of the palette entry bits. Each word location contains two palette entries.
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.4 ALI Register Reference The base address for the ALI is: 0xFFFE4000 Locations at offsets 0x010 through 0xFFF are reserved and must not be used during normal operation. 4.5.5 ALI Memory Map Table 4-42.
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.6.2 Control Register (ALICTRL) ALICTRL is the Control Register. It enables and controls output signals. Table 4-45. ALICTRL Register FIELD RESET FIELD RESET ADDR 0xFFFE4000 + 0x004 Table 4-46. ALICTRL Fields BITS...
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.5.6.3 Timing Delay Register 1 (ALITIMING1) The ALITIMING1 Register is used for various delays values for output signals. All delays are specified in number of LCD clock (LCDDCLK) periods. Table 4-47. ALITIMING1 Register...
LH79524/LH79525 User’s Guide Color Liquid Crystal Display Controller 4.5.6.4 Timing Delay Register 2 (ALITIMING2) The ALITIMING2 Register is used for various delay values for output signals. All delays are specified in number of LCD clock (LCDDCLK) periods. Table 4-49. ALITIMING2 Register...
Color Liquid Crystal Display Controller LH79524/LH79525 User’s Guide 4.6 Timing Waveforms This section describes typical output waveform diagrams for the CLCDC and the ALI. 4.6.1 STN Horizontal Timing Figure 4-6 shows typical horizontal timing waveforms for STN panels. In this figure, the CLCDC Clock (an input to the CLCDC) is scaled within the CLCDC and used to produce the LCDDCLK output.
Chapter 5 Direct Memory Access Controller The DMA Controller in the LH79524/LH79525 is identical in each SoC; all descriptions in this chapter apply to both devices. The DMA Controller provides four concurrent data streams and three modes of transfer: • Memory to Memory (selectable on Stream 3 only) •...
Page 145
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.1 Theory Of Operation The SoC uses a central DMA Controller to service all DMA requirements for DMA-capable devices. The DMA Controller provides DMA support for the DMA-capable peripherals listed in Table 5-1. The DMA Controller has an APB slave port for programming its registers and an AHB port for data transfers.
LH79524/LH79525 User’s Guide Direct Memory Access Controller The DMA process comprises: The external request signal (DREQ) starts a peripheral DMA transfer. The DMA Controller requests use of the AHB. When the AHB arbiter grants the AHB to the DMA Controller, the DMA Controller fills its FIFO with the number of data units specified by the burst length (1, 4, 8, or 16).
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.1.3 Interrupt, Error, and Status Registers The DMA Controller provides Interrupt, Error, and Status Registers for controlling the gen- eration of an interrupt, error-handling control, and active-stream monitoring. Each stream has its own interrupt flag, which is set after the last transfer completes. Each of the four interrupt flags can be masked and cleared independently.
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2 Register Reference This section provides the DMA Controller register memory mapping and bit fields. 5.2.1 Memory Map Each stream has the identical set of 11 registers. The base address for each stream is shown in Table 5-2.
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.2.2 Register Definitions 5.2.2.1 Source Base Registers (SOURCELO and SOURCEHI) The two 16-bit Source Base Registers contain the 32-bit source base address for the next DMA transfer. When the DMA Controller is enabled, the contents of the Source Base Reg- isters load into the Current Source Address Register.
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2.2.2 Destination Base Registers (DESTLO and DESTHI) The two 16-bit Destination Base Register contain the 32-bit destination base address for the next DMA transfer. When the DMA Controller is enabled, the contents of the Destina- tion Base Address Registers load into the Current Destination Address Register.
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.2.2.3 Maximum Count Register (MAX) The Maximum Count Register must be programmed with the maximum number of data units of the next DMA transfer. A data unit equals the source-to-DMA data width (byte, half- word or word).
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2.2.4 Control Register (CTRL) The Control Register contains the configuration of the DMA Controller. Constraints on the field values based on the stream type are defined in Table 5-18. Where a value appears in this table, that is the only valid value for that stream, and the field must be programmed to this value.
Direct Memory Access Controller LH79524/LH79525 User’s Guide Table 5-15. CTRL Fields (Cont’d) NAME DESCRIPTION Peripheral Burst Size Defines the number of peripheral data units in the peripheral burst. Using the peripheral as the destination, the DMA interface SOBURST automatically reads the correct number of source words to compile a trans- action.
LH79524/LH79525 User’s Guide Direct Memory Access Controller Table 5-18. Constraints on CTRL Field Values Based on Stream Type STREAM DESIZE SOBURST SOSIZE DEINC SOINC TYPE SSPRX (Stream 0) All valid values 00 or 10 SSPTX (Stream 1) 00 or 10...
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.2.2.5 Current Source Registers (CURSHI and CURSLO) The Current Source Registers are 16-bit Read Only registers that hold the current value of the source address pointer. The value in the registers is used as an AHB address in a source-to-DMA data transfer over the AHB.
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2.2.6 Current Destination Registers (CURDHI and CURDLO) The Current Destination Registers are 16-bit Read Only registers that hold the current value of the destination address pointer. The value in the registers is used as an AHB address in a DMA-to-destination data transfer over the AHB.
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.2.2.7 Terminal Count Register (TCNT) The Terminal Count Register is a 16-bit Read Only register that contains the number of data units remaining in the current DMA transfer. The data unit is equal to the source-to- DMA data width (byte, half-word or word).
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2.2.8 Interrupt Mask Register (MASK) The MASK Register allows enabling and disabling (masking) DMA interrupts. Program with a 1 to enable, and a 0 to disable individual interrupts. Table 5-29. MASK Register FIELD...
Direct Memory Access Controller LH79524/LH79525 User’s Guide 5.2.2.9 Interrupt Clear Register (CLR) The Interrupt Clear Register clears the status flags. Writing a 1 to a bit clears the interrupt status bit in the STATUS register. This register has an indeterminate value after Reset.
LH79524/LH79525 User’s Guide Direct Memory Access Controller 5.2.2.10 Status Register (STATUS) The STATUS Register provides status information about the DMA Controller interrupts. The interrupt status bits are cleared by writing to the CLR register. The INT[3:0] bits are the data stream interrupt flags corresponding to data stream 0 through data stream 3.
Page 161
Direct Memory Access Controller LH79524/LH79525 User’s Guide Table 5-34. STATUS Fields (Cont’d) NAME DESCRIPTION Data Stream 3 Error Interrupt Contains the status of the data stream 3 error interrupt. ERRORINT3 1 = Error-interrupt asserted 0 = Error-interrupt not asserted Data Stream 2 Error Interrupt Contains the status of the data stream 2 error interrupt.
Chapter 6 Ethernet MAC Controller The on-board Ethernet Media Access Controller (EMAC) is compatible with IEEE 802.3, and has passed the University of New Hampshire (UNH) testing. It supports both 10- and 100-Mbit/s transfer rates, and full and half duplex operation. Other features include: •...
The EMAC is identical for both the LH79524 and LH79525, and all descriptions in this chapter apply to both devices. Following the Theory of Operation section is a programming example.
The Statistics and Control Registers are accessed by the core via the APB, through the Register Interface. The Statistics Registers log a wide range of network statistics for use by the LH79524/LH79525 software, RMON/MIB, or other uses. The control registers allow software to define network parameters, enable and disable the Receive and Transmit Blocks, enable and disable interrupts, view status information, and also implement the MDIO interface to manage the PHY.
EMAC, buffers, DMA, and specific operation. 6.1.2 Memory Interface Ethernet frame data is stored in LH79524/LH79525 system memory. It is transferred to and from the Ethernet MAC through the DMA interface. All transfers are 32-bit words and may be single accesses, or bursts of 2, 3, or 4 words (transfers for the LH79525 are auto- matically parsed into two 16-bit transfers to accommodate its 16-bit data bus).
LH79524/LH79525 User’s Guide Ethernet MAC Controller Each Receive Buffer Descriptor List entry comprises two words. The first word contains only the address of the receive buffer; the second word contains the receive status. If the length of a receive frame exceeds the buffer length, the status word for the used buffer is written with zeroes except for the Start Of Frame bit and the offset bits, if appropriate.
Page 167
Ethernet MAC Controller LH79524/LH79525 User’s Guide To receive frames, the buffer descriptors must be initialized by writing an appropriate address to bits [31:2] in the first word of each list entry. Bit zero must be written with 0. Bit one is the wrap bit and indicates the last entry in the list.
LH79524/LH79525 User’s Guide Ethernet MAC Controller A Receive Overrun condition occurs when either the AHB bus was not granted in time or because the response was ‘Not OK’. In a Receive Overrun condition, the Receive Overrun Interrupt is asserted and the buffer currently being written is recovered. The next received...
Page 169
Ethernet MAC Controller LH79524/LH79525 User’s Guide Before transmitting frames, the buffer descriptors must be initialized by writing an appro- priate address to bits [31:0] in the first word of each list entry. The second transmit buffer descriptor is initialized with control information that indicates the length of the buffer, whether or not it is to be transmitted with a CRC, and whether the buffer is the last buffer of the frame.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.1.3 Receive Block The Receive Block checks for a valid preamble, FCS, alignment, and length; presents received frames to the DMA Block; and stores the frame’s destination address for use by the Address Checking Block.
Ethernet MAC Controller LH79524/LH79525 User’s Guide The Back-Off Time is based on an Exclusive OR of the 10 least-significant bits of the data stream from the transmit FIFO and a 10-bit pseudo-random number generator. The num- ber of bits used depends on the number of collisions seen. After the first collision one bit is used, the second two, and so on up to 10.
LH79524/LH79525 User’s Guide Ethernet MAC Controller If either NETCTL: is programmed to 1, a pause frame TXZEROQ or NETCTL:TXPAUSEFM will be transmitted only if full duplex is selected in the NETCONFIG register, and transmit is enabled in the NETCTL register. Pause frame transmission occurs immediately if trans- mit is inactive or if transmit is active between the current frame and the next frame due to be transmitted.
Ethernet MAC Controller LH79524/LH79525 User’s Guide The destination address of received frames is compared against the data stored in the specific address registers once they have been programmed. The addresses are deacti- vated at reset or when their corresponding specific address register bottom is written. They are activated when specific address register top is written, preventing a partial address from becoming active.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.1.5.4 Type ID Checking The contents of the IDCHK register are compared against the Length/Type ID of received frames. Bit 22 in the Receive Buffer Descriptor List is 1 if there is a match (see Table 6-1).
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.2.1 Initialization Initialization of the EMAC configuration must be done while the transmit and receive cir- cuits are disabled. See the descriptions of the Network Control register and Network Con- figuration register in Register Reference section.
LH79524/LH79525 User’s Guide Ethernet MAC Controller HASH ADDRESS REGISTERS DESTINATION ADDRESS (CONTAINED IN INDEX RECEIVED FRAME) MATCH HASH MATCH 1 SPECIFIC ADDRESS 1 MATCH 2 SPECIFIC ADDRESS 2 MATCH 3 SPECIFIC ADDRESS 3 MATCH 4 SPECIFIC ADDRESS 4 LH79525-65 Figure 6-2. Address Matching The RXBQP register points to the next entry in the Receive Buffer Descriptor List and the EMAC uses this as the address in system memory to which the frame is written.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.2.1.2 Transmit Buffer List Transmit data is read from buffers assigned to system memory. These buffers are described in the Transmit Buffer Queue, which is a sequence of Transmit Buffer Descriptor entries as defined in Table 6-2.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.2.1.5 PHY Maintenance The PHYMAINT register enables the EMAC to communicate with a PHY using the MDIO interface. It is used during auto-negotiation to ensure that the EMAC and the PHY are con- figured for the same speed and either half- or full-duplex configuration.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3 Register Reference This section provides the EMAC register memory mapping and bit fields. 6.3.1 Memory Map The base address for the EMAC is 0xFFFC7000. Table 6-5 Summarizes the EMAC registers. There are three types of registers in the EMAC: control, configuration, and status registers;...
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2 Control, Configuration, And Status Register Definitions 6.3.2.1 Network Control Register (NETCTL) The NETCTL register allows configuration and testing of the SoC on the network. Table 6-6. NETCTL Register FIELD RESET TYPE FIELD RESET...
Page 182
LH79524/LH79525 User’s Guide Ethernet MAC Controller Table 6-7. NETCTL Fields (Cont’d) BITS NAME FUNCTION Write Enable for Statistics Registers Makes the statistics registers writable for functional test purposes. WRENSTAT 1 = Make statistics registers writable 0 = No action Increment Statistics Registers Increment all the statistics registers by one for test purposes.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.2 Network Configuration Register (NETCONFIG) This register allows general network configuration. Table 6-8. NETCONFIG Register FIELD RESET TYPE FIELD RESET TYPE ADDR 0xFFFC7000 + 0x04 Table 6-9. NETCONFIG Fields BITS NAME FUNCTION 31:20 Reserved Reading returns 0. Write the reset value.
Page 184
LH79524/LH79525 User’s Guide Ethernet MAC Controller Table 6-9. NETCONFIG Fields (Cont’d) BITS NAME FUNCTION Retry Test Must be programmed to 0 for normal operation. If programmed to 1, the delay between collisions will always be one slot time. Setting this bit to 1 helps testing the ‘Too Many Entries’...
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.3 Network Status Register (NETSTATUS) The NETSTATUS register is a read-only register that reports status of the PHY and MDIO. Table 6-10. NETSTATUS Register FIELD RESET TYPE FIELD RESET — — TYPE ADDR 0xFFFC7000 + 0x08 Table 6-11.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.2.4 Transmit Status Register (TXSTATUS) This register provides transmit status details. Individual bits may be cleared by writing 1 to them. It is not possible to program a bit to 1 by writing to the register.
Page 187
Ethernet MAC Controller LH79524/LH79525 User’s Guide Table 6-13. TXSTATUS Fields (Cont’d) BITS NAME FUNCTION Buffers Exhausted Mid-Frame If the buffers run out of data during transmission of a frame, transmission stops. When this happens, FCS is bad and the Transmit Error (ETHERTXER) pin is asserted.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.2.5 Receive Buffer Queue Pointer (RXBQP) This register points to the entry in the receive buffer queue (descriptor list) currently being used. It is written with the start location of the receive buffer descriptor list. The lower order bits increment as buffers are used up and wrap to their original values after either 1,024 buffers, or when bit 1 of the entry is set.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.6 Transmit Buffer Queue Pointer (TXBQP) This register points to the entry in the transmit buffer queue (descriptor list) currently being used. It is written with the start location of the transmit buffer descriptor list. The lower order bits increment as buffers are used up and wrap to their original values after either 1,024 buffers, or when the wrap bit of the entry is set.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.2.7 Receive Status Register (RXSTATUS) Read this register to obtain details of the status of a receive. Once read, individual bits may be cleared by writing 1 to them. It is not possible to set a bit to 1 by writing to the register Table 6-18.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.8 Interrupt Status Register (INSTATUS) The EMAC generates a single interrupt. This register indicates the source of this interrupt. For test purposes each bit can be set or reset by directly writing to the interrupt status reg- ister regardless of the state of the mask register.
Page 192
LH79524/LH79525 User’s Guide Ethernet MAC Controller Table 6-21. INSTATUS Fields (Cont’d) BITS NAME FUNCTION Transmit Complete Denotes a frame has been successfully trans- mitted. This bit is reset to 0 when read. TXCOMPLETE 1 = Transmit complete 0 = No complete transmit Transmit Buffers Exhausted In Mid-frame The transmit buffers have run out of data before the transmission of the frame completed.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.9 Interrupt Enable Register (ENABLE) At reset all interrupts are disabled. Writing a 1 to the relevant bit location enables the required interrupt. This register is write only Table 6-22. ENABLE Register FIELD RESET...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.2.10 Interrupt Disable Register (DISABLE) This register is used to disable individual interrupts. All interrupts are disabled following a reset. Writing a 1 to the relevant bit location disables that particular interrupt. This register is write only.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.11 Interrupt Mask Register (MASK) The MASK register is a read-only register that shows the status of the interrupt based on what has been written to the ENABLE and DISABLE registers. As all interrupts are dis- abled following reset, the interrupt bits in this register are reset to 1.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.2.12 PHY Maintenance Register (PHYMAINT) This register enables the EMAC to communicate with a PHY by means of the MDIO inter- face. It is used during auto negotiation to ensure that the EMAC and the PHY are config- ured for the same speed and duplex configuration.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.2.13 Pause Time Register (PAUSETIME) The PAUSETIME register contains the current value of PAUSETIME, which is decre- mented once every 512 bit-times (one slot time). Table 6-30. PAUSETIME Register FIELD RESET TYPE FIELD PAUSETIME...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3 Statistics Register Definitions Statistics registers accumulate statistics for software drivers, RMON applications, and other uses. Reading statistics registers resets the counts to zero. If they are not read before reaching maximum count, the count does not wrap, but sticks at all 1s. The receive statistics registers only increment when the NETCTL:RXEN is programmed to 1.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.2 Frames Transmitted OK (FRMTXOK) This is a 24-bit register counting the number of frames successfully transmitted (no under- run and no excessive retry errors). Table 6-36. FRMTXOK Register FIELD FRMTXOK RESET TYPE FIELD...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3.4 Multiple Collision Frames (MULTFRM) This register counts the number of frames that experienced between two and 15 collisions before successful transmission. Table 6-40. MULTFRM Register FIELD RESET TYPE FIELD MULTFRM RESET TYPE ADDR 0xFFFC7000 + 0x48 Table 6-41.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.6 Frame Check Sequence Errors (FRCHK) This register hold the count of frames an integral number of bytes-long, have a bad CRC, and are between 64 and 1,518 bytes in length (1,522 if NETCONFIG:RECBYTE is 1).
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3.8 Deferred Transmission Frames (DEFTXFRM) This is a 16-bit register containing the number of frames experiencing deferral due to carrier sense being active on their first attempt at transmission. Frames involved in any col- lision are not counted nor are frames that experienced a transmit underrun.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.10 Excessive Collisions (EXCOL) This register compiles the number of frames not transmitted due to more than 16 collisions occuring during transmission attempts. Table 6-52. EXCOL Register FIELD RESET TYPE FIELD EXCCOL RESET TYPE...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3.12 Carrier Sense Errors (SENSERR) This register counts the number of Carrier Sense errors. Table 6-56. SENSERR Register FIELD RESET TYPE FIELD SENSERR RESET TYPE ADDR 0xFFFC7000 + 0x68 Table 6-57. SENSERR Fields BITS...
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.13 Receive Resource Errors (RXRERR) This register counting the number of frames that were address matched but could not be copied to memory because no receive buffer was available. Table 6-58. RXRERR Register FIELD...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3.15 Receive Symbol Errors (RXSYMERR) This register counts the number of frames that had ETHERRXER asserted during reception. Table 6-62. RXSYMERR Register FIELD RESET TYPE FIELD RXSYMERR RESET TYPE ADDR 0xFFFC7000 + 0x74 Table 6-63. RXSYMERR Fields...
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.17 Receive Jabbers (RXJAB) This is an 8-bit register containing the number of frames received exceeding 1,518 bytes (1,522 if NETCONFIG:RECBYTE is 1) in length and have either a CRC error, an alignment error, or a receive symbol error Table 6-66.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.3.19 SQE Test Errors (SQERR) This 8-bit register contains the number of frames where the ETHERCOL pin was not asserted within 96 bit times (one inter-frame gap) of the ETHERTXEN pin being deas- serted in half-duplex mode.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.3.21 Transmitted Pause Frames (TXPAUSEFM) This register contains the number of Pause Frames transmitted. Table 6-74. TXPAUSEFM Register FIELD RESET TYPE FIELD TXPAUSEFM RESET TYPE ADDR 0xFFFC7000 + 0x8C Table 6-75. TXPAUSEFM Fields BITS...
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.4 Matching Registers The matching registers allow programming specific addresses or Type IDs for matching with incoming frames. 6.3.4.1 Hash Register Bottom (HASHBOT) This register contains the low-order bits of the Hash Address Register (bits [31:0]). For more information, see Section 6.1.5.2 for more information on hash addressing.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.4.3 Specific Address 1 Bottom (SPECAD1BOT) This register contains the least-significant bits (bits [31:0]) of the destination address. Bit zero indicates whether the address is multicast or unicast and corresponds to the least significant bit of the first byte received .
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.4.5 Specific Address 2 Bottom (SPECAD2BOT) This register contains the least-significant bits of the destination address (bits [31:0]). Bit zero indicates whether the address is multicast or unicast and corresponds to the least significant bit of the first byte received.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.4.7 Specific Address 3 Bottom (SPECAD3BOT) This register contains the least-significant bits of the destination address (bits [31:0]). Bit zero indicates whether the address is multicast or unicast and corresponds to the least significant bit of the first byte received.
LH79524/LH79525 User’s Guide Ethernet MAC Controller 6.3.4.9 Specific Address 4 Bottom (SPECAD4BOT) This register contains the least-significant bits of the destination address (bits [31:0]). Bit zero indicates whether the address is multicast or unicast and corresponds to the least significant bit of the first byte received Table 6-92.
Ethernet MAC Controller LH79524/LH79525 User’s Guide 6.3.4.11 Type ID Checking (IDCHK) This register contains the TypeID/Length to compare to received frames. Table 6-96. IDCHK Register FIELD RESET TYPE FIELD IDCHK RESET TYPE ADDR 0xFFFC7000 + 0xB8 Table 6-97. TypeIDCheck Fields...
• Low transaction latency • Read and Write buffers to reduce latency and to improve performance • 8-bit and 16-bit wide static memory support (32-bit support in the LH79524) • 16-bit wide synchronous SDRAM memory support (32-bit support in the LH79524) •...
CS10V register, described in Section 3.2.3. 7.2 Static Memory The static memory interface is externally asynchronous. However, the LH79524/LH79525 generates the external asynchronous signals using the internal system clock to synchro- nously control the switching. Thus, the timing of static memory signals is easily referenced to the internal system clock frequency.
External Memory Controller LH79524/LH79525 User’s Guide INTERNAL TO EXTERNAL TO THE LH79524/LH79525 THE LH79524/LH79525 MEMORY WIDTH NOTE: MEMORY WIDTH (SCONFIGx:MW) 00 = 8 BIT 01 = 16 BIT 10 = 32 BIT LH79525-114 Figure 7-2. Automatic Address Shifting Version 1.0...
LH79524/LH79525 User’s Guide External Memory Controller 7.2.2 Hardware Design Automatic address shifting makes hardware design much simpler. This section provides a description and guide for hardware design and interfacing. 7.2.2.1 Address Connectivity Rather than connecting different address pins to different memory devices depending on the width, SoC address pin A0 always connects to device pin A0, SoC address pin A1 to device pin A1, continuing through SoC pin A23 connecting to device pin A23.
LH79524/LH79525 User’s Guide External Memory Controller 7.2.3 Software Design For the bulk of software designs, the automatic address shifting is completely transparent and no software considerations are needed. However, in instances where software must control the signal on a specific address pin, the design must account for any address shifting.
‘B’ = SWAITWRx; ‘C’ = the 1 HCLK-cycle address delay; ‘D’ = SWAITOENx; and ‘E’ = SWAITRD. These diagrams are intended solely to illustrate programming effects. Actual timing diagrams and timing tables appear in the LH79524/LH79525 Data Sheet. 7-10 Version 1.0...
LH79524/LH79525 User’s Guide External Memory Controller 7.2.4.1.1 Read Cycle Wait States Figure 7-10 shows the Read cycle with zero wait states. As shown in the Figure, SWAIT- OENx and SWAITRDx (refer to Section 7.5.2.23 and Section 7.5.2.24 for register descrip- tions) are both programmed to zero, for minimum Read Cycle time.
External Memory Controller LH79524/LH79525 User’s Guide In Timing B, three wait states are also illustrated. However, in this case, the three wait states have been programmed by setting SWAITRDx to 0x2 and SWAITOENx to 0x1. In this case, nOE does not become asserted at the same time as nCSx. Instead, nOE is delayed by the number of HCLK periods enumerated by SWAITOENx, which in this case is one, represented by time ‘D1’.
LH79524/LH79525 User’s Guide External Memory Controller The total Read cycle time is the time that the address is valid (in the figures, until the end of the ‘C’ time). In general, Read wait states can be derived from the following equation: tRC (Read cycle time) = tD1 + tD2 + ...
Page 229
External Memory Controller LH79524/LH79525 User’s Guide In the Figure, nCSx is asserted coincident (with a small propagation delay) with the address becoming valid (Valid Address in the Figure). Data becomes valid another small propaga- tion delay later. Unlike Read transactions, nWE (or nBLEx) assertion is always delayed one HCLK cycle, time ‘A0’...
LH79524/LH79525 User’s Guide External Memory Controller TIMING A HCLK A[23:0] VALID ADDRESS D[31:0] VALID DATA nCSx nWE or nBLEx NOTES: With Register Programming: SWAITWENx = A = 0x0 SWAITWRx = B = 0x2 C = Address hold TIMING B nCSx...
The system clock cycle in which the nCSx signal is asserted counts as the first wait state. Timing diagrams and extensive descrip- tions appear the the LH79524/LH79525 Data Sheet. 7-16 Version 1.0...
NAND Flash control pins. Connection of the SoC to the NAND Flash is illustrated in Figure 7-14. During boot, the Boot ROM in the LH79524/LH79525 automatically controls the logic to present the proper signals at the proper times on the address lines acting as control sig- nals.
External Memory Controller LH79524/LH79525 User’s Guide Table 7-2. Boot Configuration for Silicon Version A.0 PC[7:4] DEVICE TYPE DATA BUS WIDTH CONTROL nBLEx LOW for Reads NOR Flash or SRAM 16-bit NOR Flash or SRAM 16-bit nBLEx HIGH for Reads NOR Flash or SRAM...
External Memory Controller LH79524/LH79525 User’s Guide 7.3.2 General NAND Flash Access At all other times but boot, all address lines function as addresses, and the NAND Flash control signals must be generated by the application software. Unlike booting, where the internal boot code automatically translates the addresses as required by the data width, in general application use, the software must perform this translation prior to writing to the NAND Flash.
With all control signals FALSE, the address of the location to be written in the NAND Flash is placed on the LH79524/LH79525 D[15:0] pins (‘A’ in the Figure). Software, with the proper signals on D[15:0], then programs a Write to location 0xCXXX10, causing ALE and nFWE to go HIGH (‘B’).
External Memory Controller LH79524/LH79525 User’s Guide 7.4 Dynamic Memory 7.4.1 Write-protection Each dynamic memory Chip Select can be configured for write-protection by setting the rel- evant bit in the write-protect field in the DYNCFGx register (DYNCFGx:P). If a write access is performed to a write-protected memory bank, an ERROR response is generated on the HRESP[1:0] signal.
LH79524/LH79525 User’s Guide External Memory Controller 7.4.4 Data Mask Signals Depending on the external memory system width and the operand size, one or two mem- ory cycles may be required for operand transfer. The Data Mask signals (DQM[3:0]) select the data phase for each cycle, as shown in Table 7-9.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2 Register Definitions 7.5.2.1 Control Register (CONTROL) The CONTROL Register controls the memory controller operation. The control bits can be altered during normal operation. Table 7-11. CONTROL Register FIELD RESET TYPE FIELD RESET TYPE...
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.2 Status Register (STATUS) The STATUS Register provides memory controller status information. Table 7-13. STATUS Register FIELD RESET TYPE FIELD RESET TYPE ADDR 0xFFFF1000 + 0x004 Table 7-14. STATUS Fields BITS NAME FUNCTION 31:3 Reserved Reading returns 0.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.3 Configuration Register (CONFIG) The CONFIG Register configures the operation of the memory controller. This register must only be modified during system initialization, or when there are no cur- rent or outstanding transactions. Software can ensure that there are no current or out- standing transactions by waiting until the memory controller is idle, then entering Low- Power Mode (CONTROL:MODE = 1), or Disable Mode (CONTROL:ENABLE = 0).
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.4 Dynamic Memory Control Register (DYNMCTRL) The Dynamic Memory Control Register is used to control dynamic memory operation. The control bits can be altered during normal operation. Table 7-17. DYNMCTRL Register FIELD RESET TYPE...
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.5 Dynamic Refresh Register (DYNMREF) This register configures dynamic memory operation. This register should only be modified during system initialization, or when there are no current or outstanding transactions. Software can ensure that there are no current or outstanding transactions by waiting until the memory controller is idle, then entering Low-Power Mode (CONTROL:MODE = 1), or Disable Mode (CONTROL:ENABLE = 0).
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.6 Dynamic Memory Read Configuration Register (DYNMRCON) This register allows configuration of the dynamic memory Read strategy. This register should only be modified during initialization. This register provides the Read strategy for all four dynamic memory Chip Select signals. The DYNMRCON resets to 0x00, which is invalid.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.7 Dynamic Precharge Command Period Register (PRECHARGE) The Dynamic Memory Precharge Command Period Register programs the Precharge Command Period, tRP. This value is normally found in SDRAM data sheets as tRP. This register must only be modified during system initialization, or when there are no current or outstanding transactions.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.8 Dynamic Memory Active to Precharge Command Period Register (DYNM2PRE) The Dynamic Memory Active to Precharge Command Period Register enables program- ming the Active to Precharge Command Period, tRAS. This value is normally found in...
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.9 Dynamic Memory Self-Refresh Exit Time Register (REFEXIT) The Dynamic Memory Self-Refresh Exit Time Register enables programming the Self-refresh Exit Time, tSREX. This value is normally found in SDRAM data sheets as . This register is used as the self-refresh exit time for all chip selects. Therefore, it SREX must be programmed with the longest exit time period required of all the chip selects.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.10 Dynamic Memory Last Data Out to Active Time Register (DOACTIVE) The Dynamic Memory Last Data Out to Active Time Register enables programming the Last-data-out to Active Command Time, tAPR. This value is normally found in SDRAM data sheets as tAPR.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.11 Dynamic Memory Data-In to Active Time Register (DIACTIVE) The Dynamic Memory Data-In to Active Time Register enables programming the Data-in to Active Command time, tDAL. This value is normally found in SDRAM data sheets as tDAL, or tAPW.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.12 Dynamic Memory Write Recovery Time Register (DWRT) The Dynamic Memory Write Recovery Time Register enables programming the Write Recovery Time, tWR. This value is normally found in SDRAM data sheets as tWR, tDPL, tRWL, or tRDL.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.13 Dynamic Memory Active to Active Command Period Register (DYNACTCMD) The Dynamic Memory Active to Active Command Period Register enables programming the Active to Active Command Period, tRC. This value is normally found in SDRAM data sheets as tRC.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.14 Dynamic Memory Auto-Refresh Period, and Auto-Refresh to Active Command Period Register (DYNAUTO) The Dynamic Memory Auto-Refresh Period, and Auto-Refresh to Active Command Period Register enables programming the Auto-refresh Period, and Auto-refresh to Active Com- mand Period, tRFC.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.15 Dynamic Memory Exit Self-Refresh to Active Command Time Register (DYNREFEXIT) The Dynamic Memory Exit Self-Refresh to Active Command Time Register selects the Exit Self-refresh to Active Command Time, tXSR. This value is normally found in SDRAM data sheets as tXSR.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.16 Dynamic Memory Active Bank A to Active Bank B Time Register (DYNACTIVEAB) The Dynamic Memory Active Bank A to Active Bank B Time Register programs the active bank A to active bank B latency, tRRD. This value is normally found in SDRAM data sheets as tRRD.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.17 Dynamic Memory Load Mode Register to Active Command Time Register (DYNAMICTMRD) The Dynamic Memory Load Mode Register to Active Command Time Register specifies the Load Mode Register to Active Command Time, tMRD. This value is normally found in SDRAM data sheets as tMRD, or tRSA.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.18 Static Memory Extended Wait Register (WAIT) The Static Memory Extended Wait Register is used to time long static memory read and write transfers (longer than can be supported by the SWAITRD or SWAITWR registers) when the EW bit of the SCONFIG register is enabled.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.19 Dynamic Configuration Register for nDCS0 and nDCS1 (DYNCFGx) The Dynamic Configuration Register specifies the configuration information for the rele- vant dynamic memory Chip Select. These registers are normally only modified during sys- tem initialization.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.20 Dynamic Memory RAS and CAS Delay Register for nDCS0 and nDCS1 (DYNRASCASx) The Dynamic Memory RAS and CAS Delay Register selects the RAS and CAS latencies for the relevant dynamic memory. Note that the same value must be programmed into the device’s Mode register.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.21 Static Memory Configuration Register (SCONFIGx) The Static Memory Configuration Registers are used to configure the static memory configuration. These registers must only be modified during system initialization, or when there are no current or outstanding transactions. Software can ensure that there are no current or outstanding transactions by waiting until the memory controller is idle, then entering Low-Power Mode (CONTROL:MODE = 1), or Disable Mode (CONTROL:ENABLE = 0).
Page 268
LH79524/LH79525 User’s Guide External Memory Controller Table 7-53. SCONFIGx Fields (Cont’d) BITS NAME FUNCTION Extended Wait Extended wait uses the WAIT register to time both the read and write transfers rather than the SWAITRD and SWAITWR registers. This enables much longer transactions.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.22 Static Memory Write Enable Delay Registers (SWAITWENx) The Static Memory Write Enable Delay Registers allow programming a delay between Address Valid and the assertion of nWE (nBLEx). See Section 7.2.4.1.2 for a complete description of programming these registers.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.23 Static Memory Output Enable Delay Registers (SWAITOENx) The Static Memory Output Enable Delay Registers enable programming the delay from the Valid Address to nOE assertion. See Section 7.2.4.1.1 for a complete description of pro- gramming these registers.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.24 Static Memory Read Delay Registers (SWAITRDx) The Static Memory Read Delay Registers enable programming Read cycle wait states. A complete description of programming this register appears in Section 7.2.4.1.1. The total Read cycle time is the total time that the address is valid. During this time, several parameters are programmable.
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.25 Static Memory Page Mode Read Delay Registers (SWAITPAGEx) The Static Memory Page Mode Read Delay Registers enable programming the delay for Asynchronous Page Mode sequential accesses. These registers must only be modified during system initialization, or when there are no current or outstanding transactions.
External Memory Controller LH79524/LH79525 User’s Guide 7.5.2.26 Static Memory Write Delay Registers (SWAITWRx) The Static Memory Write Delay Registers enable programming the number of Write wait states. See Section 7.2.4.1.2 for a complete description of programming these registers. Wait states behave slightly differently for Write transactions than for Reads. Instead of the length of the Write cycle (tWC) being the sum of the valued programmed into the SWAITWENx and SWAITWRx registers, it has the following relationship (with ‘A’...
LH79524/LH79525 User’s Guide External Memory Controller 7.5.2.27 Static Memory Turn Around Delay Registers (STURNx) The Static Memory Turn Around Delay Registers enable programming the number of bus turnaround cycles. These registers must only be modified during system initialization, or when there are no current or outstanding transactions.
The LH79524 and LH79525 have a robust set of General Purpose Input/Output (GPIO) pins that can be used for any required input or output function. The LH79524 has 14 ports, providing 108 pins of GPIO. The LH79525 has 11 ports, with 86 individual pins. All descrip- tions, unless noted, apply to both the LH79524 and LH79525.
Table 8-2 and Table 8-3 show the multiplexed functions of each GPIO pin. In the case of Port J and Port M, the reset function is not GPIO, hence those functions are listed in the ‘Multiplexed Function’ column. Table 8-2. LH79524 GPIO Multiplexing CABGA AT RESET...
LH79524/LH79525 User’s Guide General Purpose Input/Output 8.2 Register Reference This section describes the location and programming of the GPIO registers. Registers are denoted with an ‘x’ that is replaced with the port letter of the register. For example, the Port A Data Direction Register is P1DDRA.
• The current value on the corresponding port pin if configured as an input. Port K is only available on the LH79524. Port M is an output only port. This register will not input values from the Port M pins.
Reserved Reading this field returns 0. Write the reset value. Port Input/Output Data Contains the bit-by-bit Port input or output data, depending on how the corresponding bit in the P1DDRx Register is PORT_DATA programmed. Note that Port N consists of 4 bits and exists on LH79524 only. Version 1.0...
Port E: 0xFFFDD000 + 0x08 ADDR Port G: 0xFFFDC000 + 0x08 Port I: 0xFFFDB000 + 0x08 Port K: 0xFFFDA000 + 0x08 (LH79524 Only) Port M: 0xFFFD9000 + 0x08 (Bits 7 and 6 LH79524 Only) Table 8-10. P1DDRx Fields BITS NAME DESCRIPTION 31:8 Reserved Writing to these bits has no effect.
Chapter 9 C Module The I C Module implements the Inter-IC bus (I C), and provides: • Two-wire synchronous serial interface • Operation in both the standard mode, for data rates up to 100 Mbits/s, and the fast mode, with data rates up to 400 Mbits/s •...
C Module LH79524/LH79525 User’s Guide 9.1 Theory of Operation The LH79524/LH79525 implements a two-wire I C Module capable of operating in either Master or Slave mode. The block conforms to the I C 2.1 Bus Specification for data rates up to 400 kbps. The two wires (pins) in the interface are SCL (serial clock) and SDA (serial data).
Page 289
LH79524/LH79525 User’s Guide C Module 9.1.1 Setting I C Clock Timing When the I C Module is in Master mode, the serial clock (SCL) is generated from HCLK, using two registers, ICHCNT and ICLCNT for timing parameters. When the I C Module is in Slave mode, SCL is provided by the Master.
C Module LH79524/LH79525 User’s Guide 9.1.2 Interrupt Handling In Slave mode, the I C Module handles address comparison, shifts data into or out of the ICDATA register, and generates ACK pulses at the appropriate times. In short, the inter- face hardware handles the bit-level operation of the protocol.
LH79524/LH79525 User’s Guide C Module 9.1.3 Slave Mode In slave-receiver mode, the I C Module interrupts the processor whenever an address or data byte has been received. The sequence is that the byte is received and acknowledged by the I C Module, then the processor is interrupted.
C Module LH79524/LH79525 User’s Guide 9.2 Register Reference This section provides the I C Module register memory mapping and bit fields. 9.2.1 Memory Map The base address for the I C Module is 0xFFFC5000. Table 9-3 summarizes the C Module registers.
LH79524/LH79525 User’s Guide C Module 9.2.2 Register Definitions 9.2.2.1 I C Configuration Register (ICCON) The ICCON register allows controlling the operating mode of the I C Module, operating parameters, and contains the flags used to start a transfer and to set the data direction.
C Module LH79524/LH79525 User’s Guide Table 9-5. ICCON Fields (Cont’d) BITS NAME DESCRIPTION Fast/Standard Speed Use this bit to set the transaction speed of the I C Module. SPEED 1 = Fast interface speed (400 kbit/s) 0 = Standard interface speed (100 kbit/s) C Enable This bit turns the I C Module on and off.
LH79524/LH79525 User’s Guide C Module 9.2.2.3 I C Upper Slave Address Register (ICUSAR) Software programs the ICUSAR register with the upper 2 address bits in 10-bit addressing mode, plus the read/write data direction (SRW) bit. This register is not used in Master mode.
C Module LH79524/LH79525 User’s Guide 9.2.2.5 I C Clock High Time Register (ICHCNT) The ICHCNT register allows programming the length of the serial clock HIGH time. Table 9-12. ICHCNT Register FIELD RESET TYPE FIELD HCNT RESET TYPE ADDR 0xFFFC5000 + 0x10 Table 9-13.
LH79524/LH79525 User’s Guide C Module 9.2.2.7 I C Status Register (ICSTAT) The ICSTAT register provides status regarding the state of the module. Table 9-16. ICSTAT Register FIELD RESET TYPE FIELD RESET TYPE ADDR 0xFFFC5000 + 0x1C Table 9-17. ICSTAT Fields...
Page 298
C Module LH79524/LH79525 User’s Guide Table 9-17. ICSTAT Fields (Cont’d) BITS NAME DESCRIPTION Full Flag Indicates that a byte of address or data has been received on the I C bus and written into the ICDATA register. This bit remains 1 until automatically cleared when the ICDATA Register is read by software or until the TXABORT bit is set to 1.
Page 299
Chapter 10 S Converter The Synchronous Serial Port (SSP) to I S converter is an interface that converts a syn- chronous serial communication stream in TI DSP-compatible mode into an I S compliant synchronous serial stream. The I S converter operates on serial data in both master and slave mode.
LH79524/LH79525 User’s Guide S Converter 10.1 Theory of Operation 10.1.1 Conversion The SSP-to-I S converter converts a data stream from the TIDSP format to the I S for- mat on transmit or from I S format to TI DSP format on receive. The TI DSP format is sup- ported by the SSP block and is fully described in the SSP Chapter.
S Converter LH79524/LH79525 User’s Guide The I S converter operates in both Master and Slave Modes. In Master Mode, the clock and word select inputs (SSPCLKOUT and SSPFSSOUT) are supplied by the SSP block. In slave mode, the clock and word select inputs are supplied by the external CODEC via the PB3/SSPCLK/I2SCLK and PB2/SSPFRM/I2SWS pins.
LH79524/LH79525 User’s Guide S Converter 10.1.3 Transmission 10.1.3.1 Master Mode Transmission During Master Mode transmission, the I S converter supplies the clock, frame output, and data (on the PB5/SSPTX/I2STXD/UARTTX0/UARTIRTX0 pin) to the external CODEC. The Master Mode clock is the SSP master mode clock, SSPCLKOUT, inverted as indi- cated by the CTRL:CLKINV bit.
S Converter LH79524/LH79525 User’s Guide 10.1.3.2 Slave Mode Transmission During Slave Mode transmission, the I S converter receives its clock (PB3/SSPCLK/I2SCLK) and frame input (PB2/SSPFRM/I2SWS) from the external CODEC. In response to the exter- nal CODEC signals, the I S transmits data on the PB5/SSPTX/I2STXD/UARTTX0/ UARTIRTX0 pin.
LH79524/LH79525 User’s Guide S Converter 10.1.4.2 Slave Mode Reception During Slave Mode reception, the I S converter receives its clock (PB3/SSPCLK/I2SCLK), frame input (PB2/SSPFRM/I2SWS) and data (PB4/SSPRX/I2SRXD/UARTRX0/ UARTIRRX0) from the external CODEC. The slave mode clock received by the SSP...
S Converter LH79524/LH79525 User’s Guide 10.1.5 Suppression of SSPFSSIN The assertion of SSPFSSIN to the SSP is suppressed under the following conditions: • When the channel indicated by the Transmit FIFO differs from the channel expected by the External Codec. Since the I...
LH79524/LH79525 User’s Guide S Converter 10.1.7 Interrupts The I S Converter can assert seven types of interrupts. Only the single combined interrupt, I2SINTR, goes to the VIC: • SSPPE — I S SSP Protocol Error Interrupt request (Frame size out of bounds), gener-...
S Converter LH79524/LH79525 User’s Guide 10.1.7.4 Receive Interrupt SSPRXINTR is the Receive Interrupt. This interrupt is asserted when there are four or more valid entries in the receive FIFO. The interrupt is cleared by reading the receive FIFO until there are three or fewer entries. This interrupt originates in the SSP.
LH79524/LH79525 User’s Guide S Converter 10.2 Register Reference This section describes the registers used in I S Converter. 10.2.1 Memory Map The base address for the I S Converter is 0xFFFC8000. Locations at offsets 0x018 through 0xFFF are reserved and must not be used during normal operation.
S Converter LH79524/LH79525 User’s Guide 10.2.2 Register Descriptions Note that SSP register bits duplicated in the I S Converter will lag the SSP version of the bit by one clock. 10.2.2.1 Control Register (CTRL) This register allows control of various I...
LH79524/LH79525 User’s Guide S Converter 10.2.2.1.1 Implementation of WSDEL WSDEL is used to delay the assertion of the frame input/output. During master mode, if WSDEL = 1, then the frame output from the SSP is delayed by one clock before being asserted on the PB2/SSPFRM/I2SWS pin.
S Converter LH79524/LH79525 User’s Guide 10.2.2.2 Status Register (STAT) This register reports various I S converter functions. All bits are read only. Table 10-5. STAT Register FIELD RESET FIELD TXWS RXWS RESET ADDR 0xFFFC8000 + 0x004 Table 10-6. STAT Register Definitions...
LH79524/LH79525 User’s Guide S Converter 10.2.2.3 Interrupt Mask Set or Clear Register (IMSC) On a Read, this register gives the current value of the mask on the relevant interrupt. Writ- ing 1 to the particular bit sets the mask, enabling the interrupt to be read. Writing 0 clears the corresponding mask.
S Converter LH79524/LH79525 User’s Guide 10.2.2.4 Raw Interrupt Status Register (RIS) This register provides the current raw status value of the corresponding interrupt prior to masking. Writing has no effect. For each bit, 1 = TRUE and 0 = FALSE.
LH79524/LH79525 User’s Guide S Converter 10.2.2.5 Masked Interrupt Status Register (MIS) This register provides the current masked status value of the corresponding interrupt. Writing has no effect; all bits are read only. For each bit, 1 = TRUE and 0 = FALSE.
S Converter LH79524/LH79525 User’s Guide 10.2.2.6 Interrupt Clear Register (ICR) This register is write only. Writing 1 causes the corresponding interrupt to be cleared. Writing 0 has no effect. The value written cannot be read back. Table 10-13. ICR Register...
Page 319
Chapter 11 I/O Configuration The I/O configuration controls: • Pin Muxing: Provides registers to program the pin muxing on the device. • Pull-up/Pull-down Resistors: Provides registers to control the pull-up and pull-down resistors on certain pins of the chip. 11.1 Theory of Operation The I/O Configuration (IOCON) is an AMBA slave block that connects to the APB.
I/O Configuration LH79524/LH79525 User’s Guide 11.2 Register Reference This section describes the registers used in I/O configuration. In all cases, when the MUX register is programmed its corresponding Resistor register (if it exists) must be programmed. The Resistor registers are not automatically configured.
Page 321
LH79524/LH79525 User’s Guide I/O Configuration Table 11-1. IOCON Register Summary ADDRESS NAME DESCRIPTION OFFSET 0x70 MUXCTL15 Muxing Control 15 For Pin nBLE0/PM4 0x74 RESCTL15 Resistor Control 15 Assignment for pin nBLE0/PM4 0x78 Reserved Do not access 0x7C Reserved Do not access...
11.2.2 Register Definitions 11.2.2.1 Multiplexing Control 1 Register (MUXCTL1) This Register allows software to configure pins . Bits PI2/ETHERCOL through PL0/LCDVD14 marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-2. MUXCTL1 Register FIELD RESET FIELD...
I/O Configuration 11.2.2.2 Resistor Configuration Control 1 Register (RESCTL1) The RESCTL1 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-4. RESCTL1 Register...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.3 Multiplexing Control 3 Register (MUXCTL3) The MUXCTL3 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-6. MUXCTL3 Register FIELD RESET FIELD INT4 RESET ADDR 0xFFFE5000 + 0x10 Table 11-7. MUXCTL3 Fields...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.5 Multiplexing Control 4 Register (MUXCTL4) The MUXCTL4 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-10. MUXCTL4 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x18 Table 11-11. MUXCTL4 Fields NAME...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.6 Resistor Configuration Control 4 Register (RESCTL4) The RESCTL4 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors Table 11-12. RESCTL4 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x1C Table 11-13. RESCTL4 Fields...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.7 Multiplexing Control 5 Register (MUXCTL5) The MUXCTL5 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-14. MUXCTL5 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x20 Table 11-15. MUXCTL5 Fields NAME...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.8 Resistor Configuration Control 5 Register (RESCTL5) The RESCTL5 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors Table 11-16. RESCTL5 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x24 Table 11-17. RESCTL5 Fields...
Page 329
LH79524/LH79525 User’s Guide I/O Configuration Table 11-17. RESCTL5 Fields (Cont’d) NAME DESCRIPTION Pin PB4/SSPRX/UARTRX1/UARTIRRX1 Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PB3/SSPCLK Resistor Assignment 00 = No Pull-Down or Pull-Up...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.9 Multiplexing Control 6 Register (MUXCTL6) The MUXCTL6 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-18. MUXCTL6 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x28 Table 11-19. MUXCTL6 Fields BIT NAME...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.10 Resistor Configuration Control 6 Register (RESCTL6) The RESCTL6 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-20. RESCTL6 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x2C Table 11-21. RESCTL6 Fields...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.11 Multiplexing Control 7 Register (MUXCTL7) The MUXCTL7 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-22. MUXCTL7 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x30 Table 11-23. MUXCTL7 Fields NAME...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.12 Resistor Configuration Control 7 Register (RESCTL7) The RESCTL7 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-24. RESCTL7 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x34 Table 11-25. RESCTL7 Fields...
Page 335
LH79524/LH79525 User’s Guide I/O Configuration Table 11-25. RESCTL7 Fields (Cont’d) NAME DESCRIPTION Pin PC2/A18 Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PC1/A17 Resistor Assignment 00 = No Pull-Down or Pull-Up...
LH79524/LH79525 User’s Guide 11.2.2.13 Multiplexing Control 10 Register (MUXCTL10) The MUXCTL10 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-26. MUXCTL10 Register FIELD...
LH79524/LH79525 User’s Guide 11.2.2.14 Resistor Configuration Control 10 Register (RESCTL10) The RESCTL10 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-28. RESCTL10 Register...
Page 339
LH79524/LH79525 User’s Guide I/O Configuration Table 11-29. RESCTL10 Fields (Cont’d) NAME DESCRIPTION Pin PK6/D22 Resistor Assignment (LH79524 Only) 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PD5/D13 Resistor Assignment 00 = No Pull-Down or Pull-Up...
LH79524/LH79525 User’s Guide 11.2.2.15 Multiplexing Control 11 Register (MUXCTL11) The MUXCTL11 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-30. MUXCTL11 Register FIELD...
LH79524/LH79525 User’s Guide 11.2.2.16 Resistor Configuration Control 11 Register (RESCTL11) The RESCTL11 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-32. RESCTL11 Register...
Page 343
LH79524/LH79525 User’s Guide I/O Configuration Table 11-33. RESCTL11 Fields (Cont’d) NAME DESCRIPTION Pin PK2/D18 Resistor Assignment (LH79524 Only) 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PK1/D17 Resistor Assignment (LH79524 Only) 00 = No Pull-Down or Pull-Up...
LH79524/LH79525 User’s Guide 11.2.2.17 Multiplexing Control 12 Register (MUXCTL12) The MUXCTL12 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-34. MUXCTL12 Register FIELD...
I/O Configuration 11.2.2.18 Resistor Configuration Control 12 Register (RESCTL12) The RESCTL12 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-36. RESCTL12 Register...
Page 346
I/O Configuration LH79524/LH79525 User’s Guide Table 11-37. RESCTL12 Fields (Cont’d) NAME DESCRIPTION Pin PD4 Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PD3 Resistor Assignment 00 = No Pull-Down or Pull-Up...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.19 Resistor Configuration Control 13 Register (RESCTL13) The RESCTL13 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-38. RESCTL13 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0x64 Table 11-39. RESCTL13 Fields...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.20 Multiplexing Control 14 Register (MUXCTL14) The MUXCTL14 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-40. MUXCTL14 Register FIELD RESET FIELD nCS3 nCS2 nCS1 nCS0 nBLE3 nBLE2 nBLE1 LH79525 RESET LH79524...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.21 Multiplexing Control 15 Register (MUXCTL15) The MUXCTL15 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-42. MUXCTL15 Register FIELD RESET FIELD nBLE0 RESET ADDR 0xFFFE5000 + 0x70 Table 11-43. MUXCTL15 Fields...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.23 Resistor Configuration Control 17 Register (RESCTL17) The RESCTL17 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-46. RESCTL17 Register FIELD RESET FIELD SDCLK RESET ADDR 0xFFFE5000 + 0x84 Table 11-47. RESCTL17 Fields...
LH79524/LH79525 User’s Guide 11.2.2.24 Multiplexing Control 19 Register (MUXCTL19) The MUXCTL19 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-48. MUXCTL19 Register FIELD...
LH79524/LH79525 User’s Guide 11.2.2.25 Resistor Configuration Control 19 Register (RESCTL19) The RESCTL19 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-50. RESCTL19 Register...
Page 355
Pin PE3/LCDCLS Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PL5/D29 Resistor Assignment (LH79524 Only) 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Version 1.0...
LH79524/LH79525 User’s Guide 11.2.2.26 Multiplexing Control 20 Register (MUXCTL20) The MUXCTL20 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-52. MUXCTL20 Register FIELD...
LH79524/LH79525 User’s Guide 11.2.2.27 Resistor Configuration Control 20 Register (RESCTL20) The RESCTL20 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-54. RESCTL20 Register...
Page 359
LH79524/LH79525 User’s Guide I/O Configuration Table 11-55. RESCTL20 Fields (Cont’d) NAME DESCRIPTION Pin PN0/D26 Resistor Assignment (LH79524 Only) 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PF7/LCDFP/LCDSPS Resistor Assignment 00 = No Pull-Down or Pull-Up...
LH79524/LH79525 User’s Guide 11.2.2.28 Multiplexing Control 21 Register (MUXCTL21) The MUXCTL21 Register allows software to configure a number of LH79524/LH79525 pins. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-56. MUXCTL21 Register FIELD...
I/O Configuration 11.2.2.29 Resistor Configuration Control 21 Register (RESCTL21) The RESCTL21 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Bits marked ‘LH79524 Only’ read as 0 with all writes ‘reserved’ on the LH79525. Table 11-58. RESCTL21 Register...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.30 Multiplexing Control 22 Register (MUXCTL22) The MUXCTL22 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-60. MUXCTL22 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xA8 Table 11-61. MUXCTL22 Fields NAME...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.31 Resistor Configuration Control 22 Register (RESCTL22) The RESCTL22 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-62. RESCTL22 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xAC Table 11-63. RESCTL22 Fields...
Page 365
LH79524/LH79525 User’s Guide I/O Configuration Table 11-63. RESCTL22 Fields (Cont’d) NAME DESCRIPTION Pin PG4/LCDVD2 Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PG3/LCDVD1 Resistor Assignment 00 = No Pull-Down or Pull-Up...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.32 Multiplexing Control 23 Register (MUXCTL23) The MUXCTL23 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-64. MUXCTL23 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xB0 Table 11-65. MUXCTL23 Fields NAME...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.33 Resistor Configuration Control 23 Register (RESCTL23) The RESCTL23 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-66. RESCTL23 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xB4 Table 11-67. RESCTL23 Fields...
Page 369
LH79524/LH79525 User’s Guide I/O Configuration Table 11-67. RESCTL23 Fields (Cont’d) NAME DESCRIPTION Pin PH4/ETHERTX0 Resistor Assignment 00 = No Pull-Down or Pull-Up 01 = Pull-Down 10 = Pull-Up 11 = Reserved Pin PH3/ETHERTXER Resistor Assignment 00 = No Pull-Down or Pull-Up...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.34 Multiplexing Control 24 Register (MUXCTL24) The MUXCTL24 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-68. MUXCTL24 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xB8 Table 11-69. MUXCTL24 Fields NAME...
LH79524/LH79525 User’s Guide I/O Configuration 11.2.2.35 Resistor Configuration Control 24 Register (RESCTL24) The RESCTL24 Register allows software to configure a number of the LH79524/LH79525 pull-up/pull-down resistors. Table 11-70. RESCTL24 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xBC Table 11-71. RESCTL24 Fields...
I/O Configuration LH79524/LH79525 User’s Guide 11.2.2.36 Multiplexing Control 25 Register (MUXCTL25) The MUXCTL25 Register allows software to configure a number of LH79524/LH79525 pins. Table 11-72. MUXCTL25 Register FIELD RESET FIELD RESET ADDR 0xFFFE5000 + 0xC0 Table 11-73. MUXCTL25 Fields NAME...
RTC count matches a programmed value. Figure 12-1 shows a block diagram of the RTC. The RTC is identical in both the LH79524 and LH79525; all descriptions in this chapter apply to both SoCs.
Real Time Clock LH79524/LH79525 User’s Guide The value of the counter can be read by software from the Data Register (DR). This value changes every second. The RTC can be programmed to generate the RTC Interrupt when a value, programmed into the Match Register (MR), is reached. Program the Load Register (LR) to the timing start value.
LH79524/LH79525 User’s Guide Real Time Clock 12.2 Register Reference 12.2.1 Memory Map The base address for the RTC is: 0xFFFE0000 Table 12-1. RTC Register Summary ADDRESS NAME DESCRIPTION OFFSET 0x00 Data Register 0x04 Match Register 0x08 Load Register 0x0C Control Register...
Real Time Clock LH79524/LH79525 User’s Guide 12.2.2.2 Match Register (MR) MR is the Match Register. Program the value at which the RTC Interrupt will be generated into this register. The difference between this value and the value in the Load Register is the time in seconds, between count initiation and interrupt generation.
LH79524/LH79525 User’s Guide Real Time Clock 12.2.2.4 Control Register (CR) CR allows software to enable the RTC and determine its operational status. Table 12-8. CR Register FIELD RESET FIELD RESET ADDR 0xFFFE0000 + 0x0C Table 12-9. CR Fields NAME DESCRIPTION 31:1 Reserved Unpredictable values when read.
Real Time Clock LH79524/LH79525 User’s Guide 12.2.2.6 Raw Interrupt Status Register (RIS) Reading this register gives the current raw status value of the RTC interrupt prior to mask- ing. Writing has no effect. Table 12-12. RIS Register FIELD RESET FIELD...
LH79524/LH79525 User’s Guide Real Time Clock 12.2.2.8 Interrupt Clear Register (ICR) Writing 1 to the ICR bit clears the RTC interrupt. Writing 0 has no effect. This register can- not be read. Table 12-16. ICR Register FIELD RESET FIELD RESET —...
Page 382
Chapter 13 Reset, Clock, and Power Controller The Reset, Clock, and Power Controller (RCPC) manages the operating mode, generates appropriately prescaled clocks, and correctly times reset execution. The RCPC: • Manages five Power Modes for minimizing power consumption: Active, Standby, Sleep, Stop1, and Stop2 •...
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide SYSTEM CLOCK OSCILLATOR 32.768 kHz OSCILLATOR PLL CLOCK CLOCK CONTROL BLOCK SYSTEM CLOCK CPU CLOCK ON-CHIP PERIPHERAL CLOCKS ADVANCED PERIPHERAL AHB CLOCK POWER DOWN BUS (APB) AND PLL INTERFACE MODE/FREQUENCY VECTORED INTERRUPT...
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller These modes reduce power consumption as needed, with each mode providing greater power savings. Active Mode is the normal operating mode. The other modes are entered via software control. The RCPC returns to Active Mode upon receiving an interrupt.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide The RCPC and PLL interface guarantee that reprogramming the PLL and System Clocks results in an ordely frequency change. For the USB PLL and other clocks, program the Clock Select and frequency before enabling the peripheral clocks as the RCPC does not guarantee clean clock outputs when changing the clock source or USB PLL frequency.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller Table 13-1. LH79524/LH79525 Clocks and Maximum Frequencies FREQUENCY NAME DESCRIPTION (MAX.) Oscillator Clock External crystal oscillator input; used as the source for the three 20.0 MHz (CLK OSC) UARTs. Also an input to the PLL.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.1.4 Power Modes The RCPC supports five Power Modes: • Active mode • Standby mode • Sleep mode • Stop1 mode • Stop2 mode. Table 13-2 shows which clocks are enabled in the various Power Modes.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.1.4.5 Stop2 Mode Stop2 Mode stops all System Clocks and disables both the PLLs and the System Clock Oscillator that feeds it. However, the 32.768 kHz internal oscillator remains active. This mode is entered when software writes 0b100 to the PWRDWNSEL field of the CTRL Register.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2 Register Reference This section provides the RCPC register memory mapping and bit fields. 13.2.1 Memory Map The base address for the RCPC is: 0xFFFE2000. Table 13-3. RCPC Register Summary ADDRESS NAME...
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.1 Control Register (CTRL) The Control Register allows programming the Power Mode, Clock-Out source, and write protecting RCPC registers. Table 13-4. CTRL Register FIELD RESET FIELD OUTSEL PWRDWNSEL RESET ADDR 0xFFFE2000 + 0x00 Table 13-5.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.2 Identification Register (CHIPID) CHIPID is the Identification Register. This Read Only register contains the last three digits of the part number encoded as a 3 digit Binary Coded Decimal (BCD). The CHIPID register is used in conjunction with the SILICONREV register to provide the SoC part number (CHIPID:PARTNO) and the revision number of the silicon (SILICONREV:REVNO).
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.3 Remap Control Register (REMAP) This REMAP Register provides a remapping feature for the system memory map. Figure 13-3 through Figure 13-6 show the effects of the REMAP bits. Table 13-8. REMAP Register...
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.4 Software Reset Register (SOFTRESET) This register allows software to initiate a System Reset. To reset, software programs 0xDEAD into the lower 16 bits. SOFTRESET resets the entire chip, except the System PLL and the USB PLL.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.5 Reset Status Register (RSTSTATUS) This register provides the reset status of the SoC, containing both the external reset status and the WDT timeout reset status. Following external reset, the EXT bit is 1 and the WDTO bit is 0.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.6 Reset Status Clear Register (RSTSTATUSCLR) This Write Only register clears the two Reset Status flags in the RSTSTATUS register. Writing 1 to this register causes the corresponding bit in the RSTSTATUS to be cleared to 0.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.7 System Clock Prescaler Register (SYSCLKPRE) HCLK is the System Clock. This register allows a divisor to be programmed that is used to divide the system PLL frequency to derive HCLK. The prescaled HCLK frequency is defined by: ⎛...
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.8 CPU Clock Prescaler Register (CPUCLKPRE) FCLK is the CPU Clock. This register allows a divisor to be programmed that is used to divide the system PLL frequency to derive FCLK. The prescaled FCLK frequency is defined by: ⎛...
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.9 Peripheral Clock Control Register 0 (PCLKCTRL0) This register controls the RTC, UART0, UART1, and UART2 peripheral clocks. Program- ming a bit to 1 disables the corresponding peripheral’s clock. These clocks are more fully described in Table 13-1.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.10 Peripheral Clock Control Register 1 (PCLKCTRL1) This register controls the USB, ADC, LCD, and SSP peripheral clocks. Programming a bit to 1 disables the corresponding peripheral’s clock. The SSP Clock, USB Clock, and the LCD Data Clock are more fully described in Table 13-1.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.11 AHB Clock Control Register (AHBCLKCTRL) This register controls the AHB clocks to several peripherals. Programming a bit to 1 disables the AHB clock to the corresponding peripheral. Following reset, all AHB clocks are enabled.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.12 Peripheral Clock Select Register 0 (PCLKSEL0) This register allows selection of the clock source for the UARTs. Table 13-28. PCLKSEL0 Register FIELD RESET FIELD RESET ADDR 0xFFFE2000 + 0x30 Table 13-29. PCLKSEL0 Fields...
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.13 Peripheral Clock Select Register 1 (PCLKSEL1) This register allows selection of the clock source for the USB, ADC, and SSP peripherals. Note that the default source for the USB clock following reset is HCLK. For virtually all designs, this must be programmed to the USB PLL following reset.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.14 Silicon Revision Register (SILICONREV) The SILICONREV register is used in conjunction with the CHIPID register to provide the SoC part number (CHIPID:PARTNO) and the revision number of the silicon (SILICONREV:REVNO). Table 13-32. SILICONREV Register...
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.15 LCD Clock Prescaler Register (LCDPRE) The value in this register is used as a divisor for HCLK to derive the LCD Data Clock (LCDDCLK) frequency. Following reset, the prescaler is programmed to pass the clock through without division.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.16 SSP Clock Prescaler Register (SSPPRE) The value in this register is used as a divisor for the Source Clock to derive the SSP clock (SSPCLK) frequency. The SSP clock source (System Clock Oscillator, or HCLK) is selected with the PCLKSEL1:SSP bit (see Section 13.2.2.13).
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.17 ADC Clock Prescaler Register (ADCPRE) The value in this register is used as a divisor for the Source Clock to derive the ADC clock (ADCCLK) frequency. The ACD clock source (System Clock Oscillator, or HCLK) is selected with the PCLKSEL1:ADC bit (see Section 13.2.2.13).
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.18 USB Clock Prescaler Register (USBPRE) The value in this register is used as a divisor for the clock source to derive the USB clock (USBCLK) frequency. The USB clock source (PLL clock, or HCLK) is selected with the PCLKSEL1:USB bit (see Section 13.2.2.13).
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.19 External Interrupt Configuration Register (INTCONFIG) This register configures the individual external interrupts to be either edge-sensitive or level-sensitive, and either active HIGH or active LOW. Following reset, all bits are 0 and configure the external interrupts to be active LOW, level sensitive.
Page 411
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide Table 13-47. INTCONFIG Fields BITS NAME DESCRIPTION Configures External Interrupt INT3 00 = Configures INT3 to be a level trigger, active LOW. INT3 01 = Configures INT3 to be a level trigger, active HIGH.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.20 External Interrupt Clear Register (INTCLR) This register individually clears active external interrupts. This register can clear edge- triggered interrupts only. Writing to undefined bits has no effect on the RCPC. Note that the reset state is indeterminate since this is write only.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.21 Core Clock Configuration Register (CORECONFIG) This register can be programmed to select either the Standard Mode or the FastBus exten- sion for the ARM720T bus interface. In Standard mode, either a synchronous or asynchro- nous operation can be selected.
LH79524/LH79525 User’s Guide Reset, Clock, and Power Controller 13.2.2.22 System PLL Control Register (SYSPLLCTL) This register controls the System PLL frequency. System PLL frequency is calculated by: × SystemClockOscillatorFrequency SYSLOOPDIV SystemPLLfrequencySystem --------------------------------------------------------------------------------------------------------------------------------------------------- SYSPREDIV The maximum System PLL frequency is 304.819 MHz.
Reset, Clock, and Power Controller LH79524/LH79525 User’s Guide 13.2.2.23 USB PLL Control Register (USBPLLCTL) This register controls the USB PLL frequency and power down. The USB PLL frequency is calculated by: × ⎛ SystemClockOscillatorFrequency USBLOOPDIV ⎞ -------------------------------------------------------------------------------------------------------------------------------------------------------- - USBPLLFrequency ⎝...
Chapter 14 Synchronous Serial Port The Synchronous Serial Port is a master or slave interface that enables synchronous serial communication with slave or master peripherals in one of three modes: • Motorola SPI • Texas Instruments DSP-compatible synchronous serial interface •...
Synchronous Serial Port LH79524/LH79525 User’s Guide Table 14-1 describes these modes. Table 14-1. Feature Comparison MODE DESCRIPTION DATA TRANSFERS COMMENT Lets the SSP communicate Clock polarity and phase Full-duplex, 4-wire with Motorola SPI-compatible are programmable. synchronous devices. Lets the SSP communicate...
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.1.1 Timing Waveforms Figure 14-1 shows the standard set of SSP timing waveforms. Timing values for the call- outs on the figure can be found in the Data Sheet. Figure 14-1. SSP Timing Waveform Parameters Version 1.0...
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.1.2 Motorola SPI Frame Format For the Motorola SPI format, the serial frame pin (SSPFRM) is active LOW. The SPO and SPH bits in SSP Control Register 0 influence SSPCLK and SSPFRM operation in Single and Continuous Modes.
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.1.3 Texas Instruments Frame Format For the Texas Instruments DSP-compatible synchronous serial interface frame format, the SSPFRM pin is pulsed for one serial clock period stating at its rising edge, prior to each frame's transmission. For this frame format, the SSP outputs data on the rising edge of the clock and latches input data on the rising edge of the clock.
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.1.4 National Semiconductor Frame Format Unlike the full-duplex transmission capabilities that the other two frame formats support, the National Semiconductor Microwire format uses a special half-duplex, master-slave messaging technique. In this mode: When a frame begins, an 8-bit control message is transmitted to the off-chip slave.
LH79524/LH79525 User’s Guide Synchronous Serial Port SSPCLK nSSPFRM SSPTXD 8-BIT CONTROL SSPRXD 4 to 16 BITS OUTPUT DATA LH79525-79 Figure 14-7. Microwire Frame Format (Continuous Transfers) 14.1.5 Clock Generation The serial bit rate is derived by dividing down the SSP clock coming from the RCPC that is a prescaled version of the system clock (see the RCPC chapter for detailed infor- mation about setting up the system clock).
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.1.6.2 Transmit Interrupt SSPTXINTR is the Transmit Interrupt. This interrupt is asserted when the FIFO is less than or equal to half full (when there is space for four or more entries). The interrupt is cleared when there are five or more entries in the transmit FIFO.
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.2 Register Reference This section provides the SSP’s register memory mapping and bit fields. 14.2.1 Memory Map The base address for the SSP is 0xFFFC6000. Locations at offsets 0x028 through 0xFFF are reserved and must not be accessed.
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2 Register Descriptions 14.2.2.1 Control Register 0 (CTRL0) This register, defined in Table 14-3 and Table 14-4, enables or disables the SSP and con- trols the serial clock rate, its phase, polarity, data size, and frame format. Bits 3:0 reset to 0b0000 and must be programmed to a valid number prior to using the SSP.
Page 426
LH79524/LH79525 User’s Guide Synchronous Serial Port Table 14-4. CTRL0 Fields BITS NAME DESCRIPTION Data Size Select Program with the correct data block size. 0000 = Undefined Operator 0001 = Undefined Operator 0010 = Undefined Operator 0011 = 4-bit data 0100 = 5-bit data...
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2.2 Control Register 1 (CTRL1) CTRL1 is the Control Register 1. CTRL1 contains four bit fields that control various SSP functions. Table 14-5. CTRL1 Register FIELD RESET FIELD RESET ADDR 0xFFFC6000 + 0x004 Table 14-6. CTRL1 Fields...
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.2.2.3 Data Register – Receive/Transmit FIFO Register (DR) DR is the 16-bit-wide Receive/Transmit FIFO register. • When DR is read, the entry in the receive FIFO (pointed to by the current FIFO read pointer) is accessed. As data values are removed by the SSP's receive logic from the incoming data frame, they are placed into the entry in the receive FIFO (pointed to by the current FIFO write pointer).
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2.4 Status Register (SR) SR is the Status Register. This register contains bits that indicate the FIFO fill status and the SSP busy status. Table 14-9. SR Register FIELD RESET FIELD BSY REFI RNE...
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.2.2.5 Clock Prescale Register (CPSR) The CPSR Register specifies the division factor by which the input HCLK is internally divided before use. The value programmed into this register is a value from 2 to 254. This Because register defaults to zero, but is double buffered and reads back 1s after Reset.
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2.6 Interrupt Mask Set and Clear Register (IMSC) IMSC is the Interrupt Mask Set and Clear Register. On a read, this register gives the cur- rent value of the mask on the relevant interrupt. A write of 1 to the particular bit clears the mask, enabling the interrupt to be read.
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.2.2.7 Raw Interrupt Status Register (RIS) This register provides the current raw status value of the corresponding interrupt prior to masking. A write has no effect. Table 14-15. RIS Register FIELD RESET FIELD RESET...
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2.8 Masked Interrupt Status Register (MIS) MIS is the Masked Interrupt Status Register. When read, this register gives the current masked status value of the corresponding interrupt. A write has no effect. Table 14-17. MIS Register...
LH79524/LH79525 User’s Guide Synchronous Serial Port 14.2.2.9 Interrupt Clear Register (ICR) ICR is the Interrupt Clear Register. This register is write only. On a write of 1, the corre- sponding interrupt is cleared. Writing 0 has no effect. Table 14-19. ICR Register...
Synchronous Serial Port LH79524/LH79525 User’s Guide 14.2.2.10 DMA Control Register (DCR) DCR is the DMA Control Register. The RXDMAE and TXDMAE bits are not automatically cleared for standard Stream 0 through 3 DMA operations, respectively. These bits should be explicitly cleared by soft- ware as soon as possible following DMA completion.
Page 436
• Timer 1 has two Capture Registers and two Compare Registers. • Timer 2 has two Capture Registers and two Compare Registers. Throughout this chapter, all descriptions apply to both the LH79524 and LH79525. In this chapter there are also a number of registers with similar names and functions. Descrip- tions of these registers refer to the name with an ‘x’...
LH79524/LH79525 User’s Guide Timers Figure 15-2 shows the timing of CTCLK with respect to HCLK when the two are in phase. Figure 15-3 shows the timing of CTCLK with respect to HCLK when the two are not in phase. SYSTEM...
Timers LH79524/LH79525 User’s Guide 15.1.2 Capture Signal Sampling The capture signal causes the value of the timer to be captured and stored in the Timer Capture Register (TxCAPn) associated with the particular input pin being used. For exam- ple, to sample Timer 0 using a trigger on the CTC0A pin, that count would be stored in the T0CAPA register.
LH79524/LH79525 User’s Guide Timers Figure 15-5 shows an example of PWM output signal timing. To implement the timing shown in this Figure, the following values are programmed into the registers. • TxCMP1 = 0x0005 (Period of 6) • TxCMP0 = 0x0001 (Duty Cycle of 2; ‘OFF TIME’ in Figure 15-5) Timer 0 settings: •...
Timers LH79524/LH79525 User’s Guide 15.2 Register Reference This section describes the location and programming of the Timer registers. 15.2.1 Memory Map Register offsets in Table 15-1 are relative to the Timer base address 0xFFFC4000 Table 15-1. Timer 0 Register Summary...
LH79524/LH79525 User’s Guide Timers 15.2.2 Register Descriptions 15.2.2.1 Timer 0 Control Register (CTRL0) This register allows programming the clock divisor, as well as starting/stopping, and clear- ing the timer count value. Table 15-4. CTRL0 Register FIELD RESET FIELD RESET ADDR 0xFFFC4000 + 0x00 Table 15-5.
Timers LH79524/LH79525 User’s Guide 15.2.2.2 Timer 0 Compare/Capture Control Register (CMP_CAP_CTRL0) CMP_CAP_CTRL0 allows programming the operating modes of Timer 0. Table 15-6. CMP_CAP_CTRL0 Register FIELD RESET FIELD CMP1 CMP0 CAPE CAPD CAPC CAPB CAPA RESET ADDR 0xFFFC4000 + 0x04 Table 15-7. CMP_CAP_CTRL0 Register Definitions...
Page 444
LH79524/LH79525 User’s Guide Timers Table 15-7. CMP_CAP_CTRL0 Register Definitions BITS NAME DESCRIPTION Output Value Select Timer/Counter Operation: Programs the value (when a compare match occurs) output on CTCMP0A when the CNT0 Register matches the T0CMP0 Register. 00 = No change occurs to the output CTCMP0A...
LH79524/LH79525 User’s Guide Timers 15.2.2.4 Timer 0 Status Register (STATUS0) The Status Register bits contain the raw interrupt status of the various interrupt generators. Raw interrupts reflect the state of the interrupt, whether or not it is enabled. To clear a status bit, write a 1 to that bit.
LH79524/LH79525 User’s Guide Timers 15.2.2.6 Timer 0 Compare Registers (T0CMPn) There are two T0CMPn Registers for Timer 0. They are designated: • T0CMP0 • T0CMP1 Each register is a 16-bit, read/write register. Contents of these registers are compared continuously with the counter CNT0. When both register and counter values match, the timer responds as programmed in the CMP_CAP_CTRL register.
Timers LH79524/LH79525 User’s Guide 15.2.2.7 Timer 0 Capture Registers (CAPn) There are five CAPn Registers for Timer 0. They are designated: • CAPA • CAPB • CAPC • CAPD • CAPE Each register is a 16-bit, Read Only register. When a capture condition occurs, the con- tents of the counter CNT0 are stored into the associated Capture Register.
LH79524/LH79525 User’s Guide Timers 15.2.2.8 Timer 1 Control Register (CTRL1) This register allows programming various functions, including PWM Mode, clock selection, and starting/stopping Timer 1. Table 15-18. CTRL1 Register FIELD RESET FIELD CMP1 CMP0 CAPB CAPA RESET ADDR 0xFFFC4000 + 0x30 Table 15-19.
Page 451
Timers LH79524/LH79525 User’s Guide Table 15-19. CTRL1 Register Definitions (Cont’d) BITS NAME DESCRIPTION Output Value Select Timer/Counter Operation: Programs the value (when a compare match occurs) output on CTCMP1A when the CNT1 Register matches the T1CMP0 Register. 00 = No change occurs to the output CTCMP1A...
Timers LH79524/LH79525 User’s Guide 15.2.2.10 Timer 1 Status Register (STATUS1) The Status Register bits contain the raw interrupt status of the various interrupt generators. Raw interrupts reflect the state of the interrupt, whether or not it is enabled. To clear a status bit, write a 1 to that bit.
LH79524/LH79525 User’s Guide Timers 15.2.2.11 Timer 1 Counter Register (CNT1) The CNT1 Register is a 16-bit, Read/Write up counter. The counter can be read or written to while it is operating. As a result, counts can be read at any time or the current count can be changed.
Timers LH79524/LH79525 User’s Guide 15.2.2.12 Timer 1 Compare Registers (T1CMPn) There are two CMP(n) Registers for Timer 1. They are designated: • T1CMP0 • T1CMP1 Each register is a 16-bit, Read/Write register. Contents of these registers are compared continuously with the counter CNT1. When both register and counter values match, the timer behaves as programmed in the CTRL1 register.
LH79524/LH79525 User’s Guide Timers 15.2.2.13 Timer 1 Capture Registers (T1CAPn) There are two T1CAPn Registers for Timer 1. They are designated: • T1CAPA • T1CAPB Each register is a 16-bit, Read Only register. When a capture condition occurs, the con- tents of the counter CNT1 are stored into the associated Capture Register.
Timers LH79524/LH79525 User’s Guide 15.2.2.14 Timer 2 Control Register (CTRL2) This register allows programming various functions of the timer, including PWM Mode, clock selection, and start/stop. Table 15-30. CTRL2 Register FIELD RESET FIELD CMP1 CMP0 CAPB CAPA RESET ADDR 0xFFFC4000 + 0x50 Table 15-31.
Page 458
LH79524/LH79525 User’s Guide Timers Table 15-31. CTRL2 Register Definitions (Cont’d) BITS NAME DESCRIPTION Output Value Select Timer/Counter Operation: Programs the value (when a compare match occurs) output on CTCMP2A when the CNT2 Register matches the T2CMP0 Register. 00 = No change occurs to the output CTCMP2A...
LH79524/LH79525 User’s Guide Timers 15.2.2.16 Timer 2 Status Register (STATUS2) The Status Register bits contain the raw interrupt status of the various interrupt generators. Raw interrupts reflect the state of the interrupt, whether or not it is enabled. To clear a status bit, write a 1 to that bit.
Timers LH79524/LH79525 User’s Guide 15.2.2.17 Timer 2 Counter Register (CNT2) The CNT2 Register is a 16-bit, read/write up counter. The counter can be read or written to while it is operating. As a result, counts can be read at any time or the current count can be changed.
LH79524/LH79525 User’s Guide Timers 15.2.2.18 Timer 2 Compare Registers (T2CMPn) There are two T2CMPn Registers for Timer 2. They are designated: • T2CMP0 • T2CMP1 Each register is a 16-bit, Read/Write register. Contents of these registers are compared continuously with the counter CNT2. When both register and counter values match, the timer behaves as programmed in the CTRL2 register.
Timers LH79524/LH79525 User’s Guide 15.2.2.19 Timer 2 Capture Registers (T2CAPn) There are two T2CAPn Registers for Timer 2. They are designated: • T2CAPA • T2CAPB Each register is a 16-bit, Read Only register. When a capture condition occurs, the con- tents of the counter CNT2 are stored into the associated Capture Register.
Page 464
Chapter 16 UARTs The LH79524/LH79525 contains three UARTs, UART[2:0]. The UARTs feature: • Character Length: Programmable number of data bits per character (5, 6, 7, or 8). Even, odd, stick, or no-parity bit generation and detection. 1 or 2 Stop bit generation.
LH79524/LH79525 User’s Guide UARTs 16.1.1 Transmitting Data When the UART is programmed to transmit and enabled, writing data to the transmit FIFO: • Causes the UART to start transmitting a data frame with the parameters indicated in the UARTLCR_H Register. Data continues to be transmitted until the transmit FIFO is empty, as indicated by the Transmit FIFO Empty Flag (UARTFR:TXFE).
UARTs LH79524/LH79525 User’s Guide 16.1.3 Nine-bit Mode In Nine-bit Mode, the parity bit of the character frame is used to identify the message as containing an address or data (parity is not calculated). Enable Nine-bit Mode by setting bit 9 (9BIT) of UARTLCR_H. Then set or clear bit 8 (ADDTX) to tag the next character written to UARTDR as address (ADDTX=1) or data (ADDTX=0).
LH79524/LH79525 User’s Guide UARTs 16.1.5 On-Chip DMA Capabilities UART0 can be programmed to utilize the on-chip DMA to reduce processor bandwidth required to service UART activities. DMA functions support burst transfers on the receive channel, transmission channel, or both. When using DMA, the transfer size must be set to 8 bits.
UARTs LH79524/LH79525 User’s Guide 16.1.7 Hardware Flow Control Hardware flow control is fully selectable, and allows control of the serial data flow by using the nUARTRTS0 output and nUARTCTS0 input signals. Enabling flow control pins is made in the MUXCTL6:PB1 and MUXCTL6:PB0 fields, which is described in Table 11-18.
LH79524/LH79525 User’s Guide UARTs 16.2 Interrupts UART0, UART1, and UART2 each have a combined interrupt. The individual UART inter- rupt outputs are ORed together to produce the combined interrupt for that UART. Interrupt conditions within the combined interrupt are individually maskable. The Vectored Interrupt Controller (VIC) must be programmed before using the UART interrupts.
UARTs LH79524/LH79525 User’s Guide 16.3.2 Register Definitions 16.3.2.1 Data Register (UARTDR) UARTDR is the Data Register for words that are to be transmitted or have been received over the serial interface. Writing to this register initiates transmission from the UART.
LH79524/LH79525 User’s Guide UARTs Table 16-5. Nine-bit Mode/Parity Bit Table REGISTER:BIT MEANING UARTLCR_H: UARTDR: 9BIT PEAR The parity of the received data character matches the parity selected as de- fined by the EPS and SPS bits in the UARTLCR_H register. In FIFO mode, this error is associated with the character at the top of the FIFO.
LH79524/LH79525 User’s Guide UARTs 16.3.2.3 Flag Register (UARTFR) UARTFR is the Flag Register. After System Reset, TXFF, RXFF, and BUSY are 0, and TXFE and RXFE are 1. Table 16-10. UARTFR Register FIELD RESET FIELD TXFE RXFF TXFF RXFE BUSY...
UARTs LH79524/LH79525 User’s Guide 16.3.2.4 IrDA Low-Power Counter Register (UARTILPR) Program the UARTILPR Register with a divisor value to generate the SIR Baud Clock signal. The UARTILPR Register is reset to 0 and must be reprogrammed with a non-zero divisor value for use. Programming a zero value will result in no SIR Baud Clock pulses being generated.
LH79524/LH79525 User’s Guide UARTs 16.3.2.5 Integer Baud Rate Divisor Register (UARTIBRD) UARTIBRD is the integer portion of the baud rate divisor value. All of the bits in this register clear to 0 on System Reset. Table 16-14. UARTIBRD Register FIELD...
LH79524/LH79525 User’s Guide UARTs 16.3.2.7 Line Control Register (UARTLCR_H) UARTLCR_H is the Line Control Register. This register is used to configure the UARTs. The contents of the UARTLCR_H Register are not updated until transmission or reception of the current character is complete. Table 16-21 is a truth table for the SPS, EPS, and PEN bits of the UARTLCR_H Register.
UARTs LH79524/LH79525 User’s Guide Table 16-20. UARTLCR_H Fields (Cont’d) NAME DESCRIPTION FIFO Enable Buffers This bit not only enables and disables the FIFO buffers, but also controls the mode. When the FIFO is enabled, it is used to buffer receive and transmit data.
LH79524/LH79525 User’s Guide UARTs 16.3.2.8 UART Control Register (UARTCR) UARTCR is the UART Control Register. To enable transmission, bit [8] and bit [0] must be set. Similarly, to enable reception, bit [9] and bit [0] must be set. Table 16-22. UARTCR Register...
Page 481
UARTs LH79524/LH79525 User’s Guide Table 16-23. UARTCR Fields NAME DESCRIPTION Transmit Section Enables the transmit section of the UART. 1 = Transmit section enabled. When the UART is disabled in the middle of transmission, it completes the current character before stopping 0 = Transmit section not enabled Loop Back Enable Places the UART into Loopback Mode.
LH79524/LH79525 User’s Guide UARTs 16.3.2.9 Interrupt FIFO Level Select Register (UARTIFLS) UARTIFLS is the Interrupt FIFO Level Select Register. The UARTIFLS Register defines the FIFO level at which interrupts are generated to request service for the receive and transmit FIFOs. The interrupts are generated based on a transition through a level rather than being based on the level;...
UARTs LH79524/LH79525 User’s Guide 16.3.2.10 Interrupt Mask Set/Clear Register (UARTIMSC) UARTIMSC is the Interrupt Mask Register. On a read, this register returns the current value of the mask on the relevant interrupt. Writing 0 to the particular bit masks the interrupt. Writ- ing 1 enables the corresponding interrupt.
Page 484
LH79524/LH79525 User’s Guide UARTs Table 16-27. UARTIMSC Fields (Cont’d) BITS NAME DESCRIPTION Receive Timeout Error Interrupt Mask When read, returns the current mask for the RTIM interrupt. Write values: RTIM 1 = Enable the RTI interrupt 0 = Mask the RTI interrupt Transmit Interrupt Mask When read, returns the current mask for the TXIM interrupt.
UARTs LH79524/LH79525 User’s Guide 16.3.2.11 Raw Interrupt Status Register (UARTRIS) UARTRIS is the Raw Interrupt Status Register. These values are the state of the interrupt prior to applying the mask specified in the UARTIMSC register. On a read, this register returns the current raw status value of the corresponding interrupt.
Page 486
LH79524/LH79525 User’s Guide UARTs Table 16-29. UARTRIS Fields BITS NAME DESCRIPTION Transmit Interrupt Status Specifies the raw interrupt state of the UARTTXINTR interrupt. TXRIS 1 = Interrupt pending 0 = No interrupt Receive Interrupt Status Specifies the raw interrupt state of the UARTRXINTR interrupt.
UARTs LH79524/LH79525 User’s Guide 16.3.2.12 Masked Interrupt Status Register (UARTMIS) UARTMIS is the Masked Interrupt Status Register. On a read, this register returns the cur- rent masked status value of the corresponding interrupt. A write has no effect. Table 16-30. UARTMIS Register...
Page 488
LH79524/LH79525 User’s Guide UARTs Table 16-31. UARTMIS Fields (Cont’d) NAME DESCRIPTION Receive Masked Interrupt Status Specifies the masked interrupt state of the UARTRXINTR interrupt. RXMIS 1 = Interrupt pending 0 = No interrupt, or interrupt masked Reserved Reading returns 0. Write the reset value.
UARTs LH79524/LH79525 User’s Guide 16.3.2.13 Interrupt Clear Register (UARTICR) UARTICR is the Interrupt Clear Register. The active bits used in this register are Write Only. On a write of 1, the corresponding interrupt is cleared. A write of 0 has no effect.
LH79524/LH79525 User’s Guide UARTs 16.3.2.14 UART0 DMA Control Register (DMACTRL) UART0 DMACTRL is the UART0 DMA Control Register. It allows control of certain UART DMA functions. The RXDMAEN, and TXDMAEN bits are not automatically cleared for standard Stream 0 through 3 DMA operations, respectively. These bits should be explicitly cleared by soft- ware as soon as possible following DMA completion.
Figure 17-1. USB Block Diagram 17.1 Theory of Operation The LH79524 and LH79525 implement a USB Device only. All USB communications are managed by one or more external USB Hosts. The USB Device is identical in both parts, so all descriptions apply to the LH79524 and LH79525.
Table 17-1 describes the endpoints and their function. Note that the direction type associated with the endpoints is from the perspective of the Host. For example, an IN endpoint terminates a data pipe transferring data from the LH79524/ LH79525 to the Host.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.1.1.1 Isochronous Endpoints For Isochronous Endpoints, the host generates IN tokens based on the polling interval. The SoC responds to the IN token with data packet. The polling interval is set in the soft- ware driver.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.1.4 DMA Interface The USB Device includes a six channel DMA Controller with a 64-byte buffer. This section describes the DMA operation and gives programming examples. 17.1.4.1 DMA Modes The DMA controller supports two modes of operation. The operating mode of each channel can be programmed independently.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.1.5 DMA Operation DMA access to the Endpoint FIFOs requires both the DMA controller and the endpoint to be programmed for the selected DMA Mode. Details are given in the following sections. (It will be helpful to refer to the register descriptions in Section 17.2 before reading these sections.)
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.1.5.3 DMA Mode 1: OUT Endpoints For operation in DMA Mode 0, these steps describe programming an OUT endpoint: Program the proper interrupt enable bit in the OIE register to 1 to enable that interrupt.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.1.5.4 DMA Mode 1: IN Endpoints For operation in DMA Mode 1, these steps describe programming an IN endpoint: Program the proper interrupt enable bit in the IN Interrupt Enable (IIE) register to 1 to enable that interrupt.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2 Register Reference This section provides the USB Device register memory mapping and bit fields. 17.2.1 Memory Map The base address for the USB Device is 0xFFFF5000. Table 17-3 summarizes the USB Device registers.
Page 499
LH79524/LH79525 User’s Guide Universal Serial Bus Device Table 17-3. USB Register Summary (Cont’d) ADDRESS NAME DESCRIPTION OFFSET Number of received bytes in Endpoint 0 FIFO. (INDEX register OUTCOUNT0 set to select Endpoint 0) 0x058 Number of bytes in OUT endpoint FIFO (lower byte). (INDEX reg- OUTCOUNT1 ister set to select Endpoints 1 –...
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.2 Register Definitions 17.2.2.1 Function Address Register (FAR) FAR is a register that should be written with the function’s 7-bit address (received through a SET_ADDRESS descriptor). It is then used for decoding the function address in subse- quent token packets Table 17-4.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.2.2 Power Management Register (PMR) This register is used for SUSPEND, RESUME, and RESET signalling, and for monitoring USB Bus Reset status. Table 17-6. PMR Register FIELD RESET FIELD RESET TYPE ADDR 0xFFFF5000 + 0x004 Table 17-7.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.2.3 Interrupt Register for Endpoint 0, 1, 2, and 3 (IIR) IIR is a read-only register that indicates which of the interrupts for IN Endpoints 1, 2, and 3 are currently active. It also indicates whether the Endpoint 0 (the Control Endpoint) inter- rupt is currently active.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.2.4 Interrupt Register for OUT Endpoint 1 and 2 (OIR) The OUT Interrupt register (OIR) acts as an interrupt status register for the OUT endpoint EP1 and EP2. Upon interrupt, software should read each of the three interrupt registers (IIR, OIR, and UIR), which clears the interrupt bit.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.2.5 Interrupt Register for common USB interrupts (UIR) UIR is a read-only register that indicates which USB interrupts are currently active. All active interrupts will be cleared when this register is read. Table 17-12. UIR Register...
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.2.6 IN Interrupt Enable Register (IIE) IIE provides interrupt enable bits for the interrupts in IIR. Following reset, all interrupts are enabled. Table 17-14. IIE Register FIELD RESET FIELD RESET TYPE ADDR 0xFFFF5000 + 0x01C Table 17-15.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.2.7 OUT Interrupt Enable Register (OIE) OIE provides interrupt enable bits for the interrupts in OIR. Following reset, all interrupts are enabled. Table 17-16. OIE Register FIELD RESET FIELD RESET TYPE ADDR 0xFFFF5000 + 0x024 Table 17-17.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.2.8 Interrupt Enable Register (UIE) UIE provides interrupt enable bits for the interrupts in UIR. Following reset, only the USB RESET and the RESUME interrupts are enabled. Table 17-18. UIE Register FIELD RESET...
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.2.9 Frame Number Registers (FRAMEx) The FRAMEx registers store the current USB bus frame number. The frame number com- prises 11 bits. FRAME1 holds the lower eight bits and FRAME2 holds the upper three bits.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3 Indexed Registers The next group of registers in the USB Device are Indexed. Each IN endpoint and each OUT Endpoint have their own set of control/status registers. Only one set of IN control and status registers and one set of OUT control and status registers appear in the memory map at any one time.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.3.2 IN Maximum Packet Size Register (INMAXP) INMAXP defines the maximum packet size for transactions through the currently-selected IN endpoint in units of 8 bytes, except that a value of 128 sets the maximum packet size to 1,023 (the maximum size for an Isochronous packet transferred in a Full-speed trans- action) rather than 1,024.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.3 Control Status Register for EP 0 (CSR0) CSR0 provides control and status bits for Endpoint 0. Table 17-28. CSR0 Register FIELD RESET FIELD RESET TYPE 0xFFFF5000 + 0x044 ADDR (with the INDEX register set to 0) Table 17-29.
Page 512
Universal Serial Bus Device LH79524/LH79525 User’s Guide Table 17-29. CSR0 Fields (Cont’d) BITS NAME FUNCTION Data End Software programs this bit to 1: • After loading the last packet of data into the FIFO, at the same time IN_PKT_RDY is set •...
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.4 Control Status Register 1 for IN EP 1, 2, and 3 (INCSR1) The INCSR1 register maintains the control and status bits for IN endpoints. Software should only access this register for an IN endpoint after the endpoint has been configured via INCSR2.
Page 514
Universal Serial Bus Device LH79524/LH79525 User’s Guide Table 17-31. INCSR1 Fields (Cont’d) BITS NAME FUNCTION FIFO Flush Request Software programs this bit to 1 if it intends to flush the IN FIFO. This bit is programmed to 0 by the USB after the FIFO is flushed (IN_PKT_RDY must be read as a 1 before the USB can program this bit to 0).
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.5 Control Status Register 2 for IN EP 1, 2, and 3 (INCSR2) The INCSR2 register allows software to configure USB access and the function of the IN_PKT_RDY bit. Software should configure endpoints via INCSR2 before reading the INCSR1 register.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.3.6 OUT Maximum Packet Size Register EP 1 and 2 (OUTMAXP) OUTMAXP is programmed with the maximum packet size for transactions through the cur- rently-selected OUT endpoint — in units of 8 bytes, except that a value of 128 sets the maximum packet size to 1023 (the maximum size for an isochronous packet) rather than 1024.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.7 Control Status Register 1 for OUT EP1 and EP2 (OUTSCSR1) OUTCSR1 provides control and status bits for transfers through the currently-selected OUT endpoint Table 17-36. OUTCSR1 Register FIELD RESET FIELD RESET TYPE...
Page 518
Universal Serial Bus Device LH79524/LH79525 User’s Guide Table 17-37. OUTCSR1 Fields (Cont’d) BITS NAME FUNCTION Flush OUT FIFO Software programs this bit to 1 to flush the FIFO. This bit can be programmed to 1 only when OUT_PKT_RDY is 1. The packet due to be unloaded by software will be flushed.
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.8 Control Status Register 2 for OUT EP1 and EP 2 (OUTCSR2) OUTCSR2 provides further control bits for transfers through the currently-selected OUT endpoint Table 17-38. OUTCSR2 Register FIELD RESET FIELD RESET TYPE...
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.3.9 Count 0 Register (OUTCOUNT0) OUTCOUNT0 is a read-only register that indicates the number of received data bytes in the Endpoint 0 FIFO. The value returned is valid while CSR0:OUT_PKT_RDY is 1. Table 17-40. OUTCOUNT0 Register...
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.11 Out Count 2 Register (OUTCOUNT2) OUTCOUNT2 is a read-only register that holds the upper 3 bits of the number of received data bytes in the packet in the FIFO associated with the currently-selected OUT endpoint.
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.3.13 Pending DMA Interrupts Register (INTR) This register indicates the status of pending DMA interrupts Table 17-48. INTR Register FIELD RESET TYPE FIELD RESET TYPE ADDR 0xFFFF5000 + 0x200 Table 17-49. INTR Fields...
LH79524/LH79525 User’s Guide Universal Serial Bus Device 17.2.3.14 DMA Channel x Control Register (CNTLx) This register allows configuring various functions for DMA Channels 1 through 6. Table 17-50. CNTLx Register FIELD RESET TYPE FIELD ENDPOINT RESET TYPE Channel 1 = 0xFFFF5000 + 0x204...
Universal Serial Bus Device LH79524/LH79525 User’s Guide 17.2.3.15 DMA Channel x AHB Memory Address Register Program this register with the AHB memory addresses for each of the six DMA channels. Table 17-52. ADDRx Register FIELD ADDR1 RESET TYPE FIELD ADDR1...
Throughout this chapter all descriptions apply to both the LH79524 and LH97525. 18.1 Theory of Operation The VIC provides hardware for initial prioritization and processing of up to 32 interrupts.
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.1.1 VIC Interrupt Listing Table 18-1 lists the 32 interrupt source lines for the VIC and their permanent position assignment. For a detailed description of each interrupt, see the chapter for the peripheral that generates the interrupt Table 18-1.
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.1.2 Vectored Interrupts Each interrupt source line must be identified as either an IRQ type or an FIQ type using the Interrupt Select Register (INTSELECT). FIQ interrupts are non-vectored. Once the VIC causes the FIQ interrupt to be asserted to the core, the FIQ interrupt handler is entered directly by loading the instruction at 0x1C independently of the VIC.
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.1.4 Clearing Interrupts The general procedure for clearing an interrupts is: The interrupt must be cleared at its source, regardless of whether the interrupt source is external, internal, or software generated. The interrupt must be cleared within the VIC by writing any value to the VECTADDRx register.
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2 Register Reference This section provides the VIC register memory mapping and bit fields. 18.2.1 Memory Map Table shows the mapping of the VIC registers. The base address for the VIC is 0xFFFFF000. Table 18-2. VIC Register Summary...
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2.2.2 FIQ Status Register (FIQSTATUS) This Read Only register provides the status of the interrupts after FIQ masking. Bits [31:0] correspond to the interrupt number in Table 18-1. Table 18-5. FIQSTATUS Register FIELD FIQStatus...
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.2.2.4 Interrupt Select Register (INTSELECT) This register selects whether the corresponding interrupt source generates an FIQ or an IRQ interrupt. Bits [31:0] correspond to the interrupt number in Table 18-1 Table 18-9. INTSELECT Register...
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2.2.6 Interrupt Enable Clear Register (INTENCLEAR) This register clears the individual bits in the INTENABLE Register. Bits [31:0] correspond to the interrupt number in Table 18-1. Table 18-13. INTENCLEAR Register FIELD IntEnable Clear RESET...
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.2.2.7 Software Interrupt Register (SOFTINT) SoftInt is the Software Interrupt Register. This register generates software interrupts. Bits [31:0] correspond to the interrupt number in Table 18-1. Note that interrupt number 1 is the only inter- rupt souce not associated with a physical hardware interrrupt and is therefore reserved for soft- ware interrupts.
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2.2.8 Software Interrupt Clear Register (SOFTINTCLEAR) This Write Only register clears the corresponding bit (and the interrupt assertion) in the SOFTINT Register. Bits [31:0] correspond to the interrupt number in Table 18-1 Table 18-17. SOFTINTCLEAR Register...
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.2.2.9 Vector Address Register (VECTADDR) The Vector Address Register contains the ISR address of the currently active interrupt. Reading this register provides the address of the ISR, and indicates to the priority hard- ware that the interrupt is being serviced. Writing to this register indicates to the priority hardware that the interrupt has been serviced.
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2.2.11 Vector Address Registers (VECTADDRx) There are 16 Vector Address Registers, designated VectAddr0 through VectAddr15. Each register contains the ISR vector addresses for that particular vectored IRQ interrupt. Table 18-23. VECTADDRx Registers FIELD VICVectorAddr...
Vectored Interrupt Controller LH79524/LH79525 User’s Guide 18.2.2.12 Vector Control Registers (VECTCTRLx) There are 16 Vector Control Registers, designated VECTCTRL0 through VECTCTRL15. Software uses these registers to assign the desired interrupt to the desired interrupt vector. The interrupt number from Table 18-1 (in hexadecimal) is programmed to the IntSource bits, and the ‘E’...
LH79524/LH79525 User’s Guide Vectored Interrupt Controller 18.2.2.13 Interrupt Test Output Register (ITOP) Reading the ITOP register returns the status of the IRQ and FIQ interrupt request outputs from the VIC to the ARM exception-handling circuitry. Table 18-27. ITOP Register FIELD...
When first enabled or when reset, the WDT begins counting from the programmed timing value. The WDT is enabled by programming the CTL:EN bit to 1. The WDT block diagram is shown in Figure 19-1. All descriptions apply to both the LH79524 and LH79525. Version 1.0...
LH79524/LH79525 User’s Guide Watchdog Timer 19.1.1 WDT Operation Details The WDT is enabled and disabled by programming the CTL:EN bit to 1. To reset the WDT, program the Reset register (RST) with the value 0x1984. To prevent the WDT from being inadvertently disabled, the Enable function can be locked by setting the CTL Freeze field (CTL:FRZ).
Watchdog Timer LH79524/LH79525 User’s Guide 19.2 Register Reference This section describes the location and programming of the WDT registers. 19.2.1 Memory Map Register offsets in Table 19-1 are relative to the Timer base address 0xFFFC3000 Table 19-1. Watchdog Timer Memory Map...
LH79524/LH79525 User’s Guide Watchdog Timer 19.2.2 Register Descriptions 19.2.2.1 Control Register (CTL) The WDT control register, described in Table 19-2 and Table 19-3 enables and disables the WDT, and specifies the timeout period and interrupt response. Table 19-2. CTL Register...
Watchdog Timer LH79524/LH79525 User’s Guide 19.2.2.2 Counter Reset Register (RST) Write this register to reset the WDT, preventing a timeout. Table 19-4. RST Description FIELD RESET TYPE FIELD RESET undefined TYPE ADDR 0xFFFE3000 + 0x04 Table 19-5. RST Field NAME...
LH79524/LH79525 User’s Guide Watchdog Timer 19.2.2.3 Status Register (STATUS) This register, described in Table 19-6 and Table 19-7, provides the status of the WDT interrupts, and allows programming whether a system reset is generated upon the first timeout, or if an interrupt is generated on the first timeout, followed by a system reset if that interrupt is not serviced before a second timeout occurs.
Watchdog Timer LH79524/LH79525 User’s Guide 19.2.2.4 Current Watchdog Count Registers (COUNT[3:0]) The COUNTx registers, described in Table 19-8 and Table 19-9, are a set of registers operating as a cascaded counter, reporting the current WDT decrementing value: • COUNT3 contains bits 31 through 24 of the current value •...
Page 548
Advanced Peripheral Bus. Defined in the AMBA specification, the APB connects the lower- performance peripheral blocks. In the LH79524/LH79525, the APB connects a number of peripherals that do not require the speed or bandwidth of the AHB. The APB connects to the AHB via the APB Bridge.
Page 549
This is the access method used by Ethernet. See also MAC and Back Off Time. Direct Memory Access. The LH79524/LH79525 includes an on-chip DMA Controller. 20-2...
Page 550
An ED includes a Transfer Descriptor pointer. Embedded SRAM In the LH79524/LH79525, 16KB of on-chip SRAM. The LCD controller has access to an internal frame buffer in embedded SRAM and an extension buffer in SDRAM for dual panel or large displays. The core and DMA controller share the main system bus, providing access to all external memory devices and the embedded SRAM frame buffer.