Page 2
Freescale Semiconductor product could Asia/Pacific: create a situation where personal injury or death may occur. Should Buyer Freescale Semiconductor Hong Kong Ltd.
Page 3
1.3.27 System Debug Support ......... . 1-10 MCF52277 Reference Manual, Rev. 1...
About This Book The primary objective of this reference manual is to define the MCF52277 processor for software and hardware developers. In addition, this manual supports the MCF52274. This book is written from the perspective of the MCF52277, and unless otherwise noted, the information applies also to the MCF52274.
Page 24
SDRAM controller. It begins with a general description and includes a description of signals involved in DRAM operations. The remainder of the chapter describes the programming model and signal timing, as well as the command set required for synchronous operations. MCF52277 Reference Manual, Rev. 0 xxiv Freescale Semiconductor...
Page 25
1149.1 standard and provides additional information specific to the device. For internal details and sample applications, see the IEEE 1149.1 document. Suggested Reading This section lists additional reading that provides background for the information in this manual as well as general information about ColdFire architecture. MCF52277 Reference Manual, Rev. 0 Freescale Semiconductor...
(Chapter 1) of a device’s reference manual. • Application notes—These short documents address specific design issues useful to programmers and engineers working with Freescale Semiconductor processors. Additional literature is published as new processors become available. For a current list of ColdFire documentation, refer to http://www.freescale.com/coldfire.
Page 27
The only exceptions to this appear in the discussion of serial communication modules that support variable-length data transmission units. To simplify the discussion these units are referred to as words regardless of length. MCF52277 Reference Manual, Rev. 0 Freescale Semiconductor...
JEDEC Joint Electron Device Engineering Council JTAG Joint Test Action Group LIFO Last-in, first-out Least recently used Least-significant byte Least-significant bit Multiply accumulate unit, also Media access controller Most-significant byte Most-significant bit MCF52277 Reference Manual, Rev. 0 xxviii Freescale Semiconductor...
Page 29
Any control register (example VBR is the vector base register) MAC registers (ACC, MAC, MASK) Any address or data register Destination register w (used for MAC instructions only) Ry,Rx Any source and destination registers, respectively MCF52277 Reference Manual, Rev. 0 Freescale Semiconductor xxix...
Page 30
Signal displacement value, n bits wide (example: d16 is a 16-bit displacement) Scale factor (x1, x2, x4 for indexed addressing mode, <<1n>> for MAC operations) Operations Arithmetic addition or postincrement indicator – Arithmetic subtraction or predecrement indicator Arithmetic multiplication MCF52277 Reference Manual, Rev. 0 Freescale Semiconductor...
Most significant word Revision History Table iii provides a revision history for this document. Table iii. MCF52277RM Revision History Revision Revision Description of Changes Number Date 04/2008 First public revision of this document. MCF52277 Reference Manual, Rev. 0 Freescale Semiconductor xxxi...
This document provides details of the MCF5227x microprocessor family, focusing on its highly diverse feature set. It was written from the perspective of the MCF52277 device. However, it also pertains to the MCF52274. See the following section for a summary of differences between the various devices of the MCF5227x family.
Overview Block Diagram Figure 1-1 shows a top-level block diagram of the MCF52277 superset device. MCF52277 Version 2 ColdFire Core JTAG Oscillator Configurable Cache Serial Boot Facility Hardware EMAC Divide 128 K USB OTG eDMA Controller SRAM Instruction Bus Data Bus...
Overview Features The following is a brief summary of the functional blocks in the MCF52277 superset device followed by a module-by-module feature list. ® • Version 2 ColdFire Core with EMAC • Up to 159 Dhrystone 2.1 MIPS @ 166.67 MHz •...
• Core watchdog timer with a 2 (where n = 8–31) clock cycle selectable timeout period • Core fault reporting 1.3.8 Crossbar Switch Module • Concurrent access from different masters to different slaves MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Universal Serial Bus (USB) 2.0 On-The-Go (OTG) Controller • Support for full speed (FS) and low speed (LS) via an on-chip FS/LS transceiver • Uses 60 MHz reference clock based off of the system clock or from an external pin MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
FlexCAN Module • Full implementation of the CAN protocol specification version 2.0B — Standard data and remote frames (up to 109 bits long) — Extended data and remote frames (up to 127 bits long) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Input capture and reference compare modes 1.3.19 DMA Serial Peripheral Interface (DSPI) • Full-duplex, three-wire synchronous transfer • Up to three chip selects available • Master and slave modes with programmable master bit-rates MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Combinational path to provide wake-up from low power modes 1.3.24 Edge Port Module • Each pin can be individually configured as low level sensistive interrupt pin or edge-detecting interrupt pin (rising, falling, or both) • Exit stop mode via level-detect function MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
General Purpose I/O interface • Up to 47 bits of GPIO for the MCF52274 (176 LQFP) • Up to 55 bits of GPIO for the MCF52277 (196 MAPBGA) • Bit manipulation supported via set/clear functions • Various unused peripheral pins may be used as GPIO 1.3.27...
0xFC0B_8000 SDRAM Controller 0xFC0B_C000 0xFC0C_0000 Documentation Documentation is available from a local Freescale distributor, a Freescale sales office, the Freescale Literature Distribution Center, or through the Freescale world-wide web address at http://www.freescale.com/coldfire. MCF52277 Reference Manual, Rev. 1 1-12 Freescale Semiconductor...
Most pins that are muxed with GPIO will default to their GPIO functionality. See Table 2-1 for a list of the exceptions. Table 2-1. Special-Case Default Signal Functionality Default Signal FB_BE/BWE[3:0] FB_BE/BWE[3:0] FB_CS[3:0] FB_CS[3:0] FB_OE FB_OE FB_TA FB_TA MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
512 internal system bus clock cycles in response to any internal or external reset. (The exact time depends on how long it takes for the PLL to lock and/or the serial boot sequence to complete.) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
These three-state outputs are the 24 lsbs of the internal 32-bit address bus. Data Bus FB_D[31:0] These three-state bidirectional signals provide the general purpose data path between the processor and all other devices. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
The SD_DQMn should be connected to individual SDRAM DQM signals. Most SDRAMs associate DQM3 with the MSB, in which case SD_DQM3 should be connected to the SDRAM's DQM3 input. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Table 2-10. DMA Signals Signal Name Abbreviation Function DMA Request DREQ0 Asserted by an external device to request a DMA transfer. DMA Acknowledge DACK0 Asserted by processor to indicate DMA request has been recognized. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Waveform output for channel 7 of the PWM module. Also functions as an input for the emergency shutdown feature of the PWM. PWM[5,3,1,0] Outputs PWM[5,3,1,0] Waveform output for channels 5, 3, 1, and 0 respectively. MCF52277 Reference Manual, Rev. 1 2-10 Freescale Semiconductor...
Signal Name Abbreviation Function Synchronous Serial DSPI_SOUT Provides the serial data from the DSPI, which may be driven on the Output rising or falling edge of DSPI_SCK. Each byte is sent msb first. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 2-11...
This clock signal is output from the device when it is the master. When in I S master mode, this signal is referred to as the oversampling clock. The frequency of SSI_MCLK is a multiple of the frame clock. MCF52277 Reference Manual, Rev. 1 2-12 Freescale Semiconductor...
TDO changes on the falling edge of TCLK. BDM Signals Development Serial DSCLK Clocks the serial communication port to the BDM module during Clock packet transfers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 2-13...
Page 58
DDATA[3:0] Display captured processor data and breakpoint status. The PSTCLK signal can be used by the development system to know when to sample DDATA[3:0]. Only present on the BGA device (MCF52277). Processor Status PST[3:0] Indicate core status, as shown in Table 2-22.
These pins supply positive power to the RTC module. — ADC supply VDD_ADC Dedicated power supply for the touchscreen controller/ADC. — VSS_ADC Ground These pins are the negative supply (ground) for the device. — MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 2-15...
Figure 3-1. V2 ColdFire Core Pipelines The instruction fetch pipeline (IFP) is a two-stage pipeline for prefetching instructions. The prefetched instruction stream is then gated into the two-stage operand execution pipeline (OEP), which decodes the MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
— Four 48-bit accumulator registers partitioned as follows: – Four 32-bit accumulators (ACC0–ACC3) – Eight 8-bit accumulator extension bytes (two per accumulator). These are grouped into two 32-bit values for load and store operations (ACCEXT01 and ACCEXT23). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Figure 3-2. Data Registers (D0–D7) 3.2.2 Address Registers (A0–A6) These registers can be used as software stack pointers, index registers, or base address registers. They can also be used for word and longword operations. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
These instructions are described in the ColdFire Family Programmer’s Reference Manual. All other instruction references to the stack pointer, explicit or implicit, access the active A7 register. NOTE The SSP is loaded during reset exception processing with the contents of location 0x0000_0000. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Overflow condition code bit. Set if an arithmetic overflow occurs implying the result cannot be represented in operand size; otherwise cleared. Carry condition code bit. Set if a carry out of the operand msb occurs for an addition or if a borrow occurs in a subtraction; otherwise cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
The base address register includes a base address, write-protect bit, address space mask bits, and an enable bit. RAMBAR determines the base address of the on-chip RAM. For more information, refer to Section 6.2.1, “SRAM Base Address Register (RAMBAR)”. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
In these diagrams, the internal structure of the instruction fetch and operand execution pipelines is shown: Opword Core Bus Address Extension 1 FIFO Core Bus Read Data Extension 2 Figure 3-9. Version 2 ColdFire Processor Instruction Fetch Pipeline Diagram MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 70
Ry,<mem>x For simple register-to-register instructions, the first stage of the OEP performs the instruction decode and fetching of the required register operands (OC) from the dual-ported register file, while the actual MCF52277 Reference Manual, Rev. 1 3-10 Freescale Semiconductor...
Page 71
) is optimized to support a two-cycle execution time. The following example move.l <mem>y,Rx Figure 3-12 shows an effective address of the form <ea>y = (d16,Ay), i.e., a 16-bit signed displacement added to a base register Ay. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-11...
Page 72
For register-to-memory (store) operations, the stage functions (DS/OC, AG/EX) are effectively performed simultaneously allowing single-cycle execution. See Figure 3-14 where the effective address is of the form <ea>x = (d16,Ax), i.e., a 16-bit signed displacement added to a base register Ax. MCF52277 Reference Manual, Rev. 1 3-12 Freescale Semiconductor...
Page 73
Figure 3-15 depict the execution templates for these three classes of instructions. In these diagrams, the x-axis represents time, and the various instruction operations are shown progressing down the operand execution pipeline. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-13...
ISA revisions, ISA_B and ISA_C. The new opcodes primarily addressed three areas: 1. Enhanced support for byte and word-sized operands 2. Enhanced support for position-independent code 3. Miscellaneous instruction additions to address new functionality MCF52277 Reference Manual, Rev. 1 3-14 Freescale Semiconductor...
(IACK) bus cycle to obtain the vector number from the interrupt controller. The IACK cycle is mapped to special locations within the interrupt controller’s address space with the interrupt level encoded in the address. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-15...
There is a 4-bit fault status field, FS[3:0], at the top of the system stack. This field is defined for access and address errors only and written as zeros for all other exceptions. See Table 3-7. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-17...
Accordingly, the PC contained in the exception stack frame merely represents the location in the program when the access error was signaled. All programming model updates associated with the write instruction are completed. The NOP instruction can collect access errors for writes. This instruction delays its MCF52277 Reference Manual, Rev. 1 3-18 Freescale Semiconductor...
PC-relative change-of-flow instructions Conditional (Bcc) and unconditional (BRA) branches, subroutine calls (BSR) Move Quick (MOVEQ), Move with sign extension (MVS) and zero fill (MVZ) Logical OR (OR) Subtract (SUB), Subtract Extended (SUBX) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-19...
Page 80
1. The instruction before the stop executes and then generates a trace exception. In the exception stack frame, the PC points to the stop opcode. 2. When the trace handler is exited, the stop instruction executes, loading the SR with the immediate operand from the instruction. MCF52277 Reference Manual, Rev. 1 3-20 Freescale Semiconductor...
(3) adjusts the stack pointer by adding the format value to the auto-incremented address after the fetch of the first longword, and then (4) transfers control to the instruction address defined by the second longword operand within the stack frame. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-21...
0x0000_0004 is loaded into the program counter. After the initial instruction is fetched from memory, program execution begins at the address in the PC. If an access error or address error occurs before the first instruction is executed, the processor enters the fault-on-fault state. MCF52277 Reference Manual, Rev. 1 3-22 Freescale Semiconductor...
Page 83
FPU present. This bit signals if the optional floating-point (FPU) execution engine is present in processor core. 0 FPU execute engine not present in core. (This is the value used for this device.) 1 FPU execute engine is present in core. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-23...
Page 84
Information loaded into D1 defines the local memory hardware configuration as shown in the figure below. BDM: Load: 0x081 (D1) Access: User read-only BDM read-only Store: 0x181 (D1) CLSZ CCAS CCSZ Reset MBSZ SRAMSZ Reset Figure 3-19. D1 Hardware Configuration Info MCF52277 Reference Manual, Rev. 1 3-24 Freescale Semiconductor...
• R/W is the number of operand reads (R) and writes (W) required by the instruction. An operation performing a read-modify-write function is denoted as (1/1). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-25...
Table 3-13 lists timings for MOVE.L. NOTE For all tables in this section, the execution time of any instruction using the PC-relative effective addressing modes is the same for the comparable An-relative mode. MCF52277 Reference Manual, Rev. 1 3-26 Freescale Semiconductor...
The execution time for STOP is the time required until the processor begins sampling continuously for interrupts. PEA execution times are the same for (d16,PC). PEA execution times are the same for (d8,PC,Xn*SF). MCF52277 Reference Manual, Rev. 1 3-30 Freescale Semiconductor...
(1/0) (1/0) 4(0/0) Effective address of (d16,PC) not supported Storing an accumulator requires one additional processor clock cycle when saturation is enabled, or fractional rounding is performed (MACSR[7:4] equals 1---, -11-, --11) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 3-31...
Page 92
— — — — — 5(1/0) — — — — — Table 3-19. Bcc Instruction Execution Times Forward Forward Backward Backward Opcode Taken Not Taken Taken Not Taken 3(0/0) 1(0/0) 2(0/0) 3(0/0) MCF52277 Reference Manual, Rev. 1 3-32 Freescale Semiconductor...
The three areas of functionality are addressed in detail in following sections. The logic required to support this functionality is contained in a MAC module (Figure 4-1). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 94
( )x i k b 0 ( )x i ( ) b 1 ( )x i 1 b 2 ( )x i 2 b 3 ( )x i 3 – – – – Eqn. 4-2 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
MAC or MSAC instruction is executed, the PAVn flag associated with the destination accumulator is used to form the general overflow flag, MACSR[V]. After set, each flag remains set until V is cleared by a move.l, MACSR instruction or the accumulator is loaded directly. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 96
MULS and MULU instructions. Zero. Set if the result equals zero, otherwise cleared. This bit is affected only by MAC, MSAC, and load operations; it is not affected by MULS and MULU instructions. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
This minimizes the addressing support required for filtering, convolution, or any routine that implements a data array as a circular queue. For MAC + MOVE operations, the MASK contents can optionally be included in all memory effective address calculations. The syntax is as follows: mac.sz Ry,RxSF,<ea>y&,Rw MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Performs a simple AND with the operand address for MAC instructions. MASK 4.2.3 Accumulator Registers (ACC0–3) The accumulator registers store 32-bits of the MAC operation result. The accumulator extension registers form the entire 48-bit result. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
For all operations, the resulting 40-bit product is extended to a 48-bit value (using sign-extension for signed integer and fractional operands, zero-fill for unsigned integer operands) before being combined with the 48-bit destination accumulator. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 101
Complete Accumulator [47:0] = {ACCextn[15:8], ACCn[31:0], ACCextn[7:0]} if MACSR[6:5] == 10 /* unsigned integer mode */ Complete Accumulator[47:0] = {ACCextn[15:0], ACCn[31:0]} The four accumulators are represented as an array, ACCn, where n selects the register. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
16-bit number possible. Let the high-order 16 bits of R0 be named R0.U and the low-order 16 bits be R0.L. • If R0.L is less than 0x8000, the result is truncated to the value of R0.U. • If R0.L is greater than 0x8000, the upper word is incremented (rounded up). MCF52277 Reference Manual, Rev. 1 4-10 Freescale Semiconductor...
Page 103
; save the accumulator extensions move.l accext23,d5 move.l mask,d6 ; save the address mask movem.l #0x00ff,(a7) ; move the state to memory This code performs the EMAC state restore: EMAC_state_restore: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 4-11...
MASK,Rx Store MAC Mask Reg Writes the contents of the MASK to a CPU register move.l {Ry,#imm},ACCext01 Loads the accumulator 0,1 extension bytes with a 32-bit Load Accumulator Extensions 01 operand MCF52277 Reference Manual, Rev. 1 4-12 Freescale Semiconductor...
1. The minus 1 factor is needed because the OEP and EMAC pipelines overlap by a cycle, the AGEX stage. As the store-accumulator instruction reaches the AGEX stage where the operation is performed, the recently updated accumulator 0 value is available. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 4-13...
For the EMAC, assemblers support this syntax and no explicit reference to an accumulator is interpreted as a reference to ACC0. Assemblers also support syntaxes where the destination accumulator is explicitly defined. MCF52277 Reference Manual, Rev. 1 4-14 Freescale Semiconductor...
Page 107
= 0x0000_7fff_ffff else result[47:0] = 0xffff_8000_0000 else if (MACSR.OMC == 1) then /* overflowed MAC, saturationMode enabled */ if (product[63] == 1) then result[47:0] = 0xffff_8000_0000 else result[47:0] = 0x0000_7fff_ffff MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 4-15...
Page 108
(MACSR.OMC == 0 || MACSR.PAVn == 0) then { MACSR.PAVn = 0 if (sz == word) then {if (U/Ly == 1) then operandY[31:0] = {Ry[31:16], 0x0000} else operandY[31:0] = {Ry[15:0], 0x0000} if (U/Lx == 1) MCF52277 Reference Manual, Rev. 1 4-16 Freescale Semiconductor...
Page 109
MACSR.PAVn = 0 /* select the input operands */ if (sz == word) then {if (U/Ly == 1) then operandY[31:0] = {0x0000, Ry[31:16]} else operandY[31:0] = {0x0000, Ry[15:0]} if (U/Lx == 1) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 4-17...
Page 110
(accumulationOverflow == 1) then {MACSR.PAVn = 1 MACSR.V = 1 if (inst == MSAC && MACSR.OMC == 1) then result[47:0] = 0x0000_0000_0000 else if (MACSR.OMC == 1) then /* overflowed MAC, saturationMode enabled */ MCF52277 Reference Manual, Rev. 1 4-18 Freescale Semiconductor...
[31:12] for a split configuration of the fetch address from the local bus to determine if a cache hit has occurred. If the desired address is mapped into the cache memory, the MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Memory Map/Register Definition Three supervisor registers define the operation of the cache and local bus controller: the cache control register (CACR) and two access control registers (ACR0, ACR1). Table 5-1 below shows the memory map MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Cache enable. The memory array of the cache is enabled only if CENB is asserted. This bit, along with the DISI CENB (disable instruction caching) and DISD (disable data caching) bits, control the cache configuration. 0 Cache disabled 1 Cache enabled Table 5-3 describes cache configuration. 30–29 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 116
CLNF[1:0] for non-cacheable accesses. Non-cacheable accesses are never written into the memory array. See Table 5-7. 0 Disable burst fetches on non-cacheable accesses 1 Enable burst fetches on non-cacheable accesses MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 117
Data Cache 8 KByte direct-mapped write-through data cache (uses all of tag and storage arrays) Table 5-4 shows the relationship between CACR[DISI, DISD, INVI, & INVD] and setting the cache invalidate all bit (CACR[CINV]). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
The cache processes any fetch access in the normal manner. 5.3.1 Interaction with Other Modules Because the cache and high-speed SRAM module are connected to the ColdFire core's local data bus, certain user-defined configurations can result in simultaneous fetch processing. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
A hardware reset clears the CACR and disables the cache. The contents of the tag array are not affected by the reset. Accordingly, the system startup code must explicitly perform a cache invalidation by setting CACR[CINV] before the cache can be enabled. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Generally, longword references are used for sequential instruction fetches. If the processor branches to an odd word address, a word-sized instruction fetch is generated. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 122
All instruction fetches are word or longword in size, and not loaded into the line-fill buffer Non-cacheable Instruction fetch size is defined by Table 5-6 loaded into the line-fill buffer, but are never written into the memory array. MCF52277 Reference Manual, Rev. 1 5-10 Freescale Semiconductor...
• One 128 Kbyte SRAM • Single-cycle access • Physically located on the processor's high-speed local bus • Memory location programmable on any 0-modulo-128 Kbyte address • Byte, word, and longword address capabilities MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
SRAM memory. For example, writes to addresses 0x8000_0000 and 0x8002_0000 modify the same memory location. System software should ensure SRAM address pointers do not exceed the SRAM size to prevent unwanted overwriting of SRAM. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 125
0 Allows read and write accesses to the SRAM module from non-core masters. 1 Allows only read accesses to the SRAM module from non-core masters. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
The following code segment describes how to initialize the SRAM. The code sets the base address of the SRAM at 0x8000_0000 and initializes the SRAM to zeros. RAMBASE EQU 0x80000000 ;set this variable to 0x80000000 RAMVALID EQU 0x00000001 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Additionally, if the SRAM contains only instructions, masking operand accesses can reduce power dissipation. Table 6-3 shows examples of typical RAMBAR settings. Table 6-3. Typical RAMBAR Setting Examples Data Contained in SRAM RAMBAR[7:0] Instruction Only 0x2B Data Only 0x35 Instructions and Data 0x21 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
(SBF controls many configuration options, clocks to the SDRAMC controller are disabled when the device is in limp mode, and the clocks to individual modules may be disabled via the peripheral power management registers as described in Chapter 8, “Power Management”). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 130
When loading boot code via the SBF, the device is clocked by the main oscillator (f The LCD controller is also given a 32 Hz clock for the cursor blink counter. Figure 7-1. Device Clock Connections MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
• Direct clocking of system by input clock, bypassing the PLL • Loss-of-lock reset • Reference crystal oscillator for the real time clock (RTC) module. Input clock used is programmable within the RTC. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
However, it is able to capture a wake-up event to release the processor from limp mode. When switching from limp mode to normal functional mode, you must ensure that any peripheral transactions in progress are allowed to complete to avoid data loss or corruption. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
There is also a fast wake-up option for quickly enabling the system clocks during stop recovery (LPCR[FWKUP]). This eliminates the wake-up recovery time but at the risk of sending a potentially unstable clock to the system. Memory Map/Register Definition The PLL programming model consists of the following: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
× PFDR Eqn. 7-1 where f is the PLL input frequency from the internal oscillator or EXTAL clock source (defined by the selected chip configuration). 23–20 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
PFDR must also be selected such that the VCO frequency (f 300–540 MHz. The other clocks on the processor are configurable in a similar fashion. However, there are various dependencies. See Section 7.2.1, “PLL Control Register (PCR),” for details. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
PLL has re-locked, the PLL does not update the PSR[LOCKS] status bit. The LOCKS status bit is sticky, and the user must clear it before the PLL can write the register again. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
USB_CLKIN in the USB OTG column indicates that the USB On-the-Go module receives its clock from the USB_CLKIN signal rather than the PLL output. Table 7-5. MCF52277 Clocking Scenarios (MHz) Input Reference/ OUTDIV1...
0xFC0A_0012 Clock Divider Register (CDR) 0x0001 10.3.6/10-13 User access to supervisor only address locations have no effect and result in a bus error The MISCCR and CDR registers are described in Chapter 9, “Chip Configuration Module (CCM).” MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Table 8-2. WCR Field Descriptions Field Description Enable low-power mode entry. The mode entered is specified in WCR[LPMD]. ENBWCR 0 Low-power mode entry is disabled 1 Low-power mode entry is enabled. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Because the operation of the crossbar switch and the system control module (SCM) are fundamental to the operation of the device, the clocks for these modules cannot be disabled. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 146
Take extreme caution when setting PPMR[CD40] to disable clocking of the CCM, reset controller, and power management modules. This may disable logic to reset the chip and disable the external bus monitor or other logic contained within these blocks. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
See Section 8.2.4, “Peripheral Power Management Registers (PPMHR & PPMLR),” for more information. A peripheral may be disabled at any time and remains disabled during any low-power mode of operation. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Wait mode is intended to stop only the CPU and memory clocks until a wake-up event is detected. In this mode, peripherals may be programmed to continue operating and can generate interrupts, causing the CPU to exit from wait mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 150
The ColdFire core disables during any low-power mode. No recovery time is required when exiting any low-power mode. 8.3.4.2 Internal SRAM The SRAM is disabled during any low-power mode. No recovery time is required when exiting any low-power mode. MCF52277 Reference Manual, Rev. 1 8-10 Freescale Semiconductor...
Depending on the setting of the CWCR[CWRI] field, a core watchdog timeout may reset the device. Other settings of the CWRI field may enable a core watchdog interrupt and upon a watchdog timeout, this MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 152
EDMA_EEIR[EEIn] is set, and an interrupt generates when any of the EDMA_ESR bits become set. The eDMA controller is stopped in stop mode and thus cannot cause an exit from this low-power mode. MCF52277 Reference Manual, Rev. 1 8-12 Freescale Semiconductor...
Page 153
In stop mode, there is a pen-down event that can generate an interrupt to wake-up the device. Upon exiting stop mode, the touschreen controller resumes operation from the state prior to stop mode entry. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
CAN bus (11 consecutive recessive bits), and only then does it search for the correct conditions to stop. • Trying to stop the FlexCAN immediately after reset is allowed only after basic initialization has been performed. MCF52277 Reference Manual, Rev. 1 8-14 Freescale Semiconductor...
Page 155
8.3.4.23 UART Modules (UART0–2) In wait and doze modes, the UARTs are unaffected and may generate an interrupt to exit these low-power modes. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 8-15...
Page 156
The JTAG (Joint Test Action Group) controller logic is clocked using the TCLK input and not affected by the system clock. The JTAG cannot generate an event to cause the processor to exit any low-power mode. Toggling TCLK during any low-power mode increases the system current consumption. MCF52277 Reference Manual, Rev. 1 8-16 Freescale Semiconductor...
The available bus control signals include FB_R/W, FB_TS, FB_TA, FB_OE, and FB_BE/BWE[3:0]. Up to six chip selects can be programmed to select and control external devices and to provide bus cycle termination. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Note: See DRAMSEL bit description for reset value. Note: CCR[7:0] reset value depends upon chosen reset configuration. Default reset value (BOOTMOD = 00 or 01) is the value of RCON[7:0]. Figure 9-2. Chip Configuration Register (CCR) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
RCON values can be overridden only during reset configuration (see Section 9.4.1, “Reset Configuration”) if the external BOOTMOD[1:0] pins are driven to 10 or 11. RCON is a read-only register and contains the same fields as the CCR register, except for DRAMSEL. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
SSI/timer DMA mux control and other miscellaneous control functionality. Address: 0xFC0A_0010 (MISCCR) Access: Supervisor read/write LCDC LIMP Reset See Note See Note Note: Reset value depends on RCON type. See Table 9-6. Figure 9-5. Miscellaneous Control Register (MISCCR) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 162
Bus monitor external enable bit. Enables the bus monitor to operate during external FlexBus cycles 0 Bus monitor disabled on external FlexBus cycles 1 Bus monitor enabled on external FlexBus cycles MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 163
USB clock source. Selects between the PLL and the external USB_CLKIN external pin as the clock source for USBSRC the serial and ULPI interfaces of the USB module. 0 USB_CLKIN pin drives USB serial interface clocks. 1 PLL drives USB serial interface clocks. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
1 On-chip 50 kΩ pull-downs enabled on OTG D+ and D- transceiver pins of on-chip transceiver. Functional Description 9.4.1 Reset Configuration During reset, the pins for the reset override functions are immediately configured to known states. Table 9-10 shows the states of the external pins while in reset. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 166
8-bit (split bus) or 32-bit (unified bus) 16-bit split bus FB_A18 Output Pad Drive Strength All output pins RCON[4] Low Drive Strength High Drive Strength FB_A19 PLL Mode (none) RCON[5] PLL mode Limp mode MCF52277 Reference Manual, Rev. 1 9-10 Freescale Semiconductor...
Page 167
Affected CCM SBF_RCON Bits Pin(s) Affected Function Register Bit(s) Mnemonic Bit Num BOOTPS 31:30 Boot Port Size 32-bit port FB_D[31:0] CCR[3:2] 8-bit port 16-bit port 16-bit port DRAMSEL SDR/DDR Config (none) CCR[8] MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 9-11...
Page 168
OSCMODE Oscillator Mode (none) CCR[1] Crystal oscillator mode Oscillator bypass mode LIMP Limp Mode (none) CCR[5] PLL mode Limp mode External Bus Monitor Enable (none) CCR[11] Bus monitor disabled Bus monitor enabled MCF52277 Reference Manual, Rev. 1 9-12 Freescale Semiconductor...
Page 169
USB VBUS Overcurrent Sense Polarity USB_VBUS_OC MISCCR[1] USB_VBUS_OC is active-low USB_VBUS_OC is active-high USBSRC USB Clock Source USB_CLKIN MISCCR[0] USB_CLKIN pin drives USB serial interface clock PLL drives USB serial interface clocks MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 9-13...
RCON pin is asserted. 9.4.4 Chip Select Configuration The chip select (FB_CS[5:4]) configuration is selected during reset and reflected in the CCR[CSC] field. After reset is exited, the chip select configuration cannot be changed. MCF52277 Reference Manual, Rev. 1 9-14 Freescale Semiconductor...
After reset, the device can be configured for operation during the low power modes using the low power control register (LPCR). For more information on this register, see Section 8.2.5, “Low-Power Control Register (LPCR).” MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 9-15...
SPI memory clock frequency, configures an extended set of power-up options for the processor, and optionally loads code into the on-chip SRAM. Through interaction with the reset controller, the SBF performs these actions so that the chip is properly configured after exiting the reset state. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 10-1...
0xFC0A_0020 SBFCR—Serial Boot Facility Control Register See Section 10.3.2/10-3 10.3.1 Serial Boot Facility Status Register (SBFSR) The read-only SBFSR register reflects the amount of boot code loaded through the external SPI memory. MCF52277 Reference Manual, Rev. 1 10-2 Freescale Semiconductor...
BLDIV field is written. Any subsequent writes to this field prior to a power-on reset event terminate without effect. 0 SBF uses the standard command READ 1 SBF uses the FAST_READ command MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 10-3...
SPI memory output switches from high-impedance to logic 0. 4. The SBF shifts the standard SPI memory read command (0x03) followed by repeated 0x00 address ÷ 67. bytes to the SPI memory at f MCF52277 Reference Manual, Rev. 1 10-4 Freescale Semiconductor...
After boot load is complete or if no boot load is requested (SBFSR[BLL] = 0), the following steps complete the serial boot process: 1. The acquired configuration data is driven to the appropriate modules. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 10-5...
CODE_BYTE_[4 × (BLL + 1) - 1] This assumes SBFSR[BLL] is set. If BLL is cleared, the SBF does not access data at these addresses. Start of the user code copied into the on-chip SRAM. MCF52277 Reference Manual, Rev. 1 10-6 Freescale Semiconductor...
FAST_READ feature altogether. Even when the delays within the processor itself are minimized, the actual SPI memories may have similarly untenable electrical specifications (data input setup and output valid times). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 10-7...
— Core watchdog timer — Phase locked-loop (PLL) loss of lock — Software • Software-assertable RSTOUT pin independent of chip-reset state • Software-readable status flags indicating the cause of the last reset MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 11-1...
Internal byte, word, or longword writes are guaranteed to complete without data corruption when a synchronous reset occurs. External writes, including longword writes to 16-bit ports, are also guaranteed to complete. MCF52277 Reference Manual, Rev. 1 11-4 Freescale Semiconductor...
Figure 11-4. In this figure, the control state boxes have been numbered, and these numbers are referred to (within parentheses) in the flow description that follows. All cycle counts given are approximate. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 11-5...
Page 186
(Parallel RCON) Figure 11-4. Reset Control Flow 11.4.2.1 Synchronous Reset Requests In this discussion, the reference in parentheses refer to the state numbers in Figure 11-4. All cycle counts given are approximate. MCF52277 Reference Manual, Rev. 1 11-6 Freescale Semiconductor...
If other reset sources are asserted after the RSR status bits have been latched (4 or 5), the device is held in reset (9 or 10) until all sources have negated and the subsequent sources are not reflected in the RSR contents. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 11-7...
— Core watchdog control register (CWCR) for watchdog timer control — Core watchdog service register (CWSR) to service watchdog timer — SCM interrupt status register (SCMISR) to service a bus fault or watchdog interrupt • Core fault reporting registers MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 12-1...
The MPR specifies five 4-bit fields defining the access-privilege level associated with a bus master in the device to the various peripherals listed in Table 12-4. The register provides one field per bus master. MCF52277 Reference Manual, Rev. 1 12-2 Freescale Semiconductor...
Each of the peripherals has a four-bit PACRn field that defines the access levels supported by the given module. Eight PACRs are grouped together to form a 32-bit PACRx register (PACRA-PACRI). At reset the SCM (PACR0) does not allow access from untrusted masters, while the other peripherals do. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 12-3...
Page 194
1 This peripheral requires supervisor privilege level for accesses. The master privilege level must indicate supervisor access attribute, and the MPROTn[MPL] control bit for the master must be set. If not, access terminates with an error response and no peripheral access initiates. MCF52277 Reference Manual, Rev. 1 12-6 Freescale Semiconductor...
0 Core watchdog timer stops counting if the core is halted. 1 Core watchdog timer continues to count even while the core is halted. Core watchdog timer enable. 0 CWT is disabled. 1 CWT is enabled. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 12-7...
SCMISR provides a program visible interrupt request from the watchdog timer. During the interrupt service routine that manages this interrupt, the source must be explicitly cleared by writing a 0x01 to the SCMISR. MCF52277 Reference Manual, Rev. 1 12-8 Freescale Semiconductor...
Indicates the faulting address of the last core access terminated with an error response. ADDR 12.2.8 Core Fault Interrupt Enable Register (CFIER) The CFIER register enables the system bus-error interrupt. See Chapter 15, “Interrupt Controller Modules,” for more information of the interrupt controller. MCF52277 Reference Manual, Rev. 1 12-10 Freescale Semiconductor...
1 Error occurred within the core. 6–0 Reserved, must be cleared. 12.2.10 Core Fault Attributes Register (CFATR) The read-only CFATR register captures the processor’s attributes of the last faulted core access to the system bus. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 12-11...
To prevent the core watchdog timer from interrupting or resetting, the CWSR register must be serviced by performing the following sequence: 1. Write 0x55 to CWSR. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 12-13...
The details on the core fault recovery registers are provided in the above sections. These registers are used to capture fault recovery information on any processor-initiated system bus cycle terminated with an error. MCF52277 Reference Manual, Rev. 1 12-14 Freescale Semiconductor...
— Allows concurrent accesses from different masters to different slaves — Slave arbitration attributes configured on a slave by slave basis • 32 bits wide and supports byte, word (2 byte), longword (4 byte), and 16 byte burst transfers MCF52277 Reference Manual, Rev. 1 13-2 Freescale Semiconductor...
The priority registers (XBS_PRSn) set the priority of each master port on a per slave port basis and reside in each slave port. The priority register can be accessed only with 32-bit accesses. After the MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 206
Master 4 (LCD Controller) priority. See M7 description. 15–7 Reserved, must be cleared. 6–4 Master 1 (eDMA) priority. See M7 description. Reserved, must be cleared. 2–0 Master 0 (ColdFire core) priority. See M7 description. MCF52277 Reference Manual, Rev. 1 13-4 Freescale Semiconductor...
01 When no master makes a request, the arbiter parks the slave port on the last master to be in control of the slave port. 10 When no master makes a request, the slave port is not parked on a master and the arbiter drives all outputs to a constant safe state. 11 Reserved. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 13-5...
No initialization is required by or for the crossbar switch. Hardware reset ensures all the register bits used by the crossbar switch are properly initialized to a valid state. Settings and priorities should be programmed to achieve maximum system performance. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 13-7...
NOTE The GPIO functionality of the port IRQ pins is selected by the edge port module. They are shown in the below figure only for completeness. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-1...
• UART • 32-bit DMA timers 14.1.3 Features The ports module includes these distinctive features: • Control of primary function use — On all supported GPIO ports, except those for FB_AD[31:0] pins MCF52277 Reference Manual, Rev. 1 14-2 Freescale Semiconductor...
Most pins that are muxed with GPIO will default to their GPIO functionality. See Table 14-1 for a list of the exceptions. Table 14-1. Special-Case Default Signal Functionality Default Signal FB_BE/BWE[3:0] FB_BE/BWE[3:0] FB_CS[3:0] FB_CS[3:0] FB_OE FB_OE FB_TA FB_TA FB_R/W FB_R/W FB_TS FB_TS MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-3...
PODR_x register, clear the PODR_x bits, or clear the corresponding bits in the PCLRR_x register. Address: 0xFC0A_4005 (PODR_UART) Access: User read/write 0xFC0A_400A (PODR_LCDDATAM) 0xFC0A_400B (PODR_LCDDATAL) PODR_x Reset: Figure 14-2. Port x Output Data Registers (PODR_x) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-11...
The PDDRs are read/write. At reset, all bits in the PDDRs are cleared. Setting any bit in a PDDR_x register configures the corresponding port pin as an output. Clearing any bit in a PDDR_x register configures the corresponding pin as an input. MCF52277 Reference Manual, Rev. 1 14-12 Freescale Semiconductor...
The PPDSDR registers reflect the current pin states and control the setting of output pins when the pin is configured for GPIO. The PPDSDR_x registers are each eight bits wide, but not all ports use all eight bits. The register definitions for all ports are shown in the below figures. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-13...
Page 224
0 Port x pin state is 0 1 Port x pin state is 1 PSDR_x Port x set data bits. (write) 0 No effect. 1 Set corresponding PODR_x bit. Note: See above figures for bit field positions. MCF52277 Reference Manual, Rev. 1 14-14 Freescale Semiconductor...
Figure 14-13. Port x Clear Output Data Registers (PCLRR_x) Table 14-8. PCLRR_x Field Descriptions Field Description PCLRR_x Port x clear data bits. 0 Clears corresponding PODR_x bit 1 No effect Note: See above figures for bit field positions. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-15...
The PAR_CS register controls the functions of the FlexBus chip select pins. After reset the byte enable signals are configured to their primary functions. Address: 0xFC0A_4031 (PAR_CS) Access: User read/write PAR_CS3 PAR_CS2 PAR_CS1 PAR_CS0 Reset: Figure 14-15. Chip Select Pin Assignment Register (PAR_CS) MCF52277 Reference Manual, Rev. 1 14-16 Freescale Semiconductor...
Page 227
0 FB_TA pin configured for GPIO 1 FB_TA pin configured for FlexBus transfer acknowledge function FB_R/W pin assignment. PAR_RWB 0 FB_R/W pin configured for GPIO 1 FB_R/W pin configured for FlexBus read/write function MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-17...
Page 228
UART Pin Assignment Register (PAR_UART) The PAR_UART register controls the functions of the UART pins. Address: 0xFC0A_4034 (PAR_UART) Access: User read/write PAR_U1CTS PAR_U1RTS PAR_U1RXD PAR_U1TXD PAR_U0CTS PAR_U0RTS PAR_U0RXD PAR_U0TXD Reset Figure 14-18. UART Pin Assignment (PAR_UART) MCF52277 Reference Manual, Rev. 1 14-18 Freescale Semiconductor...
Page 229
DSPI pin assignment. These bit fields configure the DSPI pins for one of their primary functions or GPIO. PAR_PCS0 5–4 PAR_PCS0 PAR_SIN PAR_SOUT PAR_SCK PAR_SIN GPIO GPIO GPIO GPIO 3–2 PAR_SOUT Reserved Reserved Reserved Reserved 1–0 PAR_SCK U2RTS U2RXD U2TXD U2CTS DSPI_PCS0 DSPI_SIN DSPI_SOUT DSPI_SCK MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-19...
Page 230
Reserved, must be cleared. 4–3 LCD_ACD/OE pin assignment. PAR_ACD_OE 00 LCD_ACD/OE pin configured as GPIO. 01 Reserved 10 LCD_ACD/OE pin configured for LCD_SPL_SPR function. 11 LCD_ACD/OE pin configured for LCD controller ACD/OE function. MCF52277 Reference Manual, Rev. 1 14-20 Freescale Semiconductor...
Page 231
00 IRQ1 pin configured as GPIO or external interrupt request 1 function as determined by the edge port module. Chapter 16, “Edge Port Module (EPORT),” for details. 01 IRQ1 pin configured for SSI_CLKIN function 10 IRQ1 pin configured for USB_CLKIN function 11 Reserved MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-21...
Page 232
The PAR_LCDL register controls the functions of the LCDC data pins. Address: 0xFC0A_4040 (PAR_LCDL) Access: User read/write PAR_LD11 PAR_LD10 PAR_LD9 PAR_LD8 PAR_LD7 PAR_LD6 PAR_LD5 PAR_LD4 Reset: PAR_LD3 PAR_LD2 PAR_LD1 PAR_LD0 Reset: Figure 14-24. LCD Data Low Pin Assignment (PAR_LCDL) MCF52277 Reference Manual, Rev. 1 14-22 Freescale Semiconductor...
DSE_RSTOUT DSE_FBCLK Reset: See Note Note: Reset state is dependent on the chosen reset configuration. See Chapter 9, “Chip Configuration Module (CCM),” for details. Figure 14-28. Clock/Reset Drive Strength Control Register (DSCR_CLKRST) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-25...
Overview Initial pin function is determined during reset configuration. The pin assignment registers allow the user to select among various primary functions and general purpose I/O after reset. Most pins are configured MCF52277 Reference Manual, Rev. 1 14-26 Freescale Semiconductor...
Data written to the PODR_x register of any pin configured as a general purpose output is immediately driven to its respective pin, as shown in Figure 14-31. FB_CLK Output Data Register Output Pin Figure 14-31. General Purpose Output Timing MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 14-27...
The initialization for the ports module is done during reset configuration. All registers are reset to a predetermined state. Refer to Section 14.3, “Memory Map/Register Definition,” for more details on reset and initialization. MCF52277 Reference Manual, Rev. 1 14-28 Freescale Semiconductor...
During the interrupt exception processing, the CPU enters supervisor mode, disables trace mode, and then fetches an 8-bit vector from the interrupt controller. This byte-sized operand fetch is known as the interrupt acknowledge (IACK) cycle with the ColdFire implementation using a special memory-mapped address MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-1...
0xFC04_C000 Global IACK Registers Space 0xFC05_4000 This address space only contains the global SWIACK and global L1ACK-L7IACK registers. See Section 15.2.10, “Software and Level 1–7 IACK Registers (SWIACKn, L1IACKn–L7IACKn)" for more information MCF52277 Reference Manual, Rev. 1 15-2 Freescale Semiconductor...
If round-robin arbitration is enabled, this bit has no effect. If cleared, the assertion of a level-n request does not affect the processor’s bus master priority. 8–6 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-7...
IMRn register to be cleared. The CIMRn[CALL] bit provides a global clear function, forcing the entire contents of IMRn to be cleared, thus enabling all interrupts. Reads of this register return all zeroes. This MCF52277 Reference Manual, Rev. 1 15-8...
NOTE Only one copy of this register exists among the 2 interrupt controller modules. All reads and writes to this register must be made to the INTC0 memory space. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-9...
NOTE Only one copy of this register exists among the two interrupt controller modules. All reads and writes to this register must be made to the INTC0 memory space. MCF52277 Reference Manual, Rev. 1 15-10 Freescale Semiconductor...
7 interrupt is given the highest priority. If interrupt masking is enabled (ICONFIG[EMASK] = 1), the acknowledgement of a level-n request forces the controller to automatically mask all interrupt requests of level-n and lower. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-11...
Page 251
Write 1 to BUF13I after reading as 1 BUF14I Message Buffer 14 Interrupt Write 1 to BUF14I after reading as 1 BUF15I Message Buffer 15 Interrupt Write 1 to BUF15I after reading as 1 20–42 Not Used MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-13...
The vector number is supplied as the data for the byte-sized IACK read cycle. In addition to providing the vector number, the interrupt controller also loads the level into the CLMASK register, where it may be retrieved later. MCF52277 Reference Manual, Rev. 1 15-14 Freescale Semiconductor...
Page 253
VECTOR pending interrupt source. A read from one of the LnIACK registers returns the highest priority unmasked interrupt source within the level. A write to any IACK register causes an error termination. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-15...
Interrupt Vector Determination After the core has sampled for pending interrupts and begun interrupt exception processing, it generates an interrupt acknowledge cycle (IACK). The IACK transfer is treated as a memory-mapped byte read by MCF52277 Reference Manual, Rev. 1 15-16 Freescale Semiconductor...
If both interrupt controllers have active interrupts at the same level, then the INTC0 interrupt ise serviced first. If INTC1 has an active interrupt with a higher level than the highest INTC0 interrupt, the INTC1 interrupt is serviced first. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 15-17...
Interrupt Service Routines This section focuses on the interaction of the interrupt masking functionality with the service routine. Figure 15-14 presents a timing diagram showing various phases during the execution of an interrupt MCF52277 Reference Manual, Rev. 1 15-18 Freescale Semiconductor...
Page 257
IACK to see if there are any pending properly-enabled requests. Checking for any pending interrupt requests at this time provides ability to initiate processing of MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 258
Obviously, there are many variations to the managing of the SR[I] and the CLMASK values to create a flexible, responsive system for managing interrupt requests within the device. MCF52277 Reference Manual, Rev. 1 15-20 Freescale Semiconductor...
Figure 16-1. EPORT Block Diagram NOTE The GPIO module must be configured to enable the peripheral function of the appropriate pins (refer to Chapter 14, “General Purpose I/O Module”) prior to configuring the edge-port module. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 16-1...
EPORT data register (EPDR). All bits in the EPDR are set at reset. 16.4 Memory Map/Register Definition This subsection describes the memory map and register structure. Refer to Table 16-2 for a description of the EPORT memory map. MCF52277 Reference Manual, Rev. 1 16-2 Freescale Semiconductor...
Software can generate interrupt requests by programming the EPORT data register when the EPDDR selects output. 0 Corresponding EPORT pin configured as input 1 Corresponding EPORT pin configured as output Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 16-4 Freescale Semiconductor...
Edge Port Data Bits. An internal register stores data written to EPDR; if any pin of the port is configured as an output, EPDn the bit stored for that pin is driven onto the pin. Reading EDPR returns the data stored in the register. Reset sets EPD7–EPD1. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 16-5...
1 to it. Writing 0 has no effect. If a pin is configured as level-sensitive (EPPARn equals 00), pin transitions do not affect this register. 0 Selected edge for IRQn pin has not been detected. 1 Selected edge for IRQn pin has been detected. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 16-6 Freescale Semiconductor...
Transfer Control Descriptor (TCD) eDMA Engine Program Model/ Read Data Channel Arbitration Read Data Address Path Control Data Path Write Data Address eDMA Peripheral eDMA Done Request Figure 17-1. eDMA Block Diagram MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-1...
(TCD). The minor loop is the sequence of read-write operations that transfers these NBYTES per service request. A major loop is the number of minor loop iterations defining a task. MCF52277 Reference Manual, Rev. 1 17-2 Freescale Semiconductor...
After a service request has been initiated, it cannot be cancelled. Removing a service request after it has been asserted may result in one of three actions depending on the DMA engine’s status: • The request is never recognized because another channel is executing. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-3...
The channel priority registers assign the priorities (see Section 17.6.15, “eDMA Channel n Priority Registers (DCHPRIn)”). In round-robin arbitration mode, the channel priorities are ignored, and channels are cycled through without regard to priority. MCF52277 Reference Manual, Rev. 1 17-4 Freescale Semiconductor...
The minor loop byte count must be a multiple of the source and destination transfer sizes. • All source reads and destination writes must be configured to the natural boundary of the programmed transfer size respectively. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-5...
Page 270
Address: 0xFC04_4004 (EDMA_ES) Access: User read-only R VLD Reset ERRCHN Reset Figure 17-4. eDMA Error Status Register (EDMA_ES) MCF52277 Reference Manual, Rev. 1 17-6 Freescale Semiconductor...
Page 271
1 The last recorded error was a bus error on a source read. Destination bus error. 0 No destination bus error. 1 The last recorded error was a bus error on a destination write. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-7...
Enable error interrupt n. EEIn 0 The error signal for channel n does not generate an error interrupt. 1 The assertion of the error signal for channel n generates an error interrupt request. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-9...
EDMA_EEI to be cleared. Setting the CAEE bit provides a global clear function, forcing the EDMA_EEI contents to be cleared, disabling all DMA request inputs. Reads of this register return all zeroes. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-11...
Table 17-12. EDMA_CINT Field Descriptions Field Description Reserved, must be cleared. Clear all interrupt requests. CAIR 0 Clear only those EDMA_INT bits specified in the CINT field. 1 Clear all bits in EDMA_INT. MCF52277 Reference Manual, Rev. 1 17-12 Freescale Semiconductor...
The data value on a register write causes the START bit in the corresponding transfer control descriptor to be set. Setting the SAST bit provides a global set function, forcing all START bits to be set. Reads of this register return all zeroes. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-13...
0 Clears only those TCDn_CSR[DONE] bits specified in the CDNE field. 1 Clears all bits in TCDn_CSR[DONE] 5–4 Reserved, must be cleared. 3–0 Clear DONE bit. Clears the corresponding bit in TCDn_CSR[DONE]. CDNE MCF52277 Reference Manual, Rev. 1 17-14 Freescale Semiconductor...
A zero in any bit position has no affect on the corresponding channel’s current error status. The EDMA_CERR is provided so the error indicator for a single channel can easily be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-15...
– Reset value for the channel priority fields, CHPRI, is equal to the corresponding channel number for each priority register, i.e., DCHPRI15[CHPRI] equals 0b1111. Figure 17-17. eDMA Channel n Priority Register (DCHPRIn) MCF52277 Reference Manual, Rev. 1 17-16 Freescale Semiconductor...
Page 284
Note: When the CITER field is initially loaded by software, it must be set to the same value as that contained in the BITER field. Note: If the channel is configured to execute a single service request, the initial values of BITER and CITER should be 0x0001. MCF52277 Reference Manual, Rev. 1 17-20 Freescale Semiconductor...
Page 286
INT_ INT_ STAR MAJOR_LINKCH DONE ACTIVE E_SG D_REQ E_LINK HALF MAJOR Reset — — — — — — — — — — — — — Figure 17-28. TCDn Control and Status (TCDn_CSR) MCF52277 Reference Manual, Rev. 1 17-22 Freescale Semiconductor...
Page 287
Disable request. If this flag is set, the eDMA hardware automatically clears the corresponding DMAERQ bit D_REQ when the current major iteration count reaches zero. 0 The channel’s DMAERQ bit is not affected. 1 The channel’s DMAERQ bit is cleared when the major loop is complete. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-23...
If the major iteration count is exhausted, additional processing are performed, including the final address pointer updates, reloading the TCDn_CITER field, and a possible fetch of the next TCDn from memory as part of a scatter/gather operation. MCF52277 Reference Manual, Rev. 1 17-24 Freescale Semiconductor...
The TCD memory is 64 bits wide to minimize the time needed to fetch the activated channel descriptor and load it into the address path channel x or y registers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-25...
Page 290
The source reads are initiated and the fetched data is temporarily stored in the data path block until it is gated onto the internal bus during the destination write. This source read/destination write processing continues until the minor byte count has transferred. MCF52277 Reference Manual, Rev. 1 17-26 Freescale Semiconductor...
Page 291
TCD from memory using the scatter/gather address pointer included in the descriptor. The updates to the TCD memory and the assertion of an interrupt request are shown in Figure 17-31. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-27...
4. Write the 32-byte TCD for each channel that may request service. 5. Enable any hardware service requests via the EDMA_ERQ. 6. Request channel service by software (setting the TCDn_CSR[START] bit) or hardware (slave device asserting its eDMA peripheral request signal). MCF52277 Reference Manual, Rev. 1 17-28 Freescale Semiconductor...
Page 293
DMA arbitration can occur after each minor loop, and one level of minor loop DMA preemption is allowed. The number of minor loops in a major loop is specified by the beginning iteration count (BITER). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-29...
Page 294
Current Major Loop Iteration Count (CITER) DMA Request Minor Loop DMA Request Minor Loop Major Loop DMA Request Minor Loop Table 17-33 lists the memory array terms and how the TCD settings interrelate. MCF52277 Reference Manual, Rev. 1 17-30 Freescale Semiconductor...
17.8.3 DMA Arbitration Mode Considerations 17.8.3.1 Fixed Channel Arbitration In this mode, the channel service request from the highest priority channel is selected to execute. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-31...
4. eDMA engine reads: channel TCD data from local memory to internal register file. 5. The source-to-destination transfers are executed as follows: a) Read byte from location 0x1000, read byte from location 0x1001, read byte from 0x1002, read byte from 0x1003. MCF52277 Reference Manual, Rev. 1 17-32 Freescale Semiconductor...
Page 297
Write longword to location 0x2004 → second iteration of the minor loop. e) Read byte from location 0x1008, read byte from location 0x1009, read byte from 0x100A, read byte from 0x100B. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-33...
Page 298
MOD field. Here a circular buffer is created where the address wraps to the original value while the 28 upper address bits MCF52277 Reference Manual, Rev. 1 17-34...
TCDn_CITER field and test for a change. The hardware request and acknowledge handshakes signals are not visible in the programmer’s model. The TCD status bits execute the following sequence for a hardware-activated channel: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-35...
The TCDn_CITER[E_LINK] field determines whether a minor loop link is requested. When enabled, the channel link is made after each iteration of the major loop except for the last. When the major MCF52277 Reference Manual, Rev. 1 17-36 Freescale Semiconductor...
This section provides recommended methods to change the programming model during channel execution. 17.8.7.1 Dynamic Channel Linking and Dynamic Scatter/Gather Dynamic channel linking and dynamic scatter/gather is the process of changing the TCDn_CSR[MAJOR_E_LINK] or TCDn_CSR[E_SG] bits during channel execution. These bits are read MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 17-37...
Page 302
NOTE Software must clear the TCDn_CSR[DONE] bit before writing the TCDn_CSR[MAJOR_E_LINK] or TCDn_CSR[E_SG] bits. The TCDn_CSR[DONE] bit is cleared automatically by the eDMA engine after a channel begins execution. MCF52277 Reference Manual, Rev. 1 17-38 Freescale Semiconductor...
ROM access and programmed to be byte (8 bits), word (16 bits), or longword (32 bits) wide. Control signal timing is compatible with common ROM and flash memories. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
The chip-select signal indicates which device is selected. A particular chip-select asserts when the transfer address is within the device’s address space, as defined in the base- and mask-address registers (see Section 18.3, “Memory Map/Register Definition”). MCF52277 Reference Manual, Rev. 1 18-2 Freescale Semiconductor...
The device negates FB_CSn one cycle after the last FB_TA asserts. During read cycles, the peripheral must continue to drive data until FB_TA is recognized. For write cycles, the processor continues driving data one clock after FB_CSn is negated. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-3...
Because the FlexBus module is one of the slaves connected to the crossbar switch, it is only accessible within a certain memory range. The only applicable address ranges for which the chip-selects can be active are 0x0000_0000–0x3FFF_FFFF and 0xC000_0000–0xDFFF_FFFF. Set the CSARn registers appropriately. MCF52277 Reference Manual, Rev. 1 18-4 Freescale Semiconductor...
Chip-Select Control Registers (CSCR0–CSCR5) Each CSCRn, Figure 18-3, controls the auto-acknowledge, address setup and hold times, port size, burst capability, and activation of each chip-select. To support the global chip-select, FB_CS0, the CSCR0 reset MCF52277 Reference Manual, Rev. 1 18-6 Freescale Semiconductor...
Page 309
01 Assert FB_CSn on second rising clock edge after address is asserted. 10 Assert FB_CSn on third rising clock edge after address is asserted. 11 Assert FB_CSn on fourth rising clock edge after address is asserted. (Default FB_CS0) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-7...
Page 310
Note: If AA is set for a corresponding FB_CSn and the external system asserts an external FB_TA before the wait-state countdown asserts the internal FB_TA, the cycle is terminated. Burst cycles increment the address bus between each internal termination. MCF52277 Reference Manual, Rev. 1 18-8 Freescale Semiconductor...
Chip-select control registers (CSCRn) provide port size and burst capability indication, wait-state generation, address setup and hold times, and automatic acknowledge generation features. See Section 18.3.3, “Chip-Select Control Registers (CSCR0–CSCR5).” FB_CS0 is a global chip-select after reset and provides re-locatable boot ROM capability. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-9...
The address, write data, FB_TS, FB_CSn, and all attribute signals change on the rising edge of the clock. Read data is latched into the device on the rising edge of the clock. MCF52277 Reference Manual, Rev. 1 18-10 Freescale Semiconductor...
4. S3: FB_CSn is negated at the fourth rising clock edge. This last clock of the bus cycle uses what would be an idle clock between cycles to provide hold time for address, attributes, and write data. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
18.4.5 FlexBus Timing Examples NOTE Because this device shares the FlexBus signals with the SDRAM controller, all signals, except the chip selects, tristate between bus cycles. MCF52277 Reference Manual, Rev. 1 18-12 Freescale Semiconductor...
The address and data busses are muxed between the FlexBus and SDRAM controller. At the end of the read bus cycles the address signals are indeterminate. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-13...
Page 317
The external device returns the read data on FB_D[31:24] and may tristate the data line or continue driving the data one clock after FB_TA is sampled asserted. FB_CLK FB_A[23:0] ADDR[23:0] ADDR[31:24] FB_D[31:24] DATA[7:0] FB_R/W FB_TS FB_CSn, FB_OE, FB_BE/BWEn FB_TA Figure 18-10. Single Byte-Read Transfer MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-15...
Page 318
FB_D[31:16], and may tristate the data line or continue driving the data one clock after FB_TA is sampled asserted. FB_CLK FB_A[23:0] ADDR[23:0] ADDR[31:16] FB_D[31:16] DATA[15:0] FB_R/W FB_TS FB_CSn, FB_OE FB_BE/BWEn FB_TA Figure 18-12. Single Word-Read Transfer MCF52277 Reference Manual, Rev. 1 18-16 Freescale Semiconductor...
Page 319
FB_TA Figure 18-13. Single Word-Write Transfer Figure 18-14 depicts a longword read through a 32-bit device. FB_CLK FB_A[23:0] ADDR[23:0] ADDR[31:0] FB_D[31:0] DATA[31:0] FB_R/W FB_TS FB_CSn, FB_OE FB_BE/BWEn FB_TA Figure 18-14. Longword-Read Transfer MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-17...
Wait states can be inserted before each beat of a transfer by programming the CSCRn registers. Wait states can give the peripheral or memory more time to return read data or sample write data. MCF52277 Reference Manual, Rev. 1 18-18...
Page 322
The timing of the assertion and negation of the chip selects, byte selects, and output enable can be programmed on a chip-select basis. Each chip-select can be programmed to assert one to four clocks after MCF52277 Reference Manual, Rev. 1 18-20...
Page 323
Figure 18-20. Read-Bus Cycle with Two-Clock Address Setup (No Wait States) FB_CLK FB_A[23:0] ADDR[23:0] FB_D[31:X] ADDR[31:X] DATA FB_R/W FB_TS FB_CSn, FB_BE/BWEn FB_OE FB_TA Figure 18-21. Write-Bus Cycle with Two Clock Address Setup (No Wait States) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-21...
Page 324
Figure 18-22. Read Cycle with Two-Clock Address Hold (No Wait States) FB_CLK FB_A[23:0] ADDR[23:0] FB_D[31:X] ADDR[31:X] DATA FB_R/W FB_TS FB_CSn, FB_BE/BWEn FB_OE FB_TA Figure 18-23. Write Cycle with Two-Clock Address Hold (No Wait States) MCF52277 Reference Manual, Rev. 1 18-22 Freescale Semiconductor...
The CSCRn registers enable bursting for reads, writes, or both. Memory spaces can be declared burst-inhibited for reads and writes by clearing the appropriate CSCRn[BSTR,BSTW] bits. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-23...
Page 326
ADDR + 1 ADDR + 2 ADDR + 3 ADDR FB_D[31:24] DATA DATA DATA DATA [31:24] FB_R/W FB_TS FB_CSn, FB_OE, FB_BE/BWEn FB_TA Figure 18-26. Longword-Write Burst to 8-Bit Port 3-1-1-1 (No Wait States) MCF52277 Reference Manual, Rev. 1 18-24 Freescale Semiconductor...
Page 327
ADDR + 1 ADDR + 2 ADDR + 3 ADDR FB_D[31:24] DATA DATA DATA DATA DATA [31:24] FB_R/W FB_TS FB_CSn FB_BE/BWEn FB_OE FB_TA Figure 18-28. Longword-Write Burst-Inhibited to 8-Bit Port (No Wait States) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-25...
Page 328
ADDR + 1 ADDR + 2 ADDR + 3 ADDR FB_D[31:24] DATA DATA DATA DATA [31:24] FB_R/W FB_TS FB_CSn, FB_OE, FB_BE/BWEn FB_TA Figure 18-30. Longword-Write Burst to 8-Bit Port 3-2-2-2 (One Wait State) MCF52277 Reference Manual, Rev. 1 18-26 Freescale Semiconductor...
FB_TA Figure 18-32. Longword-Write Burst to 8-Bit Port 3-1-1-1 (Address Setup and Hold) 18.4.7 Misaligned Operands Because operands, unlike opcodes, can reside at any byte boundary, they are allowed to be misaligned. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 18-27...
FB_TA when the bus error occurs can invoke an interrupt handler. The device also includes a bus monitor that generates a bus error for unterminated cycles. MCF52277 Reference Manual, Rev. 1 18-28 Freescale Semiconductor...
SDRAM controller and the FlexBus module. However, when the SDRAM controller is in DDR mode, D[31:16] is dedicated to the SDRAM data bus and D[15:0] is dedicated to the FlexBus data bus. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-1...
24 in 32-bit bus mode or 25 in 16-bit bus mode. • Minimum memory configuration of 8 MByte — 11 bit row address (RA), 8 bit column address (CA), 2 bit bank address (BA), 32-bit bus, one chip select MCF52277 Reference Manual, Rev. 1 19-2 Freescale Semiconductor...
O Memory bank address. Define which bank an , or PRECHARGE command is being ACTV READ WRITE applied. It is also used to select the SDRAM internal mode register during power-up initialization. Timing Assertion/Negation — Occurs synchronously with SD_CLK MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-3...
Page 334
SD_DM2 - SD_D[23:16] SD_DM1 - SD_D[15:8] SD_DM0 - SD_D[7:0] State Asserted — Data is written to SDRAM Meaning Negation — Data is masked Timing Assertion/Negation — Occurs on crossing of SD_CLK and SD_CLK. MCF52277 Reference Manual, Rev. 1 19-4 Freescale Semiconductor...
SDRAM’s data bus. For example, if 16-bit wide devices are used, then user must use two 16-bit devices connected as a 32-bit port. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-5...
Page 336
14 x 8 x 4 — — RA13 RA12 12 x 11 x 4 — CA11 32M x 4 bit 13 x 10 x 4 — RA12 14 x 9 x 4 — RA13 RA12 MCF52277 Reference Manual, Rev. 1 19-6 Freescale Semiconductor...
Page 337
All SD_A[13:0] bits are generated on every access, but only the bits actually used by the memory are shown. All column address (CA) bits in this table are physical column address lines. The SDRAM controller inserts an extra bit CA10 to control the precharge option. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-7...
Page 338
— — RA13 RA12 12 x 12 x 4 — CA12 CA11 64M x 4 bit 13 x 11 x 4 — CA11 RA12 14 x 10 x 4 — RA13 RA12 MCF52277 Reference Manual, Rev. 1 19-8 Freescale Semiconductor...
Page 339
If all devices’ column address width is 9 bits, the row address can be ≥ 11 bits. • • The maximum row bits plus column bits equals 25. • x16 data width memory devices cannot be mixed with any other width. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-9...
This aligns SD_SDRDQS to the SD_CLK as if the memory had generated the DQS pulse. The inbound trace should be routed along the data path, which should synchronize the SD_DQS so that the data is latched in the middle of the data valid window. MCF52277 Reference Manual, Rev. 1 19-10 Freescale Semiconductor...
Figure 19-3. Example 2.5V, 16-bit DDR SDRAM System 19.3.4 DDR SDRAM Layout Considerations Due to the critical timing for DDR SDRAM, a number of considerations should be taken into account during PCB layout: • Minimize overall trace lengths. MCF52277 Reference Manual, Rev. 1 19-12 Freescale Semiconductor...
Address, Data Address, Data and Control and Control SD_CLK 100 Ω Note: Place 100 Ω resistor as close as possible to the DDR’s clock receiver SD_CLK Figure 19-4. DDR SDRAM Termination Circuit MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-13...
Clock enable. CKE must be set to perform normal read and write operations. Clear CKE to put the memory in self-refresh or power-down mode. 0 SD_CKE is negated (low) 1 SD_CKE is asserted (high) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-15...
Page 346
32-bit DDR devices have only a single DQS pin. Enable one of the SD_DQSn signals and disable the other. Then, short both pins external to the device. 1 SD_DQSn can drive as necessary, depending on commands and SDCR[OE_RULE] setting. DDR only. 9–3 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 19-16 Freescale Semiconductor...
SD_CLK2—double frequency of SD_CLK—DDR uses both edges of the bus-frequency clock (SD_CLK) to read/write data NOTE In all calculations for setting the fields of this register, convert time units to clock units and round up to the nearest integer. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-17...
Page 348
= 99 MHz SD_CLK Suggested value = (20ns × 99 MHz) - 1= 0.98; round to 1. Note: Count value is in SD_CLK periods for SDR and DDR modes. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 19-18 Freescale Semiconductor...
Functional Description 19.5.1 SDRAM Commands When an internal bus master accesses SDRAM address space, the memory controller generates the corresponding SDRAM command. Table 19-12 lists SDRAM commands supported by the memory controller. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-21...
Page 352
ACTV followed by the read command. If the address is not within the active row of an active bank, the memory controller issues a pre command to close the active MCF52277 Reference Manual, Rev. 1 19-22...
Page 353
The memory controller issues the precharge command only when necessary for one of these conditions: • Access to a new row • Refresh interval elapsed • Software commanded precharge during device initialization MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-23...
Page 354
Else Reserved A6–A4 CAS latency. Delay in clocks from issuing a to valid data out. Check the SDRAM manufacturer’s spec READ because the CL settings supported can vary from memory to memory. MCF52277 Reference Manual, Rev. 1 19-24 Freescale Semiconductor...
Page 355
After REF command, the SDRAM is in an idle state and waits for an command. ACTV MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-25...
The SDCR[REF and IREF] bits should remain cleared for this step. 7. Initialize the SDRAM’s extended mode register to enable the DLL. See Section 19.5.1.6, “Load Mode/Extended Mode Register Command (lmr, lemr),” for instructions on issuing a LEMR command. MCF52277 Reference Manual, Rev. 1 19-26 Freescale Semiconductor...
ACTV A page is kept open until one of the following conditions occurs: • An access outside the open page. • A refresh cycle is started. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 19-27...
The burst size and transfer order must be programmed in the SDRAM mode registers during initialization; the burst size also must be programmed in the memory controller (SDCFG2 register). MCF52277 Reference Manual, Rev. 1 19-28 Freescale Semiconductor...
USB host must disable the port and remove power. USB VBUS is not provided on-chip. This processor provides pins for control and status to an external IC capable of managing the VBUS downstream supply. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-1...
Capacitor Figure 20-1. USB On-The-Go with on-chip FS/LS Transceiver Interface Block Diagram 20.1.3 Features The USB On-The-Go module includes these features: • Complies with USB specification rev 2.0 • USB host mode MCF52277 Reference Manual, Rev. 1 20-2 Freescale Semiconductor...
USB enabled, low-power modes. See Section 20.1.4.1, “Low-Power Modes,” for details. 20.1.4.1 Low-Power Modes The USB OTG module is integrated with the processor’s low-power modes (stop, doze and wait). The modes are implemented as follows: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-3...
USB OTG module must be able to individually enable and disable the pull-up and pull-down resistors on DP and DM, and it must be able to control and sense the levels on the USB VBUS line. MCF52277 Reference Manual, Rev. 1 20-4...
Page 363
Indicates valid operating level on VBUS from USB device’s perspective. Session End SEND Indicates VBUS fell below the session valid threshold. Wake-up Event WKUP Reflects when a wake-up event occurred on the USB bus. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-5...
Page 365
R/W 0x0000_0000 20.3.4.22/20-43 0xFC0B_01CC Endpoint Control Register 3 (EPCR3) R/W 0x0000_0000 20.3.4.22/20-43 Indicates if the register is present in the EHCI specification. Indicates if the register is available in host and/or device modes. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-7...
Page 367
Indicates number of ports in host mode minus 1. Always 0 for the USB OTG module. NPORT Indicates module is host capable. Always set. 20.3.1.4 Device Hardware Parameters Register (HWDEVICE) Provides device hardware parameters for this implementation of the USB OTG module. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-9...
Page 368
Transmit address. Number of address bits for the entire TX buffer. Always 0x06. TXADD 7–0 Transmit burst. Indicates number of data beats in a burst for transmit DMA data transfers. Always 0x04. TXBURST MCF52277 Reference Manual, Rev. 1 20-10 Freescale Semiconductor...
GPTLD time in microseconds minus 1 for the timer duration. For example, for a one millisecond timer, load 1000 – 1 = 999 (0x00_03E7). Note: Maximum value of 0xFF_FFFF or 16.777215 seconds. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-11...
Specifies software limits, restrictions, and capabilities of the host/device controller implementation. Most of these registers are defined by the EHCI specification. Registers not defined by the EHCI specification are noted in their descriptions. MCF52277 Reference Manual, Rev. 1 20-12 Freescale Semiconductor...
Page 372
Number of ports. Indicates number of physical downstream ports implemented for host applications. Field value N_PORTS determines how many addressable port registers in the operational register. For the USB OTG module, this is always 0x1. MCF52277 Reference Manual, Rev. 1 20-14 Freescale Semiconductor...
Page 373
The most-significant byte of the register represents a major revision and the least-significant byte is the minor revision. Address: 0xFC0B_0120 (DCIVERSION) Access: User read-only DCIVERSION Reset Figure 20-14. Device Controller Interface Version Register (DCIVERSION) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-15...
4–0 Device endpoint number. This field indicates the number of endpoints built into the device controller. Always 0x04. 20.3.4 Operational Registers Comprised of dynamic control or status registers and are defined below. MCF52277 Reference Manual, Rev. 1 20-16 Freescale Semiconductor...
Page 375
Reserved, must be cleared. Asynchronous schedule park mode enable. Software uses this bit to enable or disable park mode. ASPE 1 Park mode enabled 0 Park mode disabled Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-17...
Page 376
001 512 elements (2048 bytes) 010 256 elements (1024 bytes) 011 128 elements (512 bytes) 100 64 elements (256 bytes) 101 32 elements (128 bytes) 110 16 elements (64 bytes) 111 8 elements (32 bytes) MCF52277 Reference Manual, Rev. 1 20-18 Freescale Semiconductor...
Page 377
Software clears certain bits in this register by writing a 1 to them. Address: 0xFC0B_0144 (USBSTS) Access: User read/write NAKI Reset Reset Figure 20-17. USB Status Register (USBSTS) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-19...
Page 378
USBCMD[PSE] bit have the same value, the periodic schedule is enabled or disabled. Used only in host mode. 0 Disabled. 1 Enabled. Reclamation. DetectS an empty asynchronous schedule. Used only by the host mode. 0 Non-empty asynchronous schedule. 1 Empty asynchronous schedule. MCF52277 Reference Manual, Rev. 1 20-20 Freescale Semiconductor...
Page 379
(as programmed in the USBCMD[FS] field) is 1024, the frame index register rolls over every time FRINDEX[13] toggles. Similarly, if the size is 512, the controller sets this bit each time FRINDEX[12] toggles. Used only in the host mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-21...
Page 380
(even if the USBINTR register disables them), allowing polling of interrupt events by the software. Address: 0xFC0B_0148 (USBINTR) Access: User read/write TIE1 TIE0 UPIE UAIE NAKE Reset Reset Figure 20-18. USB Interrupt Enable Register (USBINTR) MCF52277 Reference Manual, Rev. 1 20-22 Freescale Semiconductor...
Page 381
0 Disabled 1 Enabled System error enable. When this bit and the USBSTS[SEI] bit are set, controller issues an interrupt. Software clearing the USBSTS[SEI] bit acknowledges the interrupt. 0 Disabled 1 Enabled MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-23...
Page 386
= Time to send data payload = Total packet flight time (send-only) packet (T = Time to fetch packet into TX FIFO up to specified level = Total packet time (fetch and send) packet (T MCF52277 Reference Manual, Rev. 1 20-28 Freescale Semiconductor...
Page 387
This value is ignored if the USBMODE[SDIS] bit is set. When the USBMODE[SDIS] bit is set, the host controller behaves as if TXFIFOTHRES is set to its maximum value. 15–13 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-29...
Page 388
The USB module contains a single PORTSC register. This register only resets when power is initially applied or in response to a controller reset. Initial conditions of a port are: • No device connected • Port disabled MCF52277 Reference Manual, Rev. 1 20-30 Freescale Semiconductor...
Page 389
FS configurations with a HS host, hub, or device. Not defined in the EHCI specification. 0 Allow the port to identify itself as high speed. 1 Force the port to only connect at full speed. This bit is for debugging purposes. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-31...
Page 390
When an over-current condition is detected on a powered port, the host controller driver from a 1to a 0 (removing power from the port) transitions the PP bit in each affected port. MCF52277 Reference Manual, Rev. 1 20-32 Freescale Semiconductor...
Page 391
If host software sets this bit when the port is not enabled (PE = 0), the results are undefined. This field is cleared if the PP bit is cleared in host mode. Device mode: In device mode, this bit is a read-only status bit. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-33...
Page 392
When the port is disabled, downstream propagation of data is blocked except for reset. This field is cleared if the PP bit is cleared in host mode. Device mode: The device port is always enabled. (This bit is set). MCF52277 Reference Manual, Rev. 1 20-34 Freescale Semiconductor...
Page 394
USB ID interrupt status. Indicates when a change on the ID input is detected. Software must write a 1 to clear this IDIS bit. Reserved, must be cleared. Data bus pulsing status. 0 No pulsing on port. 1 Pulsing detected on port. MCF52277 Reference Manual, Rev. 1 20-36 Freescale Semiconductor...
Page 395
VBUS discharge. Setting this bit causes VBUS to discharge through a resistor. 20.3.4.15 USB Mode Register (USBMODE) This register is not defined in the EHCI specification. It controls the operating mode of the module. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-37...
Page 396
Setup lockout mode. For the module in device mode, this bit controls behavior of the setup lock mechanism. See SLOM Section 20.5.3.4.4, “Control Endpoint Operation.” 0 Setup lockouts on. 1 Setup lockouts off (software requires use of the USBCMD[SUTW] bit). MCF52277 Reference Manual, Rev. 1 20-38 Freescale Semiconductor...
Page 398
FERB[3] corresponds to endpoint 3. 20.3.4.19 Endpoint Status Register (EPSR) This register is not defined in the EHCI specification. This register is only used in device mode. MCF52277 Reference Manual, Rev. 1 20-40 Freescale Semiconductor...
Page 399
If the corresponding IOC bit is set in the transfer descriptor, this bit is set simultaneously with the USBINT. Writing a 1 clears the corresponding bit in this register. ETCE[3] (bit 19) corresponds to endpoint 3. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-41...
Page 400
Reserved, must be cleared. RX endpoint enable. Endpoint zero is always enabled. 1 Enabled. 6–4 Reserved, must be cleared. 3–2 RX endpoint type. Endpoint zero is always a control endpoint. 00 Control MCF52277 Reference Manual, Rev. 1 20-42 Freescale Semiconductor...
Page 401
TX data toggle inhibit. This bit is used only for test and should always be written as 0. Writing a 1 to this bit causes this endpoint to ignore the data toggle sequence and always transmit DATA0 for a data packet. 0 PID sequencing enabled. 1 PID sequencing disabled. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-43...
Page 402
Software can write a 1 to this bit to force the endpoint to return a STALL handshake to the host. It continues returning STALL until software clears this bit or automatically clears as above, 0 Endpoint OK 1 Endpoint stalled MCF52277 Reference Manual, Rev. 1 20-44 Freescale Semiconductor...
The USB module defaults to FS XCVR operation and can communicate in LS. Due to pin-count limitations the USB module only supports certain combinations of PHY interfaces and USB functionality. Refer to the Table 20-42 for more information. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-45...
Host Controller Initialization After initial power-on or module reset (via the USBCMD[RST] bit), all of the operational registers are at default values, as illustrated in the register memory map in Table 20-4. MCF52277 Reference Manual, Rev. 1 20-46 Freescale Semiconductor...
20-38, there are two endpoint queue heads in the array for each device endpoint—one for IN and one for OUT. The EPLISTADDR provides a pointer to the first entry in the array. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-47...
Page 406
While a packet is in progress, the overlay area of the dQH acts as a staging area for the dTD so the device controller can access needed information with minimal latency. Figure 20-39 shows the endpoint queue head structure. MCF52277 Reference Manual, Rev. 1 20-48 Freescale Semiconductor...
Page 407
01 Execute 1 Transaction. 10 Execute 2 Transactions. 11 Execute 3 Transactions. Note: Non-ISO endpoints must set Mult equal to 00. ISO endpoints must set Mult equal to 01, 10, or 11 as needed. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-49...
Page 408
Until a transfer expires, software must not write the queue head overlay area or the associated transfer descriptor. When the transfer is complete, the device controller writes the results back to the original transfer descriptor and advance the queue. MCF52277 Reference Manual, Rev. 1 20-50 Freescale Semiconductor...
Page 409
Figure 20-40. Endpoint Transfer Descriptor (dTD) 20.5.2.2.1 Next dTD Pointer (Offset = 0x0) The next dTD pointer is used to point the device controller to the next dTD in the linked list. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-51...
Page 410
For OUT transfers the total bytes must be evenly divisible by the maximum packet length. Interrupt on complete. Indicates if USBSTS[UI] is set in response to device controller finished with this dTD. 14–12 Reserved. Reserved for future use and must be cleared. MCF52277 Reference Manual, Rev. 1 20-52 Freescale Semiconductor...
Page 411
Current Offset 1;10–0 Frame Number. Written by the device controller to indicate the frame number a packet finishes in. Typically Frame Number correlates relative completion times of packets on an ISO endpoint. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-53...
It is not necessary to initially prime endpoint 0 because the first packet received is always a setup packet. The contents of the first setup packet requires a response in accordance with USB device framework command set. MCF52277 Reference Manual, Rev. 1 20-54 Freescale Semiconductor...
Page 413
Bus Activity Software-only state Figure 20-41. USB 2.0 Device States States powered, attach, defaultFS/HS, suspendFS/HS are implemented in the USB OTG, and they are communicated to the DCD using these status bits: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-55...
Page 414
DCD processes a USB reset event, it is likely w3a4no dTDs have been allocated. 6. At this time, the DCD may release control back to the OS because no further changes to the device controller are permitted until a port change detect is indicated. MCF52277 Reference Manual, Rev. 1 20-56 Freescale Semiconductor...
Page 415
(one more devices) back to the active condition. NOTE Before use of resume signaling, the host must enable it by using the set feature command defined in chapter 9 Device Framework of the USB 2.0 specification. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-57...
Page 416
1 Synchronize the data PIDs Data Toggle Inhibit (TXI, RXI) 0 PID sequencing disabled Endpoint Type (TXT, RXT) 00 Control 01 Isochronous 10 Bulk 11 Interrupt Endpoint Stall (TXS, RXS) 0 Not stalled MCF52277 Reference Manual, Rev. 1 20-58 Freescale Semiconductor...
Page 417
The DCD may reset the data toggle state bit and cause the data toggle sequence to reset in the device controller by setting the data toggle reset bit in the EPCRn register. This should only happen when configuring/initializing an endpoint or returning from a STALL condition. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-59...
Page 418
After a priming request is complete, an endpoint state of primed is indicated in the EPSR register. For a primed transmit endpoint, the device controller can respond to an IN request from the host and meet the stringent bus turnaround time of high-speed USB. MCF52277 Reference Manual, Rev. 1 20-60 Freescale Semiconductor...
Page 419
Table 20-53. Variable Length Transfer Protocol Example (ZLT=1) Bytes Max. Packet (dTD) Length (dQH) — — — — NOTE The MULT field in the dQH must be set to 00 for bulk, interrupt, and control endpoints. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-61...
Page 421
If a new setup packet is indicated after the EPPRIME bit is cleared, then the transfer descriptor can be freed and the DCD must re-interpret the setup packet. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-63...
Page 422
Isochronous endpoints used for real-time scheduled delivery of data, and their operational model is significantly different than the host throttled bulk, interrupt, and control data pipes. Real time delivery by the USB OTG is accomplished by: • Exactly MULT packets per (micro)frame are transmitted/received. MCF52277 Reference Manual, Rev. 1 20-64 Freescale Semiconductor...
Page 423
• TX packet retired: — MULT counter reaches zero. — Fulfillment error (transaction error bit is set): – # packets occurred > 0 AND # packets occurred < MULT MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-65...
Page 424
SOF for packet N is received. Isochronous Endpoint Bus Response Matrix Table 20-56. Isochronous Endpoint Bus Response Matrix Token Stall Primed Underflow Overflow Type Primed STALL STALL STALL Setup NULL NULL Transmit BS Error Packet Packet MCF52277 Reference Manual, Rev. 1 20-66 Freescale Semiconductor...
Page 425
The next section includes demonstration of complete initialization of the dQH including these fields. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-67...
Page 426
4. Decoding setup packet and prepare data phase (optional) and status phase transfer as required by the USB specification chapter 9 or application specific protocol. MCF52277 Reference Manual, Rev. 1 20-68 Freescale Semiconductor...
Page 427
6. Fill in buffer pointer page 0 and the current offset to point to the start of the data buffer. 7. Initialize buffer pointer page 1 through page 4 to be one greater than each of the previous buffer pointers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-69...
Page 428
Active = 0, Halted = 0, Transaction error = 0, Data buffer error = 0 Should any combination other than the one shown above exist, the DCD must take proper action. Transfer failure mechanisms are indicated in Section 20.5.3.6.6, “Device Error Matrix.” MCF52277 Reference Manual, Rev. 1 20-70 Freescale Semiconductor...
Page 429
ISO Fulfillment Error Both The device controller manages all errors on bulk/control/interrupt endpoints except for a data buffer overflow. However, for ISO endpoints, errors packets are not retried and errors are tagged as indicated. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-71...
These additions to the capability registers support the embedded Transaction translator function: • N_TT added to HSCPARAMS - Host Controller Structural Parameters • N_PTT added to HSCPARAMS - Host Controller Structural Parameters MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-73...
Page 432
It is demonstrated here how hub address and endpoint speed fields should be set for directly attached FS/LS devices and hubs: 1. QH (for direct attach FS/LS) – asynchronous (bulk/control endpoints) periodic (interrupt) • Hub address equals 0 • Transactions to direct attached device/hub. MCF52277 Reference Manual, Rev. 1 20-74 Freescale Semiconductor...
Page 433
H-frame and B-frame boundaries with the exception that an asynchronous transfer cannot babble through the SOF (start of B-frame 0.) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-75...
Page 434
– Idle for more than 4 microframes — Abort of pending complete-splits – EOF – Idle for more than 4 microframes • USB 2.0 - 11.18.[7-8] — Transaction tracking for up to 4 data pipes. MCF52277 Reference Manual, Rev. 1 20-76 Freescale Semiconductor...
Page 435
Starts of microframes are timed precisely to 125 µs using the transceiver clock as a reference clock or a 60 Mhz transceiver clock for 8-bit physical interfaces and full-speed serial interfaces. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 20-77...
Page 436
A 1-bit high-speed indicator bit has been added to PORTSCn to signify that the port is in HS vs. FS/LS. — This information is redundant with the 2-bit port speed indicator field above. MCF52277 Reference Manual, Rev. 1 20-78 Freescale Semiconductor...
CSTN To Panel Figure 21-1. LCDC Block Diagram 21.1.2 Features The LCDC provides the following features: • Support for single (non-split) screen monochrome or color LCD panels and self-refresh type LCD panels MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-1...
Page 438
Logical operation between color hardware cursor and background • Hardware panning (soft horizontal scrolling) • 8-bit pulse-width modulator for software contrast control • Graphic window support for viewfinder function in color display MCF52277 Reference Manual, Rev. 1 21-2 Freescale Semiconductor...
Note: The maximum supported panel size is 800x600 pixels. Therefore the maximum value for this bit field is 0x258. 21.3.3 LCDC Virtual Page Width Register (LCD_VPW) The virtual page width register defines the width of the virtual page for the LCD panel. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-5...
Table 21-9. LCD_CCMR Field Descriptions Field Description 30–18 Reserved, must be cleared. 17–12 Cursor red field. Defines the red component of the cursor color in color mode. CUR_COL_R 0x00 No red. 0x3F Full red. MCF52277 Reference Manual, Rev. 1 21-8 Freescale Semiconductor...
The panel configuration register defines all of the properties of the LCD screen. Address: 0xFC0A_C018 (LCD_PCR) Access: User read/write SCLK END_ SWAP_ REV_ PBSIZ BPIX IDLE Reset R ACD SCLK SHARP Reset Figure 21-8. LCD Panel Configuration Register (LCD_PCR) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-9...
Page 446
SWAP_SEL = 1. Pixel polarity. PIXPOL 0 Active high 1 Active low First line marker polarity. FLMPOL 0 Active high 1 Active low Line pulse polarity. LPPOL 0 Active high 1 Active low MCF52277 Reference Manual, Rev. 1 21-10 Freescale Semiconductor...
Page 447
Note: The value of PCD must be set such that the LCD_LSCLK frequency is at least one-third (TFT mode) or one-fourth (CSTN mode) of the peripheral bus clock (f ) frequency. Otherwise, the line data (LCD_D) sys/2 is incorrect. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-11...
LCD_PS rise delay. Controls the delay of the rising edge of LCD_PS relative to the falling edge of LCD_CLS. PS_RISE_ Total delay time is equal to PS_RISE_DELAY LCD_LSCLK periods. DELAY 0x00 Zero LCD_LSCLK periods 0x3F 63 LCD_LSCLK periods 25–24 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 21-14 Freescale Semiconductor...
Page 451
The rising edge delay of LCD_PS is programmed by PS_RISE_DELAY CLS_HI_WIDTH is equal to PWM_SCR0 • 256 + PWM_WIDTH in units of LCD_LSCLK. LCD_SPL_SPR pulse width is fixed and aligned to the first data of the line. Figure 21-13. Horizontal Timing MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-15...
There is a 32 × 32 bit line buffer in the LCDC that stores DMA data from system memory. The DMA control register controls the DMA burst length and when to trigger a DMA burst in terms of the number of data bytes left in the pixel buffer. MCF52277 Reference Manual, Rev. 1 21-16 Freescale Semiconductor...
0 Interrupt flag is set when the end of a graphic window is reached 1 Interrupt flag is set when the beginning of a graphic window is reached Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 21-18 Freescale Semiconductor...
When the interrupt is masked, the LCDC does not generate the interrupt request, but its status can be observed in the interrupt status register. Address: 0xFC0A_C03C (LCD_IER) Access: User read/write Reset Reset Figure 21-18. LCD Interrupt Endable Register (LCD_IER) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-19...
If any bit in this register is set and the corresponding bit in the LCD_IER register is set, an LCD interrupt is asserted to the interrupt controller. The status bit is cleared by reading the register. MCF52277 Reference Manual, Rev. 1 21-20 Freescale Semiconductor...
Page 457
Error response interrupt. Indicates whether the LCDC has issued a read data request and has received a bus error. It is cleared by reading the status register, at power on reset, or when the LCDC is disabled. 0 Interrupt has not occurred. 1 Interrupt has occurred. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-21...
Graphic window Y-position. Represents the graphic window’s vertical starting position in lines (from 0 to GW_YMAX). GWYP 21.3.23 LCDC Graphic Window Control Register (LCD_GWCR) The LCD color cursor mapping register defines the color of the cursor in passive or TFT color modes. MCF52277 Reference Manual, Rev. 1 21-24 Freescale Semiconductor...
Page 461
GWCKG 0x00 No green … 0x3F Full green 5–0 Graphic window color keying blue component. Defines the blue component of graphic window color keying. GWCKB 0x00 No blue … 0x3F Full blue MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-25...
Unimplemented bits are read as 0. All read and write data use the least significant 12 or 18 bits. NOTE Byte or word access to the RAM corrupts its contents. MCF52277 Reference Manual, Rev. 1 21-26 Freescale Semiconductor...
Page 463
Red level (color display). Represents the red component level in the color. 7–4 Green level (color display). Represents the green component level in the color. 3–0 Blue level (color display). Represents the blue component level in the color. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-27...
Page 464
256 colors can be selected out of a palette of 256K. All 256 mapping RAM entries must be written to define the codes for the 256 available combinations. MCF52277 Reference Manual, Rev. 1 21-28...
The maximum page width is specified by the virtual page width (VPW) parameter. Virtual page height (VPH) does not affect the LCDC and is limited only by memory size. By changing the SSA register, a MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
One of the applications can be a graphical hardware cursor. NOTE The graphic window and background images must have the same bpp setting. MCF52277 Reference Manual, Rev. 1 21-30 Freescale Semiconductor...
0, 5/16, 11/16 and 1 for certain graphics. Figure 21-32 illustrates gray-scale pixel generation. The flexible mapping scheme allows the user to optimize the visual effect for a specific panel or application. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-33...
For 12-, 16- and 18-bit active matrix color display, pixel data is simply moved from display memory to the LCDC output bus. Figure 21-33 Figure 21-34 illustrate passive matrix and active matrix color pixel generation. MCF52277 Reference Manual, Rev. 1 21-34 Freescale Semiconductor...
(LCD_PCR). The data bus timing for passive panels is determined by the shift clock (LCD_LSCLK), line pulse (LCD_LP), first line marker (LCD_FLM), alternate crystal direction (LCD_ACD), and line data (LCD_D) signals. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-37...
Page 475
H_WAIT_2 defines the delay from the end of LCD_LP to the beginning of data output. NOTE LCD_PCR[PCD] ⎛ ⎞ All parameters are defined in unit of pixel clock period -------------------------------------------------- - ⎝ ⎠ sys/2 unless stated otherwise. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-39...
1. LCD_LSCLK latches data into the panel on its negative edge (when positive polarity is selected). In active mode, LCD_LSCLK runs continuously. 2. LCD_HSYNC causes the panel to start a new line. MCF52277 Reference Manual, Rev. 1 21-40 Freescale Semiconductor...
Page 478
H_WAIT_2 defines the delay from the end of LCD_HSYNC to the beginning of the LCD_OE pulse. • H_WAIT_1 defines the delay from end of LCD_OE to the beginning of the LCD_HSYNC pulse. • XMAX defines the (total) number of pixels per line. MCF52277 Reference Manual, Rev. 1 21-42 Freescale Semiconductor...
Page 479
(time = one line period) after LCD_VSYNC. The LCD_HSYNC pulse is output during the V_WAIT_2 delay. End of frame V_WIDTH Beginning of frame (lines) YMAX LCD_VSYNC LCD_HSYNC LCD_OE V_WAIT_1 V_WAIT_2 Figure 21-42. Vertical Sync Pulse Timing TFT Mode MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 21-43...
ADC block and removing the bouncing effect. • The FIFO temporarily stores the measured data and allows the MCU to burst the measured data by using the various FIFO usage flags. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-1...
If you clear this bit and set it again within a single ADC_CLK cycle, this short pulse is expanded to a longer pulse so it is captured by the ASP. 0 Stop the sequence operation. 1 Initiate the sequence operation. 30–24 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 22-4 Freescale Semiconductor...
Page 485
X and Y coordinate sample. 0 No auto-zero measurement 1 Auto-zero measurement taken before every pin input measurement Note: MIDLECNT has no affect on inserting idle phases between the auto-zero measurement and the corresponding coordinate measurement. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-5...
Page 486
APTN bits set for channels that have touchscreen functions are ignored. 0 Channel is not selected for general purpose ADC channels conversion 1 Channel is selected for general purpose ADC channels conversion MCF52277 Reference Manual, Rev. 1 22-6 Freescale Semiconductor...
Trim value for ADC. After reset, the default value for TRIMMING is 0x87. It is strongly recommended to use the TRIMC reference value, which is TBD at this time. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-7...
Idle time setting between two successive measurements. When this field is cleared, there is no idle phase MIDLECNT between two successive measurements. There is no idle phase between AZX/AZY and X/Y measurements. MCF52277 Reference Manual, Rev. 1 22-8 Freescale Semiconductor...
Pen up flag. Indicates a pen-down event has occurred. This flag is sticky and is cleared by writing a 1 to it. Clearing this bit is processed asynchronously. 0 Pen up not detected 1 Pen up detected MCF52277 Reference Manual, Rev. 1 22-10 Freescale Semiconductor...
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 U U U U U U U U U U U U U U U U Figure 22-7. ASP Sample FIFO Register (ASP_SFIFO) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
FIFO read pointer. Indicates the 4-bit FIFO read pointer. FFRP 15–6 Reserved, must be cleared. 5–0 FIFO write pointer. Indicates the 4-bit FIFO write pointer. If a writing event is in process, the write pointer may FFWP not be accurate. MCF52277 Reference Manual, Rev. 1 22-12 Freescale Semiconductor...
The analog signal processor may be configured as a touchscreen or generic ADC depending on ASP_CR[TSE]. If set, the module is configured as a touchscreen controller; if cleared, the module is configured as general purpose ADC. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-13...
ASP_CR[PENE]. Pen-up detection ise active at this time as well. No data is written The touchscreen is parked in the pen-detection state. to the FIFO MCF52277 Reference Manual, Rev. 1 22-14 Freescale Semiconductor...
Page 495
The pen detection circuit is active if ASP_SET[SW] is set. AZE has no effect when only general-purpose channels are converted. No data is written The touchscreen is parked in the pen-detection state. to the FIFO MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-15...
X/Y measurement. 22.4.2 General ADC Function When the block is configured as a general ADC (ASP_CR[TSE] = 0), the touchscreen bias network completely switches off automatically. Table 22-12 describes the block’s operation. MCF52277 Reference Manual, Rev. 1 22-16 Freescale Semiconductor...
Figure 22-10 Figure 22-11 illustrate a typical operation sequence when TSE = 1, CALA = 0, MODE = 00 (AUTO, AZE, PENE, MIDLECNT, and RIDLECNT are not relevant to the operation). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-17...
Page 498
Conversion completes, result is written into FIFO, and data ready interrupt occurs. i) MCU clears ASPE to prepare for the next operation. j) MCU reads out the conversion result and the data ready interrupt is cleared automatically. MCF52277 Reference Manual, Rev. 1 22-18 Freescale Semiconductor...
The ASP automatically clears ASPE if PENE is set, or software must clear ASPE. i) MCU clears the pen-up interrupt. NOTE If MIDLECNT is equal to zero, remove the IDLE measurement phase. If AZE is cleared, remove the AZX and AZY measure phases. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-19...
MCU uploads the results of one round of conversions, which clears the FIFO watermark interrupt. h) Step f and g occur repeatedly. i) FIFO watermark interrupt occurs for the last round of conversions. MCF52277 Reference Manual, Rev. 1 22-20 Freescale Semiconductor...
Pen-down event is detected and the pen-down interrupt occurs. c) MCU responds to the interrupt and disables the pen-down interrupt. It is recommended to clear the FIFO in this step. d) MCU sets ASPE to initiate the measurement operation. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-21...
I DLE M easur e I DLE M easur e I DLE det ect i on M easur e I DLE SELINP PENDOWN_IRQ ASPE FIFO_WM_IRQ Figure 22-16. Mode 10 Auto, Part 1 MCF52277 Reference Manual, Rev. 1 22-22 Freescale Semiconductor...
Software must stop the conversion. 22.5.6 Touchscreen Mode 11—Single Round Touchscreen mode 11 single round is used for touchscreen-controlled X/Y coordinate and auxiliary channel measurement. One touch only results in one round of measurement. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-23...
TSE = 1, CALA = 0, MODE = 11, and AUTO = 1. The following example with MIDLECNT ≠ 0, RIDLECNT ≠ 0, AZE = 1, PENE = 1. MCF52277 Reference Manual, Rev. 1 22-24 Freescale Semiconductor...
Page 505
ADC and no extra data is written into the FIFO. NOTE If MIDLECNT is equal to zero, remove the IDLE measurement phase. If AZE is cleared, remove the AZX and AZY measure phases. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-25...
TSE = 0 and AUTO = 1. (CALA, MODE, AZE, TSTYP, and PENE have no effect.) The following example assumes MIDLECNT ≠ 0, RIDLECNT ≠ 0. MCF52277 Reference Manual, Rev. 1 22-26 Freescale Semiconductor...
Figure 22-24 illustrates a typical operation sequence when TSE = 1, CALA = 1, AUTO = 0. (MODE, AZE, PENE, and RIDLECNT have no effect.) The following example assumes MIDLECNT ≠ 0. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-27...
I DLE SELREFN I DLE M easur e I DLE M easur e I DLE M easur e I DLE M easur e SELINP ASPE FIFO_WM_IRQ Figure 22-25. Touchscreen Calibration Auto, Part 1 MCF52277 Reference Manual, Rev. 1 22-28 Freescale Semiconductor...
Page 509
ASP uploads the last round of calibration data from the FIFO, which clears the FIFO watermark interrupt. NOTE If MIDLECNT is equal to zero, remove the IDLE measurement phase. If RIDLECNT is equal to zero, remove the IDLE round phase. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 22-29...
CAN bus through a transceiver. The transceiver provides the transmit drive, waveshaping, and receive/compare functions required for communicating on the CAN bus. It can also provide protection against damage to the FlexCAN caused by a defective CAN bus or defective stations. MCF52277 Reference Manual, Rev. 1 23-2 Freescale Semiconductor...
Independent of the transmission medium (an external transceiver is assumed) • Open network architecture • Multimaster bus • High immunity to EMI • Short latency time due to an arbitration scheme for high-priority messages MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-3...
Waits to be in idle or bus-off state, or else waits for the third bit of intermission and then checks it to be recessive • Waits for all internal activities such as arbitration, matching, move-in, and move-out to finish • Ignores its Rx input pin and drives its Tx pin as recessive MCF52277 Reference Manual, Rev. 1 23-4 Freescale Semiconductor...
Most of the fields in this register can be accessed at any time, except the MAXMB field, which should only be changed while the module is in freeze mode. MCF52277 Reference Manual, Rev. 1 23-6 Freescale Semiconductor...
Page 517
FlexCAN not ready. This bit indicates that the FlexCAN is in disable or freeze mode. This bit is read-only and it is NOTRDY cleared after the FlexCAN exits these modes. 0 FlexCAN is in normal mode, listen-only mode, or loop-back mode. h1FlexCAN is in disable or freeze mode. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-7...
Page 518
The reset value (0xF) is equivalent to16 message buffer (MB) configuration. This field should be changed only while the module is in freeze mode. Maximum MBs in Use = MAXMB + 1 Note: MCF52277 Reference Manual, Rev. 1 23-8 Freescale Semiconductor...
Phase buffer segment 2. Defines the length of phase buffer segment 2 in the bit time. The valid programmable PSEG2 values are 1–7. Eqn. 23-4 Phase buffer segment 2 (PSEG2 + 1) time quanta Bus off interrupt mask. BOFFMSK 0 Bus off interrupt disabled 1 Bus off interrupt enabled MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-9...
Page 520
Lowest buffer transmitted first. Defines the ordering mechanism for message buffer transmission. LBUF 0 Message buffer with lowest ID is transmitted first 1 Lowest numbered buffer is transmitted first MCF52277 Reference Manual, Rev. 1 23-10 Freescale Semiconductor...
Free running timer. Captured at the beginning of the identifier (ID) field of any frame on the CAN bus. This captured TIMER value is written into the TIMESTAMP entry in a message buffer after a successful reception or transmission of a message. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-11...
Match for Extended Format (MB3). Match for Normal Format. (MB2). Mismatch for MB3 because of ID0. Mismatch for MB2 because of ID28. Mismatch for MB3 because of ID28, Match for MB14 (Uses RX14MASK). MCF52277 Reference Manual, Rev. 1 23-12 Freescale Semiconductor...
If the value of TXECTR increases to be greater than 255, the ERRSTAT[FLTCONF] field is updated to reflect bus off state, and an interrupt may be issued. The value of TXECTR is then reset to zero. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-13...
Most bits in this register are read only, except for BOFFINT and ERRINT, which are interrupt flags that can be cleared by writing 1 to them. Writing 0 has no effect. Refer to Section 23.4.1, “Interrupts.” MCF52277 Reference Manual, Rev. 1 23-14 Freescale Semiconductor...
Page 525
0 Receive error counter < 96 RXWRN 1 RxErrCounter ≥ 96 Idle status. Indicates when there is activity on the CAN bus. IDLE 0 The CAN bus is not idle. 1 The CAN bus is idle. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-15...
0 The interrupt for the corresponding buffer is disabled. 1 The interrupt for the corresponding buffer is enabled. Note: Setting or clearing an IMASK bit can assert or negate an interrupt request, if the corresponding IFLAG bit it is set. MCF52277 Reference Manual, Rev. 1 23-16 Freescale Semiconductor...
(0xFC02_0000). The 256-byte message buffer space is fully used by the16 message buffer structures. Each message buffer consists of a control and status field that configures the message buffer, an identifier field for frame identification, and up to 8 bytes of data. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-17...
Page 528
Data Byte 0 Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7 Figure 23-14. Message Buffer Structure for Extended and Standard Frames MCF52277 Reference Manual, Rev. 1 23-18 Freescale Semiconductor...
Page 529
Data field. Up to eight bytes can be used for a data frame. For Rx frames, the data is stored as it is received from 23–16, the CAN bus. For Tx frames, the CPU provides the data to be transmitted within the frame. 15–8, 7–0 DATA MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-19...
Page 530
MB automatically returns to the INACTIVE state. 1100 0100 Remote frame to be transmitted unconditionally once, and message buffer becomes an Rx message buffer with the same ID for data frames. MCF52277 Reference Manual, Rev. 1 23-20 Freescale Semiconductor...
At the end of the successful transmission, the value of the free running timer (TIMER) is written into the message buffer’s time stamp MCF52277 Reference Manual, Rev. 1 23-22 Freescale Semiconductor...
The write operation immediately deactivates the MB, removing it from any currently ongoing arbitration or matching process, giving time for the CPU to program the rest of the MB. After the MB is activated in MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
While the ID, DLC and data fields are retrieved from the CAN bus, they are stored temporarily in the serial message buffer (Section 23.3.16.1, “Serial Message Buffers (SMBs)”). The matching process takes place MCF52277 Reference Manual, Rev. 1 23-24 Freescale Semiconductor...
To allow double buffering of messages, the FlexCAN has two shadow buffers called serial message buffers. These two buffers are used by the FlexCAN for buffering received messages and messages to be MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-25...
The lock is released when the CPU reads the free running timer (global unlock operation), or when it reads the control and status word of another MB. The MB locking is done to prevent a new frame to be written into the MB while the CPU is reading it. MCF52277 Reference Manual, Rev. 1 23-26 Freescale Semiconductor...
The mask registers are not used in remote frame ID matching. All ID bits (except RTR) of the incoming received frame must match for the remote frame to trigger a response MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
CAN engine. CANCTRL[CLK_SRC] Internal Bus Clock Prescaler sys/2 S clock (1 .. 256) Oscillator Clock (EXTAL) Figure 23-16. CAN Engine Clocking Scheme or EXTAL sys/2 -------------------------------------- - Eqn. 23-6 PRESDIV + 1 MCF52277 Reference Manual, Rev. 1 23-28 Freescale Semiconductor...
Page 539
CAN compliant segment settings and the related parameter values. 1. For further explanation of the underlying concepts please refer to ISO/DIS 11519–1, Section 10.3. Reference also the Bosch CAN 2.0A/B protocol specification dated September 1991 for bit timing. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 23-29...
CANMCR register’s FRZ_ACK and NOT_RDY bits are set. The CANTX pin is in recessive state and the FlexCAN does not initiate any transmission or reception of CAN frames. The message buffers are not affected by reset, so they are not automatically initialized. MCF52277 Reference Manual, Rev. 1 23-30 Freescale Semiconductor...
(bus off and error) act in the same manner, and are located in the ERRSTAT register. The bus off and error interrupt mask bits are located in the CANCTRL register. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Channel 3 PWMOUT3 Alignment Period and Duty Counter Channel 2 Period and Duty Counter Channel 1 PWMOUT1 Period and Duty Counter Channel 0 Period and Duty Counter Figure 24-1. PWM Block Diagram MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-1...
PWM Channel 3 Output Enable. If enabled, the PWM signal becomes available at PWMOUT3 when its PWME3 corresponding clock source begins its next cycle. 0 PWM output disabled 1 PWM output enabled Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-3...
PWMCLK[PCLKn] control bits. If a clock select is changed while a PWM signal is being generated, a truncated or stretched pulse can occur during the transition. Address: 0xFC09_0022 (PWMCLK) Access: User Read/Write PCLK7 PCLK5 PCLK3 PCLK1 Reset: Figure 24-4. PWM Clock Select Register (PWMCLK) MCF52277 Reference Manual, Rev. 1 24-4 Freescale Semiconductor...
Clock B prescaler select. These three bits control the rate of Clock B, which can be used for PWM channels 3 and 7. PCKB PCKB Clock B Rate Internal bus clock ÷ 2 Internal bus clock ÷ 2 Internal bus clock ÷ 2 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-5...
The PWMCTL register provides various control of the PWM module. Change the CONn(n+1) bits only when both corresponding channels are disabled. See Section 24.3.2.7, “PWM 16-Bit Functions” for a more detailed description of the concatenation function. MCF52277 Reference Manual, Rev. 1 24-6 Freescale Semiconductor...
Clock A Clock SA ---------------------------------------- - Eqn. 24-1 × PWMSCLA Any value written to this register causes the scale counter to load the new scale value (PWMSCLA). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-7...
Any value written to this register causes the scale counter to load the new scale value (PWMSCLB). Address: 0xFC09_0029 (PWMSCLB) Access: User Read/Write SCALEB Reset: Figure 24-9. PWM Scale B Register (PWMSCLB) MCF52277 Reference Manual, Rev. 1 24-8 Freescale Semiconductor...
PWM channel has the capability of selecting one of two clocks, the prescaled clock (clock A or B) or the scaled clock (clock SA or SB). The block diagram in Figure 24-14 shows the four different clocks and how the scaled clocks are created. MCF52277 Reference Manual, Rev. 1 24-12 Freescale Semiconductor...
Page 555
Clock A and B are scaled values of the input clock. The value is software selectable for clock A and B and has options of 1, 1/2,..., or 1/128 times the internal bus clock. The value selected for clock A and B is determined by the PWMPRCLK[PCKAn] and PWMPRCLK[PCKBn] bits. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-13...
The starting polarity of the output is also selectable on a per channel basis. Figure 24-15 shows a block diagram for a PWM timer. MCF52277 Reference Manual, Rev. 1 24-14 Freescale Semiconductor...
Page 557
A change in duty or period can be forced into effect immediately by writing the new value to the duty and/or period registers and then writing to the counter. This forces the counter to reset and the new duty MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 558
When PWMCNTn register written to any When PWM channel is enabled When PWM channel is disabled value (PWMEn = 1). Counts from last value (PWMEn = 0) in PWMCNTn. Effective period ends MCF52277 Reference Manual, Rev. 1 24-16 Freescale Semiconductor...
Page 560
Clock (A, B, SA, or SB) PWMn frequency --------------------------------------------------------- - Eqn. 24-9 × WMPERn The PWMn duty cycle (high time as a percentage of period) is expressed as: MCF52277 Reference Manual, Rev. 1 24-18 Freescale Semiconductor...
Page 561
In concatenated mode, writes to the 16-bit counter by using a 16-bit access or writes to the low or high order byte of the counter resets the 16-bit counter. Reads of the 16-bit counter must be made by 16-bit access to maintain data coherency. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-19...
Page 562
PPOL1 PCLK1 CAE1 PWMOUT1 24.3.2.8 PWM Boundary Cases The following table summarizes the boundary conditions for the PWM regardless of the output mode (left- or center-aligned) and 8-bit (normal) or 16-bit (concatenation): MCF52277 Reference Manual, Rev. 1 24-20 Freescale Semiconductor...
Page 563
• Changed references from “core clock” to — (EDS) “internal bus clock” • Added customer version of Figure 24-14 — 11 May 2004 E Southers • Added customer version of Figure 24-15 — (EDS) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-21...
Page 564
Kirin2e Rev. 2 — 7 Jul 2006 E Southers Minime/DF/ST Rev. 1 (EDS) — 25 Aug 2006 • Added Kirin2e conditional tag and — Tsurikov assigned it to entries tagged for Kirin. (MST) MCF52277 Reference Manual, Rev. 1 24-22 Freescale Semiconductor...
Page 565
Kirin0u Rev 0 Draft B (MST) 12 Mar 2007 M Tsurikov Preparation for Kirin Rev. 3 (MST) 19 Mar 07 J Davis Light edit for corrections in grammar, style, (JMD) punctuation, and formatting. Kirin Rev. 3 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-23...
Page 566
11 Sep 2007 J Davis Release of Kirin2e, Rev. 5 (JMD) 1.28 12 Sep 2007 M Tsurikov Continue preparation for Kirin0u Rev. 2 (MST) 1.29 14 Sep 2007 M Tsurikov Kirin0u Rev. 2 (MST) MCF52277 Reference Manual, Rev. 1 24-24 Freescale Semiconductor...
Page 567
12 Feb 2008 D Saldana Kirin3 Rev. 0 Draft A (MDS) 1.34 22 Feb 2008 E Southers Prep for DragonFire0 Rev 1 (EDS) 1.35 02/29/08 J Davis Public Release of DragonFire0 Rev 1 (JMD) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 24-25...
This device contains SSI bits to control the clock rate and the SSI DMA request sources within the chip configuration module (CCM). See Chapter 9, “Chip Configuration Module (CCM),” for detailed information on these bit fields. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-1...
Such serial devices are: • Standard codecs • Digital signal processors (DSPs) • Microprocessors • Peripherals ® • Audio codecs that implement the inter-IC sound bus (I S) and the Intel AC97 standards MCF52277 Reference Manual, Rev. 1 25-2 Freescale Semiconductor...
• Gated clock mode These modes can be programmed via the SSI control registers. Table 25-1 lists these operating modes and some of the typical applications in which they can be used: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-3...
Page 572
In slave modes, the SSI’s programmed frame length setting (DC bits) can be lesser than or equal to the frame length setting of the master (external codec). Section 25.4.1, “Detailed Operating Mode Descriptions,” for more details on the above modes. MCF52277 Reference Manual, Rev. 1 25-4 Freescale Semiconductor...
The data to be transmitted occupies the most significant portion of the shift register if SSI_TCR[TXBIT0] is cleared. Otherwise, it occupies the least significant portion. The unused portion of the register is ignored. MCF52277 Reference Manual, Rev. 1 25-8 Freescale Semiconductor...
SSI receive data. SSI_RX0/1 are implemented as the first word of their respective Rx FIFOs. These bits receive data SSI_RX from RXSR depending on the mode of operation. If both FIFOs are in use, data is transferred to each data register alternately. SSI_RX1 is only used in two-channel mode. MCF52277 Reference Manual, Rev. 1 25-10 Freescale Semiconductor...
Figure 25-13. Receive Data Path (RXBIT0=1, RSHFD=1) (lsb Alignment) 25.3.7 SSI Control Register (SSI_CR) The SSI control register sets up the SSI modules. SSI operating modes are selected in this register (except AC97 mode, which is selected in SSI_ACR register). MCF52277 Reference Manual, Rev. 1 25-12 Freescale Semiconductor...
Page 581
Synchronous mode enable. In synchronous mode, transmit and receive sections of SSI share a common clock port (SSI_BCLK) and frame sync port (SSI_FS). 0 Reserved. 1 Synchronous mode selected. Network mode enable. 0 Network mode not selected 1 Network mode selected MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-13...
All flags in the SSI_ISR are updated after the first bit of the next SSI word has completed transmission or reception. Some status bits (ROE0/1 and TUE0/1) are cleared by reading the SSI_ISR followed by a read or write to the SSI_RX0/1 or SSI_TX0/1 registers. MCF52277 Reference Manual, Rev. 1 25-14 Freescale Semiconductor...
Page 583
It causes the receive tag interrupt if the SSI_IER[RXT] bit is set. This bit is cleared upon reading the SSI_ATAG register. 0 No change in SSI_ATAG register 1 SSI_ATAG register updated with different value MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-15...
Page 584
• At least one empty slot in Tx • Tx FIFO1 is full FIFO1 • SSI reset • POR reset Disabled • SSI_TX1 data transferred to • SSI_TX1 is written TXSR • SSI reset • POR reset MCF52277 Reference Manual, Rev. 1 25-16 Freescale Semiconductor...
Page 585
Enabled • TXSR is empty • Reading SSI_ISR when TUE1 is • SSI_ISR[TDE1] set Disabled • Transmit time slot occurs • SSI reset • POR reset MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-17...
Page 586
Normal • RFS is always set • SSI reset • POR reset Network • First time slot received • Starts receiving next time slot • SSI reset • POR reset MCF52277 Reference Manual, Rev. 1 25-18 Freescale Semiconductor...
Page 587
Receive FIFO full 0. Similar to description of RFF1, but pertains to Rx FIFO 0 and is not necessary to be in RFF0 two-channel mode for this bit to be set. 0 Space available in receive FIFO 0 1 Receive FIFO 0 is full MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-19...
SSI_TCR bits. However, an SSI reset does not affect the SSI_TCR bits. Address: 0xFC0B_C01C (SSI_TCR) Access: User read/write Reset TFEN1 TFEN0 TFDIR TXDIR TSHFD TSCKP TFSI TFSL TEFS BIT0 Reset Figure 25-17. SSI Transmit Configuration Register (SSI_TCR) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-21...
Page 590
(TFSL = 0). The frame sync can also be initiated upon receiving the first bit of data. 0 Transmit frame sync initiated as first bit of data transmits 1 Transmit frame sync is initiated one bit before the data transmits MCF52277 Reference Manual, Rev. 1 25-22 Freescale Semiconductor...
0 Gated clock mode disabled 1 Gated clock mode enabled Receive shift direction. Controls whether the msb or lsb is received first in a sample. RSHFD 0 Data received msb first 1 Data received lsb first MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-23...
Prescaler range. Controls a fixed divide-by-eight prescaler in series with the variable prescaler. It extends the range of the prescaler for those cases where a slower bit clock is required. 0 Prescaler bypassed 1 Prescaler enabled to divide the clock by 8 MCF52277 Reference Manual, Rev. 1 25-24 Freescale Semiconductor...
Page 594
Transmit FIFO empty watermark 0. Controls the threshold for when the SSI_ISR[TFE0] flag is set. TFE0 is set when TFWM0 the data level in Tx FIFO 0 falls below the selected threshold. See TFWM1 for bit settings. MCF52277 Reference Manual, Rev. 1 25-26 Freescale Semiconductor...
The SSI automatically clears this bit after completing transmission of a frame. 0 Next frame does not have a write command 1 Next frame does have a write command Note: Do not set WR and RD at the same time. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-27...
SSI_ACR[WR and RD] bits). A direct write from the core or the information received in the incoming command address slot can update these bits. If contents of these bits change due to an update, the SSI_ISR[CMDAU] bit is set. MCF52277 Reference Manual, Rev. 1 25-28...
Note: Bits 1–0 convey the codec-ID. Because only primary codecs are supported, these bits must be cleared. 25.3.18 SSI Transmit Time Slot Mask Register (SSI_TMASK) This register controls the time slots that the SSI transmits data in network mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-29...
1 Time slot masked (no data received in this time slot) 25.4 Functional Description 25.4.1 Detailed Operating Mode Descriptions The following sections describe in detail the main operating modes of the SSI module: normal, network, gated clock, I S, and AC97. MCF52277 Reference Manual, Rev. 1 25-30 Freescale Semiconductor...
Page 600
SSI_RXD input, and at the end of the time slot, this data transfers to the Rx data register. In internal gated clock mode, the Tx data line and clock output port are MCF52277 Reference Manual, Rev. 1 25-32...
Page 601
The period of the serial bit clock (PSR, PM bits for internal clock, or the frequency of the external clock on the SSI_BCLK pin) • The number of bits per sample (WL bits) • The number of time slots per frame (DC bits) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-33...
Page 602
TE bit enables transmission from the next frame. During that time the SSI_TXD port is disabled. The TE bit should be cleared after the TDE bit is set to ensure that all pending data is transmitted. MCF52277 Reference Manual, Rev. 1 25-34...
Page 603
8-bit word with continuous clock, FIFO disabled, three words per frame sync in network mode. NOTE The transmitter repeats the value 0x5E because of an underrun condition. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-35...
Page 604
(ROE) flag is set on reception of the next data (0x5E). The ROE flag is cleared by reading the SSI status register followed by reading the Rx data register. MCF52277 Reference Manual, Rev. 1 25-36...
Page 605
SSI_RXD signals. For this reason, no frame sync is needed in this mode. After transmission of data completes, the clock is pulled to the inactive state. Gated clocks are allowed for the transmit and receive MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 607
S slave mode Normal mode In normal (non-I S) mode operation, no register bits are forced to any particular state internally, and the user can program the SSI to work in any operating condition. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-39...
Page 608
S Slave Mode In I S slave mode (SSI_CR[I2S] = 10), the following additional settings are recommended: • External generated bit clock (SSI_TCR[TXDIR] = 0) • External generated frame sync (SSI_TCR[TFDIR] = 0) MCF52277 Reference Manual, Rev. 1 25-40 Freescale Semiconductor...
Tx frame sync length is one-word-long-frame (SSI_TCR[TFSL] = 0) • Rx frame sync length is one-word-long-frame (SSI_RCR[RFSL] = 0) • Tx frame sync initiated one bit before data is transmitted (SSI_TCR[TEFS] = 1) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-41...
Page 610
SSI should be idle, after operating for one frame. The following shows the slot assignments in a valid transmit frame: • Slot 0: The tag value (written by the user program) MCF52277 Reference Manual, Rev. 1 25-42 Freescale Semiconductor...
SSI_CR[MCE] bit. This serial master clock is an oversampling clock of the frame sync clock (SSI_FS). In this mode, the word length (WL), prescaler range MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 612
When internally generated, receive and transmit frame sync generate from the word clock and are defined by the frame rate divider (DC) bits and the word length (WL) bits of the SSI_CCR. MCF52277 Reference Manual, Rev. 1 25-44 Freescale Semiconductor...
Page 613
Table 25-22. SSI Bit Clock and Frame Rate as a Function of PSR, PM, and DIV2 SSI_CLKIN SSI_CCR Bit Clk (kHz) Frame rate freq (MHz) SSI_BCLK (kHz) (SSI_MCLK) DIV2 PSR 12.288 12.288 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-45...
SSI_TX0/1 and SSI_RX0/1 based on the data format and the number of bits per word. Independent data formats are supported for the transmitter and receiver (i.e. the transmitter and receiver can use different data formats). MCF52277 Reference Manual, Rev. 1 25-46 Freescale Semiconductor...
Page 615
In sign-extension, all bits above the most significant bit are equal to the most significant bit. This format is useful when data is stored in a fixed-point integer format (which implies fractional values). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-47...
Tx FIFO 1). If not enabled, then one value can be written to the SSI_TX0 register (one per channel in two-channel mode using SSI_TX1). When the TIE bit is cleared, all transmit interrupts are disabled. However, the TDE0/1 bits always indicate the corresponding SSI_TX register MCF52277 Reference Manual, Rev. 1 25-48 Freescale Semiconductor...
To ensure proper operation of the SSI, use the power-on or SSI reset before changing any of the control bits listed in Table 25-27. NOTE These control bits should not be changed when SSI module is enabled. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 25-49...
Figure 26-1. Real Time Clock Block Diagram 26.1.1 Overview This section discusses how to operate and program the real-time clock (RTC) module that maintains a time-of-day clock, provides stopwatch, alarm, and interrupt functions, and supports the following features. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-1...
Sampling frequencies are dependent upon the RTC oscillator frequency and the value in RTC_GOC[31:9]. • Minute Stopwatch MCF52277 Reference Manual, Rev. 1 26-2 Freescale Semiconductor...
This register programs the hours and minutes for the TOD clock. It can be read or written at any time. After a write, the time changes to the new value. This register cannot be reset because the real-time clock is always enabled at reset. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-3...
SECONDS 26.3.3 RTC Hours and Minutes Alarm Register (RTC_ALRM_HM) The RTC_ALRM_HM register configures the hours and minutes setting for the alarm. The alarm settings can be read or written at any time. MCF52277 Reference Manual, Rev. 1 26-4 Freescale Semiconductor...
Seconds setting of the alarm. The value written to this field must be the alarm time desired minus one second. Set SECONDS to any value between 0 and 59 (0x3B). 26.3.5 RTC Control Register (RTC_CR) The RTC_CR register enables the real-time clock module and specify the reference frequency information for the prescaler. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-5...
Interrupts may occur while the system clock is idle or in sleep mode. Address: 0xFC03_C014 (RTC_ISR) Access: User read/write Reset R SAM7 SAM6 SAM5 SAM4 SAM3 SAM2 SAM1 SAM0 2HZ W w1c Reset Figure 26-7. RTC Interrupt Status Register (RTC_ISR) MCF52277 Reference Manual, Rev. 1 26-6 Freescale Semiconductor...
1 The stopwatch timed out 26.3.7 RTC Interrupt Enable Register (RTC_IER) The RTC_IER register enables/disables the various real-time clock interrupts. Masking an interrupt bit has no effect on its corresponding status bit. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-7...
Page 626
1 Stopwatch interrupt enabled. The stopwatch counts down and remains at decimal -1 until it is reprogrammed. If this bit is enabled with RTC_STPWCF equaling 0x3F, an interrupt is requested on the next minute tick. MCF52277 Reference Manual, Rev. 1 26-8...
Current day count. Set to any value between 0 and 65,535 (0xFFFF). DAYS 26.3.10 RTC Day Alarm Register (RTC_ALRM_DAY) The RTC_ALRM_DAY register configures the day for the alarm. The alarm settings can be read or written at any time. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-9...
RTC oscillator clock to create a 1 Hz and sample frequencies. This register can be read or written at any time. A non-zero value must be programmed into RTC_GOC for the 1 Hz internal clock to function. MCF52277 Reference Manual, Rev. 1 26-10...
59 to 00, the minute counter increments and the MIN interrupt flag is set. The same is true for the minute counter with the HR signal and the hour counter with the DAY signal. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Figure 26-14. Flow Chart of RTC Operation 26.5.2 Programming the Alarm or Time-of-Day Registers Use the following procedure illustrated in Figure 26-15 when changing the alarm or time-of-day (day, hour, minute, and second) registers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 26-13...
Page 632
Program the alarm or time-of-day registers Clear any incidental alarm interrupt during programming (write 1 to RTC_ISR[ALM]) Enable the alarm interrupt (set RTC_IER[ALM] Figure 26-15. Flow Chart of Alarm and Time-of-Day Programming MCF52277 Reference Manual, Rev. 1 26-14 Freescale Semiconductor...
Low-power modes are described in the power management module, Chapter 8, “Power Management.” Table 27-1 shows the PIT module operation in low-power modes and how it can exit from each mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 27-1...
Setting the EN bit and writing to PRE[3:0] can be done in this same write cycle. Clearing the EN bit stops the prescaler counter. Internal Bus Clock Decimal Divisor Equivalent 0000 0001 0010 1101 8192 1110 16384 1111 32768 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 27-3...
PIT counter. The prescaler counter is reset (0xFFFF) anytime a new value is loaded into the PIT counter and also during reset. Reading the PMRn returns the value written in the modulus latch. Reset initializes PMRn to 0xFFFF. MCF52277 Reference Manual, Rev. 1 27-4 Freescale Semiconductor...
When PIT counter reaches a count of 0x0000, PIF flag is set in PCSRn. The value in the modulus register loads into the counter, and the counter begins decrementing toward 0x0000. If the PCSRn[PIE] bit is set, the PIF flag issues an interrupt request to the CPU. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 27-5...
PCSRn[PRE] bits. The PMRn[PM] bits select the timeout period. × Timeout period PRE[3:0] (PM[15:0] × Eqn. 27-1 sys 2 ⁄ 27.3.4 Interrupt Operation Table 27-6 shows the interrupt request generated by the PIT. MCF52277 Reference Manual, Rev. 1 27-6 Freescale Semiconductor...
Page 639
The PIF flag is set when the PIT counter reaches 0x0000. The PIE bit enables the PIF flag to generate interrupt requests. Clear PIF by writing a 1 to it or by writing to the PMR. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
DMA transfer on a particular event. NOTE The GPIO module must be configured to enable the peripheral function of the appropriate pins (refer to Chapter 14, “General Purpose I/O Module”) prior to configuring the DMA Timers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 28-1...
• Ability to stop the timer from counting when the ColdFire core is halted 28.2 Memory Map/Register Definition The timer module registers, shown in Table 28-1, can be modified at any time. MCF52277 Reference Manual, Rev. 1 28-2 Freescale Semiconductor...
If configured to generate a DMA request, processing of the DMA data transfer automatically clears the REF and CAP flags via the internal DMA ACK signal. Address: 0xFC07_0003 (DTER0) Access: User read/write 0xFC07_4003 (DTER1) 0xFC07_8003 (DTER2) 0xFC07_C003 (DTER3) Reset: Figure 28-4. DTERn Registers MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 28-5...
(DTCNn) as part of the output-compare function. The reference value is not matched until DTCNn equals DTRRn, and the prescaler indicates that DTCNn should be incremented again. Therefore, the reference register is matched after DTRRn + 1 time intervals. MCF52277 Reference Manual, Rev. 1 28-6 Freescale Semiconductor...
The current value of the 32-bit DTCNs can be read at anytime without affecting counting. Any write to DTCNn clears it. The timer counter increments on the clock source rising edge (internal bus clock divided by 1, internal bus clock divided by 16, or DTnIN). MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 28-7...
When a timer reaches the reference value selected by DTRR, it can send an output signal on DTnOUT. DTnOUT can be an active-low pulse or a toggle of the current output, as selected by the DTMRn[OM] bit. MCF52277 Reference Manual, Rev. 1 28-8...
For example, if a 83.33-MHz timer clock is divided by 16, DTMRn[PS] equals 0x7F, and the timer is referenced at 0x13DC3 (81347 decimal), the time-out period is: × × × Timeout period 81347 2.00 s ------------------------ - Eqn. 28-2 × 83.3 MCF52277 Reference Manual, Rev. 1 28-10 Freescale Semiconductor...
MCU and an external peripheral device. The DSPI supports up to 32 queued SPI transfers (16 receive and 16 transmit) in the DSPI resident FIFOs eliminating CPU intervention between transfers. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-1...
– FIFO overflow (attempt to transmit with an empty TX FIFO or serial frame received while RX FIFO is full) (RFOF) – FIFO overrun (logical OR of RX overflow and TX underflow interrupts) MCF52277 Reference Manual, Rev. 1 29-2 Freescale Semiconductor...
DSPI stops while in module disable mode. The DSPI enters the module disable mode when the DSPI_MCR[MDIS] bit is set. See Section 29.4.7, “Power Saving Features,” for more details on the module disable mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-3...
The DSPI_PCS[2,4] signals are peripheral chip select output signals in master mode. In slave mode, these signals are not used. 29.2.4 Serial Input (DSPI_SIN) DSPI_SIN is a serial data input signal. 29.2.5 Serial Output (DSPI_SOUT) DSPI_SOUT is a serial data output signal. MCF52277 Reference Manual, Rev. 1 29-4 Freescale Semiconductor...
MDIS bits can be changed at any time, but only take effect on the next frame boundary. Only the HALT and MDIS bits in the DSPI_MCR may be changed while the DSPI is running. NOTE The DSPI_MCR[MDIS] bit is set at reset. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-5...
Page 656
Section 29.4.4.4, “Modified SPI MTFE Transfer Format (MTFE = 1, CPHA = 1),” for more information. 0 Modified SPI transfer format disabled 1 Modified SPI transfer format enabled Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 29-6 Freescale Semiconductor...
Page 657
Reserved, must be cleared. Halt. Starts and stops DSPI transfers. See Section 29.4.1, “Start and Stop of DSPI Transfers,” for details on the HALT operation of this bit. 0 Start transfers 1 Stop transfers MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-7...
In slave mode, a subset of the bit fields in the DSPI_CTAR0 registers sets the slave transfer attributes. See the individual bit descriptions for details on which bits are used in slave modes. MCF52277 Reference Manual, Rev. 1 29-8 Freescale Semiconductor...
Page 659
0 The baud rate is computed normally with a 50/50 duty cycle 1 Baud rate is doubled with the duty cycle depending on the baud rate prescaler CPHA SCK Duty Cycle 50/50 50/50 33/66 40/60 43/57 50/50 66/33 60/40 57/43 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-9...
DSPI_SR by writing a 1 to it. Writing a 0 to a flag bit has no effect. Address 0xFC05_C02C (DSPI_SR) Access: User Read/Write R TCF TXRXS EOQF TFUF TFFF RFOF RFDF W w1c Reset TXCTR TXNXTPTR RXCTR POPNXTPTR Reset Figure 29-5. DSPI_SR Register MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-13...
Page 664
0 RX FIFO is empty 1 RX FIFO is not empty Note: In the interrupt service routine, RFDF must be cleared only after the DSPI_POPR register is read. Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 29-14 Freescale Semiconductor...
Field Description Transmission complete request enable. Enables DSPI_SR[TCF] flag to generate an interrupt request. TCF_RE 0 TCF interrupt requests are disabled 1 TCF interrupt requests are enabled 30–29 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-15...
Section 29.4.2.4, “TX FIFO Buffering Mechanism,” for more information. Write accesses of 8- or 16-bits to the DSPI_PUSHR transfer 32 bits to the TX FIFO. NOTE Only the TXDATA field is used for DSPI slaves. MCF52277 Reference Manual, Rev. 1 29-16 Freescale Semiconductor...
Page 667
DSPI_TCR[SPI_TCNT] field. The SPI_TCNT field is cleared before transmission of the current SPI frame begins. This bit is used only in SPI master mode. 0 Do not clear DSPI_TCR[SPI_TCNT] field 1 Clear DSPI_TCR[SPI_TCNT] field 25–24 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-17...
TX FIFO. The registers are read-only and cannot be modified. Reading the DSPI_TXFRn registers does not alter the state of TX FIFO. The 16-entry deep FIFO is implemented with 16 registers, DSPI_TXFR0–15. MCF52277 Reference Manual, Rev. 1 29-18 Freescale Semiconductor...
The DSPI has two operating states; stopped and running. The default state of the DSPI is stopped. In the stopped state, no serial transfers are initiated in master mode and no transfers are responded to in slave MCF52277 Reference Manual, Rev. 1 29-20...
In master mode, the DSPI initiates and controls the transfer according to the SPI command field of the TX FIFO entry. In slave mode, the DSPI only responds to MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
DSPI_PUSHR, refer to Section 29.3.6, “DSPI PUSH TX FIFO Register (DSPI_PUSHR).” TX FIFO entries can only be removed from the TX FIFO by being shifted out or by flushing the TX FIFO. MCF52277 Reference Manual, Rev. 1 29-22 Freescale Semiconductor...
The RXCTR is updated every time the DSPI _POPR is read or SPI data is copied from the shift register to the RX FIFO. The DSPI_SR[POPNXTPTR] field points to the RX FIFO entry returned when the DSPI_POPR is read. The POPNXTPTR contains the positive, 32-bit word offset from DSPI_RXFR0. For example, MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-23...
BR fields in the DSPI_CTARn select the frequency of DSPI_SCK using the following formula: SYS/2 × Eqn. 29-1 SCK baud rate ------------------------------------------------- - --------------------------------------- - PBR Prescaler Value BR Scaler Value MCF52277 Reference Manual, Rev. 1 29-24 Freescale Semiconductor...
Page 675
DSPI_PCS signal for the next frame. See Figure 29-14 for an illustration of the delay after transfer. DSPI_CTARn[PDT, DT] fields select the delay after transfer by the formula: × × ------------ - Eqn. 29-4 SYS/2 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-25...
In this format, the master and slave sample their DSPI_SIN pins on the odd-numbered DSPI_SCK edges and change the data on their DSPI_SOUT pins on the even-numbered DSPI_SCK edges. MCF52277 Reference Manual, Rev. 1 29-26 Freescale Semiconductor...
Page 677
DSPI_SCK edge before the first data bit becomes available on the slave DSPI_SOUT pin. In this format, the master and slave devices change the data on their DSPI_SOUT pins on the odd-numbered DSPI_SCK edges and sample the data on their DSPI_SIN pins on the even-numbered DSPI_SCK edges. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-27...
Page 678
SPI mode to allow for delays in device pads and board traces. These delays become a more significant fraction of the DSPI_SCK period as the DSPI_SCK period decreases with increasing baud rates. MCF52277 Reference Manual, Rev. 1 29-28 Freescale Semiconductor...
Page 679
Slave DSPI_SOUT Master DSPI_SOUT DSPI_PCSn System Clock System Clock = PCS to SCK delay. = After SCK delay. Figure 29-16. DSPI Modified Transfer Format (MTFE = 1, CPHA = 0, Fsck = Fsys/4) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-29...
When CONT is cleared, DSPI drives the asserted chip select signals to their idle states in between frames. The idle states of the chip select signals are selected by the DSPI_MCR[PCSIS] field. Figure 29-18 shows the timing diagram for two four-bit transfers with CPHA set and CONT cleared. MCF52277 Reference Manual, Rev. 1 29-30 Freescale Semiconductor...
Page 681
The DSPI_PCSn signal must be negated before DSPI_CTAR is switched. When CONT is set and the DSPI_PCSn signals for the next transfer are different from the present transfer, the DSPI_PCSn signals behave as if the CONT bit was cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-31...
Enabling continuous SCK disables the PCS to SCK delay and the after SCK delay. The delay after transfer is fixed at one DSPI_SCK cycle. Figure 29-21 shows timing diagram for continuous SCK format with continuous selection disabled. MCF52277 Reference Manual, Rev. 1 29-32 Freescale Semiconductor...
TX FIFO is not full TFFF Current frame transfer is complete — TX FIFO underflow has occurred TFUF — RX FIFO is not empty RFDF RX FIFO overflow has occurred RFOF — MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-33...
Page 684
TX FIFO of a DSPI operating in slave mode is empty, and a transfer is initiated from an external SPI master. If the TFUF bit is set while the DSPI_RSER[TFUF_RE] bit is set, an interrupt request is generated. MCF52277 Reference Manual, Rev. 1 29-34 Freescale Semiconductor...
Slave Interface Signal Gating The DSPI’s module enable signal gates slave interface signals such as address, byte enable, read/write and data. This prevents toggling slave interface signals from consuming power unless the DSPI is accessed. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-35...
PBR and the baud rate scaler BR in the DSPI_CTARn registers. The values calculated assume a 100 MHz system frequency. MCF52277 Reference Manual, Rev. 1 29-36 Freescale Semiconductor...
) and CS to SCK delay (t ) that can be generated based on the prescaler values and the scaler values set in the DSPI_CTARn registers. The values calculated assume a 100 MHz system frequency. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-37...
TX FIFO is chosen for the illustration, but the concepts carry over to the RX FIFO. See Section 29.4.2.4, “TX FIFO Buffering Mechanism,” Section 29.4.2.5, “RX FIFO Buffering Mechanism,” for details on the FIFO operation. MCF52277 Reference Manual, Rev. 1 29-38 Freescale Semiconductor...
Page 689
Last-in entry address = RX FIFO base + 4 × [(RXCTR + POPNXTPTR - 1) modulo RX FIFO depth] RX FIFO base: base address of RX FIFO RXCTR: RX FIFO counter POPNXTPTR: pop next pointer RX FIFO depth: 16 MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 29-39...
All three UARTs have DMA request capability • Parity, framing, and overrun error detection • False-start bit detection • Line-break detection and generation • Detection of breaks originating in the middle of a character MCF52277 Reference Manual, Rev. 1 30-2 Freescale Semiconductor...
Writing control bytes into the appropriate registers controls the operation of the UART module. NOTE UART registers are accessible only as bytes. NOTE Interrupt can mean an interrupt request asserted to the CPU or a DMA request. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-3...
Page 694
UMR1n, UMR2n, and UCSRn must be changed only after the receiver/transmitter is issued a software reset command. If operation is not disabled, undesirable results may occur. Reading this register results in undesired effects and possible incorrect transmission or reception of characters. Register contents may also be changed. MCF52277 Reference Manual, Rev. 1 30-4 Freescale Semiconductor...
Parity mode. Selects the parity or multidrop mode for the UART. The parity bit is added to the transmitted character, and the receiver performs a parity check on incoming data. The value of PM affects PT, as shown below. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
1.438 0.938 1110 1.938 0111 1.500 1.000 1111 2.000 30.3.3 UART Status Registers (USRn) The USRn registers, shown in Figure 30-5, show the status of the transmitter, the receiver, and the FIFO. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-7...
Page 698
1 The transmitter holding register is empty and ready for a character. TXRDY is set when a character is sent to the transmitter shift register or when the transmitter is first enabled. If the transmitter is disabled, characters loaded into the transmitter holding register are not sent. MCF52277 Reference Manual, Rev. 1 30-8 Freescale Semiconductor...
30-7, supply commands to the UART. Only multiple commands that do not conflict can be specified in a single write to a UCRn. For example, RESET TRANSMITTER ENABLE cannot be specified in one command. TRANSMITTER MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-9...
Page 700
Transmitter must be enabled for the command to be accepted. This command ignores the state of UnCTS. Causes UnTXD to go high (mark) within two bit times. Any characters in the STOP BREAK transmit buffer are sent. MCF52277 Reference Manual, Rev. 1 30-10 Freescale Semiconductor...
FIFO. UnRXD is connected to the serial shift register. The CPU reads from the top of the FIFO while the receiver shifts and updates from the bottom when the shift register is full (see Figure 30-18). RB contains the character in the receiver. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-11...
The UIPCRs, shown in Figure 30-10, hold the current state and the change-of-state for UnCTS. Address: 0xFC06_0010 (UIPCR0) Access: User read-only 0xFC06_4010 (UIPCR1) 0xFC06_8010 (UIPCR2) Reset: UnCTS Figure 30-10. UART Input Port Changed Registers (UIPCRn) MCF52277 Reference Manual, Rev. 1 30-12 Freescale Semiconductor...
If a UIMRn bit is cleared, state of the corresponding UISRn bit has no effect on the output. The UISRn and UIMRn registers share the same space in memory. Reading this register provides the user with interrupt status, while writing controls the mask bits. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-13...
Page 704
0 The transmitter holding register was loaded by the CPU or the transmitter is disabled. Characters loaded into the transmitter holding register when TXRDY is cleared are not sent. 1 The transmitter holding register is empty and ready to be loaded with a character. MCF52277 Reference Manual, Rev. 1 30-14 Freescale Semiconductor...
The UIPn registers, shown in Figure 30-15, show the current state of the UnCTS input. Address: 0xFC06_0034 (UIP0) Access: User read-only 0xFC06_4034 (UIP1) 0xFC06_8034 (UIP2) Reset: Figure 30-15. UART Input Port Registers (UIPn) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-15...
The internal bus clock serves as the basic timing reference for the clock source generator logic, which consists of a clock generator and a programmable 16-bit divider dedicated to each UART. The 16-bit divider is used to produce standard UART baud rates. MCF52277 Reference Manual, Rev. 1 30-16 Freescale Semiconductor...
Page 707
When the internal bus clock is the UART clocking source, it goes through a divide-by-32 prescaler and then passes through the 16-bit divider of the concatenated UBG1n and UBG2n registers. The baud-rate calculation is: sys 2 ⁄ Baudrate ---------------------------------- - Eqn. 30-1 32 x divider MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-17...
UART sets USRn[TXRDY]. The transmitter converts parallel data from the CPU to a serial bit stream on UnTXD. It automatically sends a start bit followed by the programmed number of data bits, an MCF52277 Reference Manual, Rev. 1 30-18...
Page 709
The transmitter must be manually reenabled by reasserting UnRTS before the next message is sent. Figure 30-19 shows the functional timing information for the transmitter. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-19...
Page 710
(framing error) and UnRXD remains low for one-half of the bit period after the stop bit is sampled, receiver operates as if a new start bit were detected. Parity error, MCF52277 Reference Manual, Rev. 1 30-20...
Page 711
In addition to the data byte, three status bits—parity error (PE), framing error (FE), and received break (RB)—are appended to each data character in the FIFO; overrun error (OE) is not appended. By MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Section 30.3, “Memory Map/Register Definition.” The UART’s transmitter and receiver should be disabled when switching between modes. The selected mode is activated immediately upon mode selection, regardless of whether a character is being received or transmitted. MCF52277 Reference Manual, Rev. 1 30-22 Freescale Semiconductor...
Received parity is not checked and is not recalculated for transmission. Stop bits are sent as they are received. A received break is echoed as received until next valid start bit is detected. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Data fields in the data stream are separated by an address character. After a slave receives a block of data, its CPU disables the receiver and repeats the process. Functional timing information for multidrop mode is shown in Figure 30-24. MCF52277 Reference Manual, Rev. 1 30-24 Freescale Semiconductor...
Page 715
If 8-bit characters are not required, one way to provide error detection is to use software to calculate parity and append it to the 5-, 6-, or 7-bit character. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor...
Section 15.2.9.1, “Interrupt Sources,” for details on interrupt assignments for the UART modules. 1. Initialize the appropriate ICRx register in the interrupt controller. 2. Unmask appropriate bits in IMR in the interrupt controller. MCF52277 Reference Manual, Rev. 1 30-26 Freescale Semiconductor...
Page 717
The implementation described in this section allows independent DMA processing of transmit and receive data while continuing to support interrupt notification to the processor for CTS change-of-state and delta break error managing. Table 30-14 shows the DMA requests. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-27...
Select the mode of operation (CM bits). b) If preferred, program operation of transmitter ready-to-send (TXRTS). c) If preferred, program operation of clear-to-send (TXCTS bit). d) Select stop-bit length (SB bits). 7. UCRn: Enable transmitter and/or receiver. MCF52277 Reference Manual, Rev. 1 30-28 Freescale Semiconductor...
Page 719
Enable Serial Module Errors? SINIT Initiate: Channel Enable Receiver Interrupts CHK1 Assert Request To Send Call CHCHK SINITR Return Save Channel Status Figure 30-25. UART Mode Programming Flowchart (Sheet 1 of 5) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-29...
Page 720
Transmitter Never-ready Flag Too Long? Ready? SNDCHR Send Character To Transmitter RxCHK Waited Set Receiver- Character Been Too Long? Never-ready Flag Received? Figure 30-25. UART Mode Programming Flowchart (Sheet 2 of 5) MCF52277 Reference Manual, Rev. 1 30-30 Freescale Semiconductor...
Page 721
PRCHK Have Return Parity Error? Set Parity Error Flag CHRCHK Get Character From Receiver Same As Transmitted Character? Set Incorrect Character Flag Figure 30-25. UART Mode Programming Flowchart (Sheet 3 of 5) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-31...
Page 722
Clear Change-in- Break Status Bit Remove Break Character From Receiver FIFO Replace Return Address On System Stack And Monitor Warm Start Address SIRQR Figure 30-25. UART Mode Programming Flowchart (Sheet 4 of 5) MCF52277 Reference Manual, Rev. 1 30-32 Freescale Semiconductor...
Page 723
UART Modules OUTCH Transmitter Ready? Send Character To Transmitter Return Figure 30-25. UART Mode Programming Flowchart (Sheet 5 of 5) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 30-33...
Register Start, Stop, Arbitration Control Input Address Sync Compare I2C_SCL I2C_SDA Figure 31-1. I C Module Block Diagram Figure 31-1 shows the I C registers, described in Section 31.2, “Memory Map/Register Definition”: MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-1...
Software-programmable for one of 50 different serial clock frequencies • Software-selectable acknowledge bit • Interrupt-driven, byte-by-byte data transfer • Arbitration-lost interrupt with automatic mode switching from master to slave • Calling address identification interrupt MCF52277 Reference Manual, Rev. 1 31-2 Freescale Semiconductor...
Reserved, must be cleared. 31.2.2 C Frequency Divider Register (I2FDR) The I2FDR, shown in Figure 31-3, provides a programmable prescaler to configure the I C clock for bit-rate selection. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-3...
Page 728
0x3F 2048 31.2.3 C Control Register (I2CR) The I2CR enables the I C module and the I C interrupt. It also contains bits that govern operation as a slave or a master. MCF52277 Reference Manual, Rev. 1 31-4 Freescale Semiconductor...
Page 729
Repeat start. Always read as 0. Attempting a repeat start without bus mastership causes loss of arbitration. RSTA 0 No repeat start 1 Generates a repeated START condition. 1–0 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-5...
Page 730
Received acknowledge. The value of I2C_SDA during the acknowledge bit of a bus cycle. RXAK 0 An acknowledge signal was received after the completion of 8-bit data transmission on the bus 1 No acknowledge signal was detected at the ninth clock. MCF52277 Reference Manual, Rev. 1 31-6 Freescale Semiconductor...
31-7). A START signal is defined as a high-to-low transition of I2C_SDA while I2C_SCL is high. This signal denotes the beginning of a data transfer (each data transfer can be several bytes long) and awakens all slaves. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-7...
Figure 31-10. The master uses a repeated START to communicate with another slave or with the same slave in a different mode (transmit/receive mode) without releasing the bus. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-9...
Page 734
Note: No acknowledge on the last byte Example 3: 7-bit Slave Rept 7-bit Slave Data Data Data Address Address Master Writes to Slave Master Reads from Slave Figure 31-11. Data Transfer, Combined Format MCF52277 Reference Manual, Rev. 1 31-10 Freescale Semiconductor...
The free time between a STOP and the next START condition is built into the hardware that generates the START cycle. Depending on the relative frequencies of the system clock and the I2C_SCL period, the MCF52277 Reference Manual, Rev. 1 31-12...
2. Get value from transmitting counter, TXCNT. If no more data, go to step #5. 3. Transmit next byte of data via I2DR. 4. Decrement TXCNT and go to step #1 5. Generate a stop condition by clearing I2CR[MSTA]. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-13...
MSTA without signaling a STOP, generates an interrupt to the CPU, and sets IAL to indicate a failed attempt to engage the bus. When considering these cases, slave service routine should first test IAL and software should clear it if it is set. MCF52277 Reference Manual, Rev. 1 31-14 Freescale Semiconductor...
Page 739
Rx Mode Mode Read Data Generate Dummy Read Dummy Read Dummy Read from I2DR from I2DR STOP Signal from I2DR from I2DR And Store Figure 31-14. Flow-Chart of Typical I C Interrupt Routine MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 31-15...
External development systems can access saved data, because the hardware supports concurrent operation of the processor and BDM-initiated commands. In addition, the option allows interrupts to occur. See Section 32.6, “Real-Time Debug Support”. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-1...
Halt status is reflected on processor status signals (PST[3:0]) as the value 0xF. If CSR[BKD] is set (disabling normal BKPT functionality), asserting BKPT generates a debug interrupt exception in the processor. MCF52277 Reference Manual, Rev. 1 32-2 Freescale Semiconductor...
(lsb). Execution speed is affected only when both storage elements contain valid data to be dumped to the DDATA port. The core stalls until one FIFO entry is available. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-3...
PST is 0x5 when a taken branch is executed. For some opcodes, a branch target address may be displayed on DDATA depending on the CSR settings. CSR also controls the number of address bytes displayed, MCF52277 Reference Manual, Rev. 1 32-4...
These registers are also accessible from the processor’s supervisor programming model by executing the WDEBUG instruction (write only). Therefore, the breakpoint hardware in debug module can be read or MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-5...
Page 746
BDM port using the command. In addition, the WDMREG configuration/status register (CSR) can be read through the BDM port using command. RDMREG MCF52277 Reference Manual, Rev. 1 32-6 Freescale Semiconductor...
0x00 using the WDEBUG instruction and through the BDM port using the RDMREG WDMREG commands. DRc[4:0]: 0x00 (CSR) Access: Supervisor write-only BDM read/write BSTAT TRG HALT BKPT Reset FDBG DBGH Reset Figure 32-3. Configuration/Status Register (CSR) MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-7...
Page 748
TM equals 101 or 110. The internal SRAM and caches are disabled. Force emulation mode on trace exception. 0 The processor enters supervisor mode 1 The processor enters emulator mode when a trace exception occurs MCF52277 Reference Manual, Rev. 1 32-8 Freescale Semiconductor...
Page 749
1 Single-step mode. The processor halts after execution of each instruction. While halted, any BDM command can be executed. On receipt of the command, the processor executes the next instruction and halts again. This process continues until SSM is cleared. 3–2 Reserved, must be cleared. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-9...
Transfer Type. See the TT definition in the AATR description, Section 32.4.4, “Address Attribute Trigger Register (AATR)”. 2–0 Transfer Modifier. See the TM definition in the AATR description, Section 32.4.4, “Address Attribute Trigger Register (AATR)”. MCF52277 Reference Manual, Rev. 1 32-10 Freescale Semiconductor...
Transfer Modifier Mask. Setting a TMM bit masks the corresponding TM bit in address comparisons. Read/Write. R is compared with the R/W signal of the processor’s local bus. 6–5 Size. Compared to the processor’s local bus size signals. 00 Longword 01 Byte 10 Word 11 Reserved MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-11...
A write to TDR clears the CSR trigger status bits, CSR[BSTAT]. TDR is accessible in supervisor mode as debug control register 0x07 using the WDEBUG instruction and through the BDM port using the WDMREG command. MCF52277 Reference Manual, Rev. 1 32-12 Freescale Semiconductor...
Page 753
Level 2 Data Breakpoint Invert. Inverts the logical sense of all the data breakpoint comparators. This can develop a L2DI trigger based on the occurrence of a data value other than the DBR contents. 0 No inversion 1 Invert data breakpoint comparators. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-13...
Page 754
Note: Debug Rev A only had the AND condition available for the triggers. Enable Level 1 Breakpoint. Global enable for the breakpoint trigger. L1EBL 0 Disables all level 1 breakpoints 1 Enables all level 1 breakpoint triggers MCF52277 Reference Manual, Rev. 1 32-14 Freescale Semiconductor...
PBR1–3) and TDR is configured appropriately. PBR0 bits are masked by setting corresponding PBMR bits (PBMR has no effect on PBR1–3). Results are compared with the processor’s program counter register, as defined in TDR. Breakpoint registers, PBR1–3, have no masking associated with them. The MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-15...
Page 756
0 PBR is disabled. 1 PBR is enabled. Figure 32-9 shows PBMR. PBMR is accessible in supervisor mode using the WDEBUG instruction and via the BDM port using the command. PBMR only masks PBR0. WDMREG MCF52277 Reference Manual, Rev. 1 32-16 Freescale Semiconductor...
Address specific single addresses are programmed into ABLR. Table 32-14. ABHR Field Description Field Description 31–0 High Address. Holds the 32-bit address marking the upper bound of the address breakpoint range. Address MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-17...
DBR bit to be compared to the appropriate bit of the processor’s local data bus. Setting a DBMR bit causes that bit to be ignored. The DBR supports aligned and misaligned references. Table 32-17 shows relationships between processor address, access size, and location within the 32-bit data bus. MCF52277 Reference Manual, Rev. 1 32-18 Freescale Semiconductor...
BKPT. This type of halt is always first marked as pending in the pocessor, which samples for pending halt and interrupt conditions once per instruction. When a pending condition is asserted, the processor halts execution at the next sample point. See Section 32.6.1, “Theory of Operation”. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-19...
17-bit packets composed of a status/control bit and a 16-bit data word. As shown Figure 32-13, all state transitions are enabled on a rising edge of the PSTCLK clock when DSCLK is high; DSI is sampled and DSO is driven. MCF52277 Reference Manual, Rev. 1 32-20 Freescale Semiconductor...
Otherwise, the debug module can accept a new serial transfer after 32 processor clock periods. 32.5.2.1 Receive Packet Format The basic receive packet consists of 16 data bits and 1 status bit Data Figure 32-14. Receive BDM Packet MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-21...
BDM command set. Subsequent paragraphs contain detailed descriptions of each command. Issuing a BDM command when the processor is accessing debug module registers using the WDEBUG instruction causes undefined behavior. See Table 32-22 for register address encodings. MCF52277 Reference Manual, Rev. 1 32-22 Freescale Semiconductor...
Page 763
- Parallel: Command is executed in parallel with CPU activity. 0x4 is a three-bit field. Freescale reserves unassigned command opcodes. All unused command formats within any revision level perform a and return the illegal command response. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-23...
Operands and addresses are transferred most-significant word first. In the following descriptions of the BDM command set, the optional set of extension words is defined as address, data, or operand data. MCF52277 Reference Manual, Rev. 1 32-24 Freescale Semiconductor...
• At the completion of cycle 3, the debug module initiates a memory read operation. Any serial transfers that begin during a memory access return a not-ready response. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-25...
LS RESULT NEXT CMD BERR ’NOT READY’ Figure 32-19. Command Sequence RAREG RDREG Operand Data: None Result Data: The contents of the selected register are returned as a longword value, most-significant word first. MCF52277 Reference Manual, Rev. 1 32-26 Freescale Semiconductor...
Page 767
Read data at the longword address. Address space is defined by BAAR[TT,TM]. Hardware forces low-order address bits to 0s for word and longword accesses to ensure that word addresses are word-aligned and longword addresses are longword-aligned. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-27...
Page 768
Word results return 16 bits of data; longword results return 32. Bytes are returned in the LSB of a word result; the upper byte is undefined. 0x0001 (S = 1) is returned if a bus error occurs. MCF52277 Reference Manual, Rev. 1 32-28 Freescale Semiconductor...
Page 769
Hardware forces low-order address bits to 0s for word and longword accesses to ensure that word addresses are word-aligned and longword addresses are longword-aligned. Command Formats: Byte A[31:16] A[15:0] D[7:0] Word A[31:16] A[15:0] D[15:0] Longword A[31:16] A[15:0] D[31:16] D[15:0] Figure 32-24. Command Format WRITE MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-29...
Page 770
The initial address increments by the operand size (1, 2, or 4) and saves in a temporary register. Subsequent commands use this address, perform the memory read, increment it by the current DUMP operand size, and store the updated address in the temporary register. MCF52277 Reference Manual, Rev. 1 32-30 Freescale Semiconductor...
Page 771
DUMP (LONG) MEMORY ’NOT READY’ LOCATION NEXT CMD NEXT CMD MS RESULT LS RESULT NEXT CMD NEXT CMD ’ILLEGAL’ ’NOT READY’ BERR ’NOT READY’ Figure 32-27. Command Sequence DUMP Operand Data: None MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-31...
Page 772
The size field is examined each time a command is processed, allowing the operand size to be altered FILL dynamically. Command Formats: Byte D[7:0] Word D[15:0] Longword D[31:16] D[15:0] Figure 32-28. Command Format FILL MCF52277 Reference Manual, Rev. 1 32-32 Freescale Semiconductor...
Page 773
BDM command while the processor is halted, the updated value is used when prefetching resumes. If a command issues and the CPU is not halted, the command is ignored. Figure 32-30. Command Format Command Sequence: NEXT CMD ’CMD COMPLETE’ Figure 32-31. Command Sequence MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-33...
Page 774
PC for performance monitoring. The SYNC execution of this command is considerably less obtrusive to the real-time operation of an application than command sequence. HALT READ RESUME Command Formats: MCF52277 Reference Manual, Rev. 1 32-34 Freescale Semiconductor...
Page 775
32-bit address, which the debug module uses to generate a special bus cycle to access the specified control register. The 12-bit Rc field is the same the processor’s MOVEC instruction uses. Command/Result Formats: Command Result D[31:16] D[15:0] Figure 32-36. Command/Result Formats RCREG MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-35...
Page 776
MAC Accumulator 2,3 Extension Bytes (ACCEXT23) 0x809 MAC Accumulator 1 (ACC1) 0x80A MAC Accumulator 2 (ACC2) 0x80B MAC Accumulator 3 (ACC3) 0x80E Status Register (SR) 0x80F Program Register (PC) 0xC05 RAM Base Address Register (RAMBAR) MCF52277 Reference Manual, Rev. 1 32-36 Freescale Semiconductor...
Page 777
The operand (longword) data is written to the specified control register. The write alters all 32 register bits. See the RCREG instruction description for the Rc encoding and for additional notes on writes to the A7 stack pointers and the EMAC programming model. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-37...
Page 778
RDMREG command is CSR (DRc = 0x00). This read of the CSR clears CSR (FOF, TRG, HALT, and BKPT) as well as the trigger status bits (CSR[BSTAT]) if a level-2 breakpoint is triggered or a level-1 breakpoint is triggered and no level-2 breakpoint has been enabled. Command/Result Formats: MCF52277 Reference Manual, Rev. 1 32-38 Freescale Semiconductor...
Page 779
The operand (longword) data is written to the specified debug module register. All 32 bits of the register are altered by the write. DSCLK must be inactive while the debug module register writes from the CPU accesses are performed using the WDEBUG instruction. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-39...
As shown in Table 32-24, when a breakpoint is triggered, an indication (CSR[BSTAT]) is provided on the DDATA output port when it is not displaying captured processor status, operands, or branch addresses. MCF52277 Reference Manual, Rev. 1 32-40 Freescale Semiconductor...
Page 781
The debug interrupt handler can use supervisor instructions to save the necessary context, such as the state of all program-visible registers into a reserved memory area. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-41...
In this definition, the y suffix generally denotes the source, and x denotes the destination operand. For a given instruction, the optional operand data is displayed only for those effective addresses referencing memory. The DD nomenclature refers to the DDATA outputs. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 32-43...
Similar to the exception processing mode, the stopped state (PST = 0xE) and the halted state (PST = 0xFF) display this status throughout the entire time the ColdFire processor is in the given mode. MCF52277 Reference Manual, Rev. 1 32-48...
The JTAG_EN pin selects between the debug module and JTAG. If JTAG_EN is low, the debug module is selected; if it is high, the JTAG is selected. Table 33-2 summarizes the pin function selected depending on JTAG_EN logic state. MCF52277 Reference Manual, Rev. 1 33-2 Freescale Semiconductor...
The TDI pin receives serial test and data, which is sampled on the rising edge of TCLK. Register values are shifted in least significant bit (lsb) first. The TDI pin has an internal pull-up resistor. The DSI pin provides data input for the debug module serial communication port. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 33-3...
TDO pin. See Section 33.4.3, “JTAG Instructions” for a list of possible instruction codes. TAP state: Update-IR Access: User read/write Instruction Code Reset Figure 33-2. 5-Bit Instruction Register (IR) MCF52277 Reference Manual, Rev. 1 33-4 Freescale Semiconductor...
ENABLE_TEST_CTRL instruction is selected. The TEST_CTRL transfers its value to a parallel hold register on the rising edge of TCLK when the TAP state machine is in the update-DR state. The DSE bit selects the drive strength used in JTAG mode. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 33-5...
Asserting the TRST signal asynchronously resets the TAP controller to the test-logic-reset state. As Figure 33-5 shows, holding TMS at logic 1 while clocking TCLK through at least five rising edges also causes the state machine to enter the test-logic-reset state, whatever the initial state. MCF52277 Reference Manual, Rev. 1 33-6 Freescale Semiconductor...
IR contains the 0x2 opcode. The sampled data is accessible by shifting it through the boundary scan register to the TDO output by using the shift-DR state. The data capture and the shift operation are transparent to system operation. MCF52277 Reference Manual, Rev. 1 33-8 Freescale Semiconductor...
Therefore, the first bit shifted out after selecting the bypass register is always logic 0. This differentiates parts that support an IDCODE register from parts that support only the bypass register. MCF52277 Reference Manual, Rev. 1 Freescale Semiconductor 33-9...
However, because there is a pull-up on TRST, some amount of current results. The internal power-on reset input initializes the TAP controller to the test-logic-reset state on power-up without asserting TRST. MCF52277 Reference Manual, Rev. 1 33-10 Freescale Semiconductor...
Need help?
Do you have a question about the MCF52277 and is the answer not in the manual?
Questions and answers