Page 2
How to Reach Us: Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted Home Page: hereunder to design or fabricate any integrated circuits or integrated circuits based on the information www.freescale.com in this document.
Page 27
Audience The MCF5253 Reference Manual is intended to provide a design engineer with the necessary data to successfully integrate the MCF5253 into a wide variety of applications. It is assumed that the reader understands operating systems, microprocessor system design, basic principles of software and hardware, and basic details of the ColdFire architecture.
Page 28
(SIM)”:This chapter describes the operation, memory map, and register definitions of the System Integration Module (SIM) registers, including the interrupt controller and system-protection functions for the MCF5253. The SIM provides overall control of the internal and external buses and serves as the interface between the ColdFire®...
Page 29
Interface”: This chapter describes the universal serial bus (USB) interface of the MCF5253. The content includes the operation, signal descriptions, host data structures, and host operations. Also provided is the device operational model and deviations from the host mode of operation.
Page 30
4. PowerPC Virtual Environment Architecture, Book II, Version 1.00, 5/19/92 (subtitled “Work in Progress”) Register Summary Figure 1 shows the key to the register fields and Table 2 shows the register figure conventions. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 31
Self-clearing bit. Writing a one has some effect on the module, but it always reads as zero. Reset Values Resets to zero. Resets to one. — Undefined at reset. Unaffected by reset. [signal_name] Reset value is determined by polarity of indicated signal. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor xxxi...
MCF5253 features and modules. The MCF5253 is also an excellent general purpose system controller with over 125 Dhrystone 2.1 MIPS @ 140 MHz performance at a very competitive price. The integrated peripherals and eMAC allow the MCF5253 to replace both the microcontroller and the DSP in certain applications.
1.2 V core, 3.3 V I/O • Internal 1.2 V Linear regulator to power the core (configuration is optional) • 225 pin MAPBGA package MCF5253 Block Diagram Figure 1-1 provides the block diagram of the MCF5253 device. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 35
RTC Pins Real-Time Clock FlashMedia Logic Pins USB Analog Memory Stick/SD Interface USB XTAL USB XTAL Pins Oscillator USB 2.0 OTG Controller 16 Kbyte ATA Pins SRAM Controller Figure 1-1. MCF5253 Block Diagram MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
MCF5253 Introduction MCF5253 Feature Details The primary features of the MCF5253 integrated processor include the following: • ColdFire CF2 Processor Core operating at 140 MHz — Clock-doubled Version 2 microprocessor core — 32-bit internal data bus, 16 bit external data bus —...
Page 37
— Supports transfer sizes of 8 to 16 bits in 1-bit increments — Four peripheral chip-select lines for control of up to 15 devices — Supports Baud rates up to 17.5 Mbps at 140 MHz — Programmable delays before and after transfers MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 38
(Flash / ROM) then CS0 is active after reset. — Programmable interrupt controller (low interrupt latency, seven external interrupt requests, programmable autovector generator) — Up to 57 programmable general-purpose outputs — Up to 60 programmable general-purpose inputs MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
1.5.2 DMA Controller The MCF5253 provides four fully programmable DMA channels for quick data transfer. Single and dual address mode is supported with the ability to program bursting and cycle stealing. Data transfer is selectable as 8-, 16-, 32-, or 128-bits. Packing and unpacking is supported.
USB 2.0 High-Speed On-The-Go The USB module in the MCF5253 is used for communication to a PC or communication to slave devices, e.g. to download data from a hard disc player to a flash player, to a photo printer and so on. The USB supports full Host mode functionality.
1.5.14 IEC958 Digital Audio Interfaces The MCF5253 has two digital audio input interfaces, and one digital audio output interface. There are four digital audio input pins and two digital audio output pins. An internal multiplexer selects one of the four inputs to one of the two digital audio inputs.
The audio bus can also be used for audio format conversion. 1.5.16 CD-ROM Encoder/Decoder The MCF5253 is capable of processing CD-ROM sectors in hardware. Processing is compliant with CD-ROM and CD-ROM XA standards. The CD-ROM decoder performs the following functions in hardware: •...
1.5.20 IDE Interface The MCF5253 system bus allows connection of an IDE hard disk drive with a minimum of external hardware. The external hardware consists of bus buffers for address and data and are intended to reduce the load on the bus and prevent SDRAM and Flash accesses from propagating to the IDE bus. The control signals for the buffers are generated in the MCF5253.
CS0 is intended to be used with an external boot ROM / Flash memory. The MCF5253 can boot from its internal boot ROM, here CS0 is used internally, CS0/CS4 pin is then is configured as CS4. CS0 and CS4 cannot be used simultaneously.
1.5.32 Internal Voltage Regulator An internal 1.2 V regulator can be used to supply the CPU and PLL sections of the MCF5253, reducing the number of external components required and allowing operation from a single supply rail, typically 3.3 volts. However, it must be noted that the internal regulator has an efficiency of less than 50%, and it is not intended for use in battery powered applications, where the use of a highly efficient external DC-DC converter would be more appropriate.
Chapter 2 Signal Description Overview This chapter describes the MCF5253 input and output signals. The signal descriptions as shown in Table 2-1 are grouped according to relevant functionality. Table 2-1. MCF5253 Signal Index Input/ Reset Signal Name Mnemonic Function Output...
Page 48
Signal Description Table 2-1. MCF5253 Signal Index (continued) Input/ Reset Signal Name Mnemonic Function Output State Chip Selects[2:0] CS0/CS4 Chip selects bits 2 through 0— negated CS1/QSPICS3/GPIO28 enable peripherals at programmed In/Out addresses. CS0 provides boot ROM selection. Buffer enable 1...
Page 49
Signal Description Table 2-1. MCF5253 Signal Index (continued) Input/ Reset Signal Name Mnemonic Function Output State Serial input EF/RXD2/GPIO6 Error flag serial in In/Out – Serial input CFLG/GPIO5 C-flag serial in In/Out – Subcode clock RCK/QSPIDIN/QSPIDOUT/ Audio interfaces to subcode clock In/Out –...
Page 50
Signal Description Table 2-1. MCF5253 Signal Index (continued) Input/ Reset Signal Name Mnemonic Function Output State CAN interface CAN0_TX CAN 0 transmit – CAN0_RX CAN 0 receive – CAN1_TX CAN 1 transmit – CAN1_RX CAN 1 receive – USB PHY interface...
• At Power-on reset all pins are set to their primary function. MCF5253 Bus Signals The signals discussed in this section provide the external bus interface to the MCF5253. 2.3.1 Address Bus The address bus provides the address of the byte or most significant byte of the word or longword being transferred.The address lines also serve as the DRAM address pins, providing multiplexed row and column...
2.3.4 Data Bus The data bus (D[31:16]) is bi-directional and non-multiplexed. Data is registered by the MCF5253 on the rising clock edge. The data bus uses a default configuration if none of the chip-selects or DRAM bank match the address decode. All 16 bits of the data bus are driven during writes, regardless of port width or operand size.
The active low chip selects can be used to access asynchronous memories. The interface is glueless. ISA Bus The MCF5253 supports an ISA bus. Using the ISA bus protocol, reads and writes for one ISA bus peripheral is possible. IDE_DIOR/GPIO31 and IDE_DIOW/GPIO32 are the read and write strobe. The peripheral can insert wait states by pulling IDE_IORDY/GPIO33.
The third UART lacks flow control using RTS/CTS. Clear To Send Peripherals drive the DDATA2/CTS0/GPIO3 and DDATA0/CTS1/SDATA0_SDIO1/GPIO1 inputs to indicate to the MCF5253 serial module that it can begin data transmission. The third UART lacks flow control using RTS/CTS. 2.10 Timer Module Signals The following signal provides an external interface to Timer0.
I/O or as digital audio (IEC958) output. EBUOUT1 is digital audio out for consumer mode, EBUOUT2 is digital audio out for professional mode. During reset, the pin is configured as a digital audio output. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Signal Description 2.13 Subcode Interface There is a 3-line subcode interface on the MCF5253. This 3-line subcode interface allows the device to format and transmit subcode in EIAJ format to a CD channel encoder device. The three signals are described in Table 2-8.
DMA and ultra DMA transfers. Pin descriptions are given in Table 2-1. 2.18 Two Controller Area Network (CAN) Communication Modules The two FlexCan modules are full implementation of the Bosch CAN protocol specification 2.0B. Pin descriptions are given in Table 2-1. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 2-11...
Signal Description 2.19 USB Controller The MCF5253 is fitted with an on-chip USB controller. 2.19.1 USB PHY Interface Including Oscillator There is an integrated on-chip USB PHY. Pins are described in Table 2-11. Table 2-11. USB PHY Interface Pins USB PHY Signal...
Processor Status The processor status pins, PST0/GPIO50, PST1/GPIO49, PST2/INTMON/GPIO48, and PST3/INTMON/GPIO47, indicate the MCF5253 processor status. During debug mode, the timing is synchronous with the processor clock (PSTCLK) and the status is not related to the current bus transfer. Table 2-13 shows the encodings of these signals.
These encodings are asserted for multiple cycles. 2.24 BDM/JTAG Signals The MCF5253 complies with the IEEE 1149.1A JTAG testing standard. The JTAG test pins are multiplexed with background debug pins. See Chapter 20, “Background Debug Mode (BDM) Interface,” for details.
The MCF5253 includes an on-chip linear regulator. This regulator provides an 1.2 V output which is intended to be used to power the MCF5253 core. Three pins are associated with this function; LININ, LINOUT, and LINGND. Typically, LININ would be fed by the I/O (PAD) supply (3.3 V) with separate filtering recommended to provide some isolation between the I/O and the core.
This chapter provides an overview of the microprocessor core of the MCF5253. The chapter describes the CF2 memory map and register description as it is implemented on the MCF5253. It also includes a full description of exception handling, data formats, an instruction set summary, and a table of instruction timings.
Data Registers (D0–D7) Registers D0–D7 are used as data registers for bit (1 bit), byte (8 bit), word (16 bit) and longword (32 bit) operations and can also be used as index registers. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Also used as an input operand for multiple-precision arithmetic. Negative condition code bit. Set if the msb of the result is set; otherwise cleared. Zero condition code bit. Set if the result equals zero; otherwise cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
CCR register Load MAC Mask Reg MOV.L {Ry,#imm},Rmask Writes a value to the MAC Mask Register Store MAC Mask Reg MOV.L Rmask,Rx Writes the contents of the MAC mask register to a CPU register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
(CCR). The control bits indicate the following states for the processor: trace mode (T-bit), supervisor or user mode (S bit), and master or interrupt state (M). System Byte Condition Code Register (CCR) I [2–0] Figure 3-4. Status Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
T bit. The occurrence of an interrupt exception also forces the M bit to be cleared and the interrupt priority mask to be set to the level of the current interrupt request. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Table 3-6. Format Field Encoding Original A7 @ Time of A7 @ 1st Instruction Format Field Exception, Bits 1:0 of Handler Original A7 - 8 Original A7 - 9 Original A7 - 10 Original A7 - 11 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Because the actual write cycle may be decoupled from the processor’s issuing of the operation, the signaling of an access error appears to be decoupled from the instruction that generated the write. Accordingly, the PC contained in the exception stack frame merely represents the location in the program MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
3.5.3 Illegal Instruction Exception The MCF5253 processors decode the full 16-bit opcode and generate this exception if execution of an unsupported instruction is attempted. Additionally, attempting to execute an illegal line A or line F opcode generates unique exception types: vectors 10 and 11, respectively.
The interrupt exception processing, with interrupt recognition and vector fetching, includes uninitialized and spurious interrupts as well as those where the requesting device supplies the 8-bit interrupt vector. Autovectoring may optionally be supported through the System Integration module (SIM). MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 3-11...
1. The operand execution pipeline (OEP) is loaded with the opword and all required extension words at the beginning of each instruction execution. This implies that the OEP does not wait for the instruction fetch pipeline (IFP) to supply opwords and/or extension words. MCF5253 Reference Manual, Rev. 1 3-12 Freescale Semiconductor...
PLL is locked. • The MCF5253 has a new block added to the output of the PLL / Clock Dividers to provide glitch-free Dynamic Clock Switching. This allows dynamic switching of the clock rate being fed to the CPU core and the system bus. This new block is controlled by a new 32-bit register called the ClockRate Register.
PLL Memory Map and Register Definitions The different settings for the PLL/clock module are summarized in Table 4-2. Table 4-1. PLL Memory Map Address Access Size Bits Name Description Reset MBAR2BAS + PllConfig PLL configuration register 0x02020088 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 83
– 0 PLL normal operation – PLLPWRDWN 1 Disable PLL to power-down mode 8–4 Input frequency (Fin) is divided by (PllDiv) to determine the PLL compare frequency. PLLDIV 3–2 VCXO output divider VCXOOUT MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 84
When frequency is CRIN/2 or CRIN/4, duty cycle is 50%. When frequency is CRIN/3, duty cycle is 33%. 8. Fcpu = FVCXOOUT / CPUDIV; Fcpu is the frequency the processor is running at. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Due to implementation of the block, some limits apply to the PLL block. These limitations are shown in Table 4-5. Table 4-5. PLL Electrical Limits Minimum Maximum Name Reason Frequency MHz Frequency MHz Fvcxo PLL limitations Fcpu Maximum operating frequency of device Fin/PLLDIV PLL limitations MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
The device can be put in a low power Sleep mode, where all internal clocks and all on-chip functions are stopped. In Sleep mode, the only block still functional is the on-chip voltage regulator. All the other analog features are put in to low-power operation and all digital functions are stopped. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
As a result, the user may select a 11.2896 MHz X-TAL as the CRIN and use the settings shown in Table 4-9. Table 4-9. Recommended PLL Settings X-Tal Freq Vcxo Vcxo CRSel Clock MHz 11.2896 11.2896 11.2896 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
EXTERNAL DATA[31:0] LOCAL ADDRESS BUS 12 4 3 LINE BUFFER DATA STORAGE BUFFER LINE ADDRESS FILL HIT DATA ‘127 TAG HIT LOCAL DATA BUS Figure 5-1. Instruction Cache Block Diagram MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
In this case, data accessed from the instruction cache is simply discarded and no external memory references are generated. If the address is not mapped into the SRAM space, the instruction cache handles the request in the normal fashion. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
With the cache enabled as defined by CACR[31], a cacheable instruction fetch that misses in both the tag memory and the line-fill buffer generates a external fetch. The size of the external fetch is determined by MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 92
5-2. For this condition, the fill buffer is loaded and subsequent references can hit in the buffer, but the data is never loaded into the memory array. Table 5-2 shows the relationship between CACR bits 31 and 10 and the type of instruction fetch. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Reset Address Name Width Description Access Value MOVEC with $002 CACR Cache Control Register $0000 MOVEC with $004 ACR0 Access Control Register 0 $0000 MOVEC with $005 ACR1 Access Control Register 1 $0000 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
If a given cache location is invalid, the contents of the line-fill buffer can be written into the memory array while CFRZ is asserted. 0 Normal operation 1 Freeze valid cache lines 26–25 Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 95
Table 5-5. External Fetch Size Based on Miss Address and CLNF Longword Address Bits CLNF[1:0] Line Line Line Longword Line Line Longword Longword Line Line Line Line Line Line Line Line MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
01 Match if supervisor mode 1x Match always. Ignore user/supervisor mode 12–7 Reserved, should be cleared. The Cache Mode bit defines the cache mode: 0 is cacheable, 1 is noncacheable. 0 Caching enabled 1 Caching disabled MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 97
The Write Protect bit defines the write-protection attribute. If the effective memory attributes for a given access select the WP bit, an access error terminates any attempted write with this bit set. 0 Read and write accesses permitted 1 Only read accesses permitted 1–0 Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Accesses from the SRAM module are not cached. Only SRAM1 can be accessed by the DMA controller of the MCF5253. SRAM0 and SRAM1 are made up of two memory arrays each consisting of 2048 lines, with 16 Bytes in each line.
Page 101
The valid bit. A hardware reset clears this bit. When set, this bit enables the SRAM module; otherwise, the module is disabled. 0 Contents of RAMBAR are not valid 1 Contents of RAMBAR are valid MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
ASn bits associated with instruction fetches can decrease power dissipation. Additionally, if the SRAM contains only instructions, masking data accesses can reduce power dissipation. Table 6-2 shows some examples of typical RAMBAR settings. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 103
Static RAM (SRAM) Table 6-2. Typical RAMBAR Setting Examples Data Contained in SRAM RAMBAR[7:0] Code Only Data Only Both Code And Data MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
By running synchronously with the system clock, the SDRAM can (after an initial latency period) be accessed on every clock; 5-1-1-1 is a typical MCF5253 burst rate to SDRAM. NOTE Because the MCF5253 cannot have more than one page open at a time, it does not support interleaving. Table 7-1 lists common SDRAM commands.
DRAM read/write. Asserted for write operations and negated for read operations. SD_CS0 Chip Select for the SDRAM memory block connected to the MCF5253. BCLKE Synchronous DRAM clock enable. Connected directly to the CKE (clock enable) signal of SDRAMs. Enables and disables the clock internal to SDRAM.
Field Description Synchronous operation. Selects synchronous or asynchronous mode. When in synchronous mode, the DRAM controller can be switched to ADRAM mode only by resetting the MCF5253. 0 Asynchronous DRAM. Default at reset. Do not use. 1 Synchronous DRAM Note: bit setting SO = 0 is a legacy mode. Do not use. First action must always be to set this bit.
Each BA bit is compared with the corresponding address of the current bus cycle. If all unmasked bits match, the address hits in the associated DRAM block. 17–16 Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 110
SDRAM address pins. Because the SDRAM does not register this information, it doesn’t matter if the IMRS access is a read or a write. The DRAM controller clears IMRS after the command finishes. 0 Take no action 1 Initiate command MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Write accesses to a write-protected DRAM region are compared in the chip select module for a hit. If no hit occurs, an external bus cycle is generated. If this external bus cycle is not acknowledged, an access exception occurs. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Specifically for the 256Mb devices the tables change due to the fact that we need to have a A24 address line. But with the MCF5253 A24 and A20 are shared on the same pin. This means that when we program the A20/A24 pin to be A24.
Page 113
A22. Bank addresses are then A23 and above. (Bank addresses need equal address during CAS and RAS phase). The remaining 3 D-RAM ras-only address lines are connected to A9, A11 and A12. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
The tables in the previous section can be used to configure the interface in the following example. To interface one 1M × 16-bit × 4 bank SDRAM component (8 columns) to the MCF5253, the connections would be as shown in Table 7-11.
Page 115
The next bus RCD. cycle is initiated sooner, but cannot begin an SDRAM cycle until the precharge-to- delay completes. ACTV MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 7-11...
Continuous page mode is identical to burst page mode, except that it allows the processor core to handle successive bus cycles that hit the same page without having to close the page. When the current bus cycle finishes, the MCF5253 core internal pipelined bus can predict whether the upcoming cycle will hit in the same page.
Page 117
A read requires WRITE data to be returned before the bus cycle can terminate. NOTE In continuous page mode, secondary accesses output the column address only. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 7-13...
DCR[RTIM] is inserted before the next command is generated. In this example, the next bus cycle ACTV is initiated, but does not generate an SDRAM access until T is finished. MCF5253 Reference Manual, Rev. 1 7-14 Freescale Semiconductor...
Although the MCF5253 DRAM controller supports bursting operations, it does not use the bursting features of the SDRAMs. Because the MCF5253 can burst operand sizes of 1, 2, 4, or 16 bytes long, the concept of a fixed burst length in the SDRAMs mode register becomes problematic. Therefore, the MCF5253 DRAM controller generates the burst cycles rather than the SDRAM device.
Figure 7-12. Mode Register Set ( ) Command SDRAM Example This example interfaces a Samsung K4S641633 1M x 16-bit x 4 bank SDRAM component to a MCF5253 operating at 80 MHz (40 MHz bus). Table 7-12 lists design specifications for this example.
Synchronous DRAM Controller Module 7.6.1 SDRAM Interface Configuration To interface this component to the MCF5253 DRAM controller, use the connection table that corresponds to a 16-bit port size with 8 columns (Figure 7-14). Two pins select one of four banks when the part is functional.
Reserved. Don’t care. 13–12 Indicates a delay of data 1 cycle after CAS is asserted. CASL – Reserved. Don’t care. 10–8 Command bit is pin 19 and bank selects are 20 and up. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 7-19...
Bits 22 and 21 are set because they are used as bank selects; bit 20 is set because it controls the 1-MB boundary address. 15–9 – Reserved. Don’t care. Allow reads and writes – Reserved MCF5253 Reference Manual, Rev. 1 7-20 Freescale Semiconductor...
When DACR[IMRS] is set, a bus cycle initializes the mode register. If the mode register setting is read on A[9:0] of the SDRAM on the first bus cycle, the bit settings on the corresponding MCF5253 address pins must be determined while being aware of masking requirements.
– (hex) Figure 7-17. Mode Register Mapping to MCF5253 A[31:0] Although A[31:20] corresponds to the address programmed in DACR0, according to how DACR0 and DMR0 are initialized, bit 19 must be set to hit in the SDRAM. Thus, before the mode register bit is set, DMR0[19] must be set to enable masking.
This chapter describes bus functionality, the bus control signals, and the bus cycles provided for data-transfer operations. Bus operation is defined for transfers initiated by the MCF5253 as a bus master and for transfers initiated by an alternate bus master. This chapter includes descriptions of the error conditions, bus arbitration, and the reset operation.
NOTE For SDRAM access A24 is multiplexed with A20. A0 is not available on the address bus. As a result, the MCF5253 supports only 16-bit port size. 8.2.2 Read/Write Control The read/write (RW) control line will indicate that a bus cycle in progress is read or write. RW timing is same as address timing.
However it is possible to program BUFENB2 via the CS3 registers. 8.2.6 Output Enable The OE pin on the MCF5253 will be pulled low during any read cycle from a device selected by CS0, CS1, CS2, or CS4. Clock and Reset Signals...
Bus Operation 8.3.1 Reset In Asserting RSTI causes the MCF5253 processor to enter reset exception processing. When RSTI is recognized, the data bus is tri-stated, and OE, CS0, and CS1 are negated. See Section 8.7, “Reset Operation.” 8.3.2 System Bus Clock Output The BCLK output signal is generated by the internal PLL, and is the system bus clock output used as the bus timing reference by the external devices.
The bus supports byte, word, and longword operand transfers and uses a 16-bit data port. With the MCF5253, the port size of all memory must be programmed to 16 bits, the internal transfer termination must be enabled, and the number of wait states must be set for the external slave being accessed by programming the Chip-Select Control Registers (CSCRs) and the DRAM Controller Control Registers (DCRs).
This data is concurrent with TA, which is also sampled at the rising edge of the clock. During a write, the MCF5253 drives data from the rising clock edge at the end of the first clock to the rising clock edge at the end of the bus cycle.
Page 135
Name STATE 0 The read cycle is initiated in state 0 (S0). On the rising edge of BCLK, the MCF5253 places a valid address on the address bus and drives RW high, if it is not already high. STATE 1 The appropriate CS and OE are asserted on the falling edge of BCLK.
STATE 5 CS and OE are negated on the falling edge of state 5 (S5). The MCF5253 stops driving the address lines and RW on the rising edge of BCLK, terminating the read cycle. The external device must have its drive from the bus. The external device must stop driving the bus.
Description STATE 0 The write cycle is initiated in state 0 (S0). On the rising edge of BCLK, the MCF5253 places a valid address on the address bus and drives RW low, if it is not already low. STATE 1 The appropriate CS is asserted on the falling edge of BCLK.
When burst read enable or burst write enable is asserted into the relevant chip select register, the MCF5253 will initiate burst cycles any time a transfer size is larger than the port size the MCF5253 is transferring to. A line transfer to a 16-bit port would constitute a burst cycle of eight words of data.
Page 139
Figure 8-8. Line Read Burst (one wait cycle) Figure 8-9. Line Read Burst (no wait cycles) Line Write Bus Cycles MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 8-11...
Page 140
(on the rising edge of S6). Each subsequent pipelined write data burst will be a single cycle. CS remains asserted throughout the burst transfer. MCF5253 Reference Manual, Rev. 1 8-12 Freescale Semiconductor...
Figure 8-13. Line Write Burst-Inhibited Misaligned Operands All MCF5253 data formats can be located in memory on any byte boundary. A byte operand is properly aligned at any address; a word operand is misaligned at an odd address; and a longword is misaligned at an address that is not evenly divisible by four.
Figure 8-15. Misaligned Word Transfer Reset Operation The MCF5253 processor supports one type of reset which resets the entire MCF5253: the external master reset input (RSTI). To perform a master reset, an external device asserts the reset input pin (RSTI). When power is applied to the system, external circuitry should assert RSTI for a minimum of 16 CRIN cycles after Vcc is within tolerance.
If at power-on reset, the MCF5253 is configured to boot from external memory connected to CS0. Then CS0 is configured to address the external boot ROM / Flash. The configuration for CS0 at this time is hard-wired inside the MCF5253.
This chapter describes the operation, memory map and register descriptions of the System Integration Module (SIM) registers, including the interrupt controller and system-protection functions for the MCF5253 processor. The SIM provides overall control of the internal and external buses and serves as the ®...
At system reset, the MBAR valid bits (MBAR[0], MBAR2[0]) are cleared to prevent incorrect reference to resources before the MBAR or MBAR2 are written. The remainder of the MBAR and MBAR2 bits are MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 148
0 Alternate master access allowed 1 Alternate master access masked Mask CPU Space and Interrupt Acknowledge Cycle. 0 IACK cycle mapped to MBAR space 1 IACK cycle not responded to by MBAR peripherals MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 149
The Base Address field defines the base address for a 1024 Mbyte address range. If V-bit in MBAR2 is set, address range Base Address to BaseAddress + $3FFF FFFF are mapped to MBAR2 space, and cannot be used for MBAR, SDRAM or Chip Select. 29–8 Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Figure 9-3. DeviceID Register (DeviceID) Interrupt Interface Registers For legacy reasons, there are two interrupt controllers on the MCF5253. This section provides the programming of the two interrupt controller registers and their register descriptions. The primary interrupt controller is centralized, and services the following: •...
ICR11 Reserved – – Primary interrupts are programmed to a level and priority. All primary interrupts have a unique Interrupt Control Register (ICR). There are 28 possible priority levels, for the primary interrupts. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 152
Higher Table 9-8 shows all possible primary source priority schemes for the MCF5253. The interrupt source in this table can be any internal interrupt source programmed to the given level and priority. For example, assume that two internal interrupt sources were programmed to IL[2:0] =110, one having a priority of IP[1:0] = 01 and one having a priority of IP[1:0] = 10.
Page 153
Internal Module Internal Module Internal Module NOTE Multiple internal modules should not be assigned to the same interrupt level and same interrupt priority when configuring the ICR registers. This can cause erratic chip behavior. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
An interrupt can be masked by setting the corresponding bit in the IMR and enable an interrupt by clearing the corresponding bit in the IMR. 7–0 Reserved. 9.4.1.2 Interrupt Pending Register The IPR makes visible the interrupt sources that have an interrupt pending. MCF5253 Reference Manual, Rev. 1 9-10 Freescale Semiconductor...
– – – – – Figure 9-8. Spurvec Register 9.4.2.4 Secondary Interrupt Sources The 64 secondary interrupts used by the MCF5253 modules are provided in Table 9-14. Table 9-14. Secondary Interrupt Sources Interrupt Interrupt Name Module Description A to D convertor...
Page 158
U channel transmit register is empty UCHANTXUNDER AUDIO U channel transmit register underrun UCHANTXNEXTFIRST AUDIO U channel transmit register next byte will be first IEC958-1 U/Q BUFFER ATTENTION AUDIO IEC 958 -1 U/Q channel buffer full interrupt MCF5253 Reference Manual, Rev. 1 9-14 Freescale Semiconductor...
Page 159
Interrupt set on falling edge of shift_busy_2 intClear SHIFTBUSY2RISE Interrupt set on rising edge of shift_busy_2 intClear INTLEVEL2FALL Interrupt set on falling edge of int_level_2 intClear INTLEVEL2RISE Interrupt set on rising edge of int_level_2 intClear MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 9-15...
9.4.3 Software Interrupts The MCF5253 supports four software interrupts. These interrupts are activated by writing a 1 to an ExtraInt register bit. When active, the interrupts can generate a normal interrupt exception to the ColdFire processor. The interrupt exception is only generated if the corresponding level register interrupt mask is higher than the current processor interrupt mask.
SYPCR is set and the software watchdog timer times out, a hardware reset occurs. 9.5.2 Software Watchdog Timer The Software Watchdog Timer (SWT) prevents system lockup if the software become trapped in loops with no controlled exit. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 9-17...
Page 162
SWT IACK CYCLE 2 SWTAVAL IS SET TO ‘1’ IF SWT TA SIGNAL is ASSERTED. Figure 9-10. MCF5253 Unterminated Access Recovery When the SWT times out and SWRI register bit is programmed for a software reset, an internal reset will be asserted, and the SWTR register bit will be set in the RSR.
ICR0. 1 SWT causes soft reset to be asserted for all modules of the part. Software Watchdog Prescalar 0 SWT clock not prescaled. 1 SWT clock prescaled by a value of 8192. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 9-19...
SWT-generated interrupt. The following register illustrates the SWIVR programming model. The SWIVR is an 8-bit supervisor write-only register. This register is set to the uninitialized vector $0F at system reset. MCF5253 Reference Manual, Rev. 1 9-20 Freescale Semiconductor...
The MPARK register determines the default bus master arbitration applied between internal transfers. This arbitration is needed because there are two bus masters inside the MCF5253. One is the CPU, the other is the DMA unit. Both can access internal registers within the MCF5253 peripherals.
0 DMA BCRs function as 16-bit counters. 1 DMA BCRs function as 24-bit counters. General Purpose I/O The MCF5253 has up to 57 programmable general-purpose outputs and up to 60 programmable general-purpose inputs. Two groups of 32-bit registers control these GPIOs. Table 9-26. General Purpose I/O...
GPIO-INT-EN is set, an interrupt will be made pending on the secondary interrupt controller. NOTE The registers GPIO-INT-STAT, GPIO-INT-CLEAR and GPIO-INT-EN also control some audio interrupts. Set the GPIO_FUNCTION register bit to 1 or 0 for interrupts, as applicable. MCF5253 Reference Manual, Rev. 1 9-26 Freescale Semiconductor...
Figure 9-15. The primary output function of the pin is the SCLK3 function it can be configured as a general-purpose output (GPIO35) by setting its controlling bit (35) in the GPIO1-FUNCTION register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 9-27...
IDE_DIOW/GPIO32 Multiplexed Pin Configuration The MCF5253 has a number of pins which are multiplexed with both a primary function, a secondary function, and a GPIO function (triple functionality). Two pins have 3 major functions (a primary and two secondary functions). Two pins also have their multiplexed functions selected at power-on reset via external pull-up / pull-down resistors.
10.2 Chip Select Signals The MCF5253 provides three programmable chip selects that can directly interface with SRAM, EPROM, EEPROM, and peripherals. Chip select CS2 provides separate read and write strobes for an AT-bus peripheral interface, and uses IORDY signalling to insert wait states.
Buffer Enable – BUFENB1 and BUFENB2 Signals The BUFENB1/GPIO29 and BUFENB2/GPIO30 signals are intended to enable bus buffers which will provide isolation / buffering between the MCF5253 high speed memory bus and additional external memory mapped devices. BUFENB1 is always active on CS0.
Port Sizing The MCF5253 only supports a 16-bit wide port size (PS). The size of the port controlled by a chip-select is programmable. The port size is specified by the (PS) bits in the chip select control register (CSCR). It should always be programmed as a 16-bit wide port.
The various chip select registers in the module are described in this section. 10.4.2.1 Chip Select Address Register The Chip Select Address registers (CSARx) determine the base address of the corresponding chip select pin. These read/write registers are 32-bit in length. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 10-5...
Each CSMR is a 32-bit read/write control register that physically resides in the chip select module. With the exception of bit 0 (V-bit), which is initialized to 0 on reset, all other bits in CSMRx are uninitialized by reset. MCF5253 Reference Manual, Rev. 1 10-6 Freescale Semiconductor...
Page 183
CSAR that has this bit set results in the appropriate chip select not being selected. No exception occurs. 0 Both read and write accesses are allowed. 1 Only read access is allowed. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 10-7...
Its operation differs from the other external chip select outputs following a system reset. Address MBAR + 0x8A (CSCR0) Access: User read/write WS3 WS2 WS1 WS0 BSTR BSTW Reset – – – – – – Figure 10-3. Chip Select Control Register (CSCR0) MCF5253 Reference Manual, Rev. 1 10-8 Freescale Semiconductor...
Page 185
0 Break data larger than the specified port size into individual non-burst writes that equals the specified port size. For example, a longword write to an 16-bit port would be broken into two individual word writes. 1 Enables burst write of data larger than the specified port size. 2–0 Reserved. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 10-9...
Chapter 11 General Purpose Timer Modules This chapter describes the configuration and operation of the two general purpose timer modules (Timer0 and Timer1) in the MCF5253. The memory map, register descriptions, and example initialization code are also provided. 11.1 Timer Module Overview The MCF5253 incorporates two independent, general-purpose 16-bit timers.
Users can configure the timer to count until it reaches a reference value at which time it either starts a new time count immediately or continues to run. The free run/restart (FRR) bit of the TMR selects either mode. MCF5253 Reference Manual, Rev. 1 11-2...
1; the value 11111111 divides the clock by 256. Prescalar value = $[PS7 – PS0] + 1 7–6 These bits have no function and should be set to 00. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 11-3...
TCN should be incremented again. Thus, the reference register is matched after (TRR+1) time intervals. Address MBAR+$144 Access: Supervisor or User read/write MBAR+$184 REFERENCE COMPARE VALUE (REF15–REF0) Reset Figure 11-3. Timer Reference Register (TRRn) MCF5253 Reference Manual, Rev. 1 11-4 Freescale Semiconductor...
If a one is read from the Output Reference Event bit, the counter has reached the TRR value. The ORI bit in the TMR enables the interrupt request caused by this event. Writing a one to this bit will clear the event condition. Not applicable MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 11-5...
Timer Initialization Example Code There are two timers on the MCF5253. With a 70 MHz clock, the maximum period is 3.83 seconds and a resolution of 14.3 ns. The timers can be free running or count to a value and reset. The following examples set up the timers: Timer0 will count to $AFAF, toggle its output, and reset back to $0000.
The ADC block diagram and external circuit example is shown in the below figure. Figure 12-1. ADC Block Diagram and External Components 12.2 External Signal Description The ADC has six muxed inputs with the following pin names. 1. ADIN0/GPI52 2. ADIN1/GPI53 3. ADIN2/GPI54 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 12-1...
K is a constant. If K is small, the ripple on the comparator input will be quite large, and there will be some mis-measurement because the average value on both comparator pins is not equal. If K is small, MCF5253 Reference Manual, Rev. 1 12-4...
Page 197
When reading the same channel, it is not necessary to ignore every other measurement. We therefore recommend to use R = 33kΩ, C = 10nF with ADCLK = BUSCLK/256. This should produce good results for typical system clock frequencies between 30 MHz and 70 MHz. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 12-5...
Page 198
Analog to Digital Converter (ADC) MCF5253 Reference Manual, Rev. 1 12-6 Freescale Semiconductor...
13.1 IDE and SmartMedia Overview The MCF5253 memory bus allows connection of an IDE hard disk drive or SmartMedia flash card with a minimum of external hardware. Figure 13-1 shows the bus set-up for the MCF5253 device.
Page 200
Figure 13-1. Bus Setup with IDE and SmartMedia Interface In this example there is only one buffer between the MCF5253 memory bus and the IDE / SmartMedia interface. The SDRAM (if used) is connected directly to the memory bus along with the Flash memory (if used).
IDE_DIOR, IDE_DIOW—active-low IDE bus read and write strobe can also be used to implement a SmartMedia interface. • IDE_IORDY—active-high “ready” indication from IDE device to MCF5253. NOTE Either of the buffer enables can be programmed to be active on CS1 or CS2 The extra bus signals, and their configuration are detailed in the following section.
Page 202
11 3 clock post drive 0 BUFENB1 inactive on CS1 cycles bufen1cs1en 1 BUFENB1 active on CS1 cycles 0 BUFENB1 inactive on IDE_DIOR, IDE_DIOW cycles bufen1cs2en 1 BUFENB1 active on IDE_DIOR, IDE_DIOW cycles MCF5253 Reference Manual, Rev. 1 13-4 Freescale Semiconductor...
IDE_DIOR and IDE_DIOW are created by gating CS2 with RW. IDE_DIOR is programmable to go active on write cycles. It therefore can be used as an extra Chip Select (CS2), if required. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-5...
Cycle Termination on CS2 (IDE_DIOR, IDE_DIOW) Dedicated logic has been added to the MCF5253 to allow IDE compliant cycles on the bus. The logic can generate the transfer acknowledge (TA) signal for CS2 access. The manner in which the TA signal is generated is programmable using the IDE config 2 register, and is compatible with IDE/SmartMedia requirements.
The SmartMedia block must be connected to the bus as follows: • RE input connect to MCF5253 IDE_DIOR output • WE input connect to MCF5253 IDE_DIOW output • D0–7 connect to MCF5253 data bus wires 31–24 • CE connect to always low • ALE connect to general purpose output •...
A SmartMedia interface and an IDE interface cannot be implemented simultaneously in the same hardware application as they both share the same read and write strobe signals on the MCF5253. To set up the SmartMedia interface perform the following tasks.
3. Program IDECONFIG2 register. Program this register as follows: — TA enable 2 = ‘1’. — IDE_IORDY enable 2 = ‘1’ if IDE_IORDY is connected from the IDE drive to the MCF5253 chip. — IDE_IORDY enable 2 = ‘0’ if IDE_IORDY wait handshake is not used.
= time difference between path from IORDY and from read data Read data in device must be valid 3 clocks after IORDY going high. CS2POST CS2POST > t9 To meet this timing, typical value for cs2post is 10 MCF5253 Reference Manual, Rev. 1 13-10 Freescale Semiconductor...
Flash Media Interface The MCF5253 is capable of interfacing with Sony Memory Stick and Multi-Media Card (MMC) / Secure Digital (SD) flash cards. The interface can handle one of them at any given time, but not both at the same time.
Page 212
CRC_IS_0 After a read transmission is completed, this signal indicates if the packet CRC was 0 or not. • BITCOUNTER. This counter indicates the number of bits still to be exchange with the Flash Media card. MCF5253 Reference Manual, Rev. 1 13-14 Freescale Semiconductor...
0 Do not drive data line DRIVEDATA 1 Start driving data line after command transmission end 0 Do not drive command line DRIVECMD 1 Start driving command line after receiving card status response MCF5253 Reference Manual, Rev. 1 13-16 Freescale Semiconductor...
Figure 13-14. Flash Media Data Registers 1 & 2 (FLASHMEDIACMD) (Secure Digital Mode) Table 13-13. Flash Media Data Registers 1 & 2 Field Descriptions Field Description 31–0 Read receive data from this register. RCVBUFFERREG 31–0 Data written to this register will be transmitted. TXBUFFERREG MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-17...
FLASHMEDIAINTSTAT allows the viewing of pending interrupts. Register FLASHMEDIAINTEN allows the enabling of interrupts (‘1’ = enabled, ‘0’ = disabled). Some interrupts can be cleared by writing a ‘1’ to the corresponding bit of the FLASHMEDIAINTCLEAR register. MCF5253 Reference Manual, Rev. 1 13-18 Freescale Semiconductor...
Page 217
Interrupt set on rising edge of shift_busy_2 IntClear SHIFTBUSY2RISE Interrupt set on falling edge of shift_busy_2 IntClear SHIFTBUSY2FALL Interrupt set on rising edge of int_level_1 IntClear INTLEVEL1RISE Interrupt set on falling edge of int_level_1 IntClear INTLEVEL1FALL MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-19...
If there is a buffer full or a buffer empty on one interface, the system will freeze the outgoing SCLK signal, which causes the second interface to go into a wait-state as well. MCF5253 Reference Manual, Rev. 1 13-20 Freescale Semiconductor...
In the timing diagram, the assumption is made that the processor reads the full receive buffer register before the next 32 bits are received. If this is not the case, the Flash Media interface will stop the outgoing sclk clock, which prevents data overrun. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-21...
All interactions to the Secure Digital (SD) card can be broken down into a number of cascaded elementary operations. There are three elementary operations in SD mode: • Send command to card MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-23...
CRC must be inserted by software. A number of bits/bytes/longwords corresponding with RESPBITCOUNT must be read from FLASHMEDIADATA2 during the response phase. All words, except the first word, contain 32 bits of MCF5253 Reference Manual, Rev. 1 13-24 Freescale Semiconductor...
Figure 13-25. Writing to Card Without Busy The write sequence sends out a packet on the DATA line, receives a CRC STATUS response from the card, and then looks for a potential busy. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 13-25...
Page 224
This is done in hardware. The CRC can be checked via bit 0 in register FLASHMEDIASTATUS after packet read. All words, except the first word read from FLASHMEDIADATA1 contain 32 bits of data. The first word contains the remainder. Data in the first word is right-justified. MCF5253 Reference Manual, Rev. 1 13-26 Freescale Semiconductor...
Chapter 14 DMA Controller The direct memory access controller (DMAC) of the MCF5253 quickly and efficiently moves blocks of data with minimal processor overhead. The DMA module, shown in Figure 14-1, provides four channels that allow byte, word, or longword data transfers. These transfers are dual address to on-chip devices; such as the ATA, UART, SDRAM controller, and audio module.
DMAROUTE register. Each DMA channel is programmable individually. The internal signals are asserted by a peripheral device to request an operand transfer between that peripheral and memory. MCF5253 Reference Manual, Rev. 1 14-2 Freescale Semiconductor...
3. Channel termination step—This occurs after operation is complete. The channel indicates the status of the operation in the channel status register. MEMORY MEMORY- MAPPED PERIPHERAL MEMORY MEMORY- MAPPED PERIPHERAL Figure 14-2. Dual Address Transfer MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-3...
DMA0: audio source 2 audio 14.4.2 Source Address Register The source address register (SAR) is a 32-bit register containing the address from which the DMA controller module requests data during a transfer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-5...
DMA Controller NOTE The MCF5253 on-chip DMAs must be careful when transferring data to cacheable memory since the on-chip DMAs do not maintain cache coherency with the MCF5253 instruction cache. 14.4.4 Byte Count Register The byte count register (BCR) is a 24-bit register containing the number of bytes remaining to be transferred for a given block.
BCR24BIT in the MPARK register in the SIM module, the DMA control register looks slightly different. Specifically, the AT bit (DCR[15]) is included when BCR24BIT = 1, providing greater flexibility in DMA transfer acknowledge. MCF5253 Reference Manual, Rev. 1 14-8 Freescale Semiconductor...
Page 237
If the DSIZE bits indicate a larger transfer size than SSIZE, then the destination accesses are auto-aligned. Source alignment takes precedence over destination alignment. If auto- alignment is enabled, the appropriate address register increments, regardless of the state of DINC or SINC. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-9...
Page 238
The destination increment bit determines whether the destination address increments after each successful transfer. DINC 0 No change to the DAR after a successful transfer. 1 The DAR increments by 1, 2, 4, or 16; depending upon the size of the transfer. MCF5253 Reference Manual, Rev. 1 14-10 Freescale Semiconductor...
If the SINC bit (DCR[22]) is set, then the SAR increments by the appropriate number of bytes upon a successful read cycle. When the appropriate number of read cycles completes successfully, the DMA initiates the write portion of the transfer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-13...
Before starting a block transfer operation, the channel registers must be initialized with information describing the channel configuration, request-generation method, and data block. This initialization is accomplished by programming the appropriate information into the channel registers. MCF5253 Reference Manual, Rev. 1 14-14 Freescale Semiconductor...
If any fields in the DCR are modified while the channel is active, that change is effective immediately. To avoid any problems with changing the setup for the DMA channel, a 1 should be written to the DONE bit in the DSR to stop the DMA channel. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-15...
BWC, the DMA bus request negates until termination of the bus cycle. Should a request be pending, the arbiter may then choose to switch the bus to another master. If auto-alignment is enabled (DCR[AA] = 1), MCF5253 Reference Manual, Rev. 1 14-16...
DSR to determine if the transfer terminated successfully or with an error. The DONE bit of the DSR is then written with a 1 to clear the interrupt, along with clearing the DONE and error bits. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 14-17...
INTERRUPT CONTROL LOGIC Figure 15-1. UART Block Diagram 15.1 UART Module Features The MCF5253 contains three independent UART modules. Features of each UART module include the following: • UART clocked by the system clock • Full duplex asynchronous receiver/transmitter channel •...
15.1.3 Interrupt Control Logic An internal interrupt request signal (IRQ) notifies the MCF5253 interrupt controller of an interrupt condition. The output is the logical NOR of all (as many as four) unmasked interrupt status bits in the UART Interrupt Status Register (UISR). The UART Interrupt Mask Register (UIMR) can be programmed to determine which interrupts will be valid in the UISR.
UART Modules The UART module interrupt level in the MCF5253 interrupt controller is programmed external to the UART module. The UART can be configured to supply the vector from the UART Interrupt Vector Register (UIVR) or the SIM can be programmed to provide an autovector when a UART interrupt is acknowledged.
UART2 has no CTS signal capability. 15.3 Operation The following sections describe the operation of the baud-rate generator, transmitter and receiver, and other operating modes of the UART module. MCF5253 Reference Manual, Rev. 1 15-4 Freescale Semiconductor...
15.3.1 Baud-Rate Generator/Timer The timer references made here relative to clocking the UART are different than the MCF5253 timer module that is integrated on the bus of the ColdFire core. The UART has a baud generator based on an internal baud-rate timer that is dedicated to the UART. The Clock Select Register (UCSR) needs to be programmed to enable the baud-rate timer.
UART transmitter buffer (UTB). If the transmitter receives a disable command, it continues operating until the character (if one is present) in the transmit-shift register is completely shifted out of transmitter MCF5253 Reference Manual, Rev. 1 15-6 Freescale Semiconductor...
Page 253
Users must manually enable the transmitter by setting the enable-transmitter bit in the UART Command Register (UCR). 1. CTS and RTS are not available on UART2. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-7...
(framing error) and RxD remains low for one-half of the bit period after the stop bit is sampled, the receiver operates as if a new start bit is detected. The parity error (PE), MCF5253 Reference Manual, Rev. 1 15-8...
If an error occurs within the message, the error is not recognized until the final check is performed, and no indication exists as to which message character is at fault. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-9...
A received break is echoed as received until the next valid start bit is detected. 1. CTS and RTS are not available on UART2. MCF5253 Reference Manual, Rev. 1 15-10 Freescale Semiconductor...
The character is interpreted as an address character if the A/D bit is set or as a data character if the A/D bit is cleared. The polarity of the A/D bit is selected by MCF5253 Reference Manual, Rev. 1 15-12...
SIM Interrupt Control Register (ICR). If the UIVR is not initialized and the ICR is not programmed for autovector, a spurious interrupt exception is taken if interrupts are generated. This works in conjunction with the MCF5253 interrupt controller, which allows a programmable Interrupt Priority Level (IPL) for the interrupt.
UMR1. The pointer is set to UMR1 by RESET or by a set pointer command using the control register. After reading or writing UMR1, the pointer points to UMR2. MCF5253 Reference Manual, Rev. 1 15-14 Freescale Semiconductor...
Page 261
The Parity Mode bits encode the type of parity used for the channel (see Table 15-3). The parity bit is added to the transmitted character and the receiver performs a parity check on incoming data. These bits can alternatively select multidrop mode for the channel. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-15...
The RB, FE, and PE bits are cleared by the Reset Error Status command in the UCR registers if the RB bit has not been read. Also, RB, FE, PE and OE can also be cleared by reading the Receive buffer (URB). MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-17...
Page 264
This bit is also set when the transmitter is first enabled. Characters loaded into the transmitter holding register while the transmitter is disabled are not transmitted. 0 The CPU has loaded the transmitter-holding register or the transmitter is disabled. MCF5253 Reference Manual, Rev. 1 15-18 Freescale Semiconductor...
RxRDY bits in the USR are cleared, and the receiver FIFO pointer is reinitialized. All other registers are unaltered. Use this command instead of the receiver-disable command whenever the receiver configuration is changed (it places the receiver in a known state). MCF5253 Reference Manual, Rev. 1 15-20 Freescale Semiconductor...
Do Not Use 15.4.5.2.1 No Action Taken The “no action taken” command causes the transmitter to stay in its current mode. If the transmitter is enabled, it remains enabled; if disabled, it remains disabled. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-21...
If the receiver is already disabled, this command has no effect. 15.4.5.3.4 Do Not Use Do not use this bit combination because the result is indeterminate. MCF5253 Reference Manual, Rev. 1 15-22 Freescale Semiconductor...
UART Status Register (USR) TxRDY bit is clear and when the transmitter is disabled have no effect on the transmitter buffer. Address MBAR + $1CC (UTB0) Access: User write only MBAR + $20C (UTB1) MBAR2 + $C0C (UTB2) Reset Figure 15-14. Transmitter Buffer (UTBn) Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-23...
1 The current state of the CTS input is logic one. 0 The current state of the CTS input is logic zero. Note: Not available on UART2 15.4.9 Auxiliary Control Registers (UACRn) The UART auxiliary control registers control the input enable. MCF5253 Reference Manual, Rev. 1 15-24 Freescale Semiconductor...
The UIVR is reset to $0F, which indicates an uninitialized interrupt condition. 15.4.15 Input Port Registers (UIPn) The UIP registers show the current state of the CTS input. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-27...
0 This bit is not affected by writing a zero to this address. The output port bits are inverted at the pins so the RTS set bit provides an asserted RTS pin. Note: Not available on UART2. MCF5253 Reference Manual, Rev. 1 15-28 Freescale Semiconductor...
(beginning of a break). SIRQ then clears the interrupt source, waits for the next change-in-break interrupt (end of break), clears the interrupt source again, then returns from exception processing to the system monitor. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-29...
2. If required, program operation of Transmitter Ready-to-Send (TxRTS Bit). 3. If required, program operation of Clear-to-Send (TxCTS Bit). 4. Select stop-bit length (SBx Bits). Command Register (UCR) Enable the receiver and transmitter. MCF5253 Reference Manual, Rev. 1 15-30 Freescale Semiconductor...
Page 277
UART Modules SERIAL MODULE INITIATE: CHANNEL INTERRUPTS CHK1 CALL CHCHK SAVE CHANNEL STATUS ENABLE ERRORS ENABLE RECEIVER ASSERT REQUEST TO SEND SINTR RETURN Figure 15-23. UART Software Flowchart (1 of 5) MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-31...
Page 278
TxCHK WAITED SET TRANSMITTER- TRANSMITTER TOO LONG NEVER-READY FLAG READY SEND CHARACTER TO TRANXMITTER WAITED CHARACTER SET RECEIVER- TOO LONG BEEN NEVER-READY FLAG RECEIVED Figure 15-24. UART Software Flowchart (2 of 5) MCF5253 Reference Manual, Rev. 1 15-32 Freescale Semiconductor...
Page 279
ERROR FLAG RETURN PRCHK HAVE PARITY ERROR SET PARITY ERROR FLAG CHRCHK GET CHARACTER FROM RECEIVER SAME AS TRANSMITTED CHARACTER SET INCORRECT CHARACTER FLAG Figure 15-25. UART Software Flowchart (3 of 5) MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-33...
Page 280
IRQ ARRIVED YET RETURN CLEAR CHANGE-IN-BREAK STATUS BIT REMOVE BREAK CHARACTER FROM RECEIVE FIFO REPLACE RETURN ADDRESS ON SYSTEM STACK AND MONITOR WARM START ADDRESS Figure 15-26. UART Software Flowchart (4 of 5) MCF5253 Reference Manual, Rev. 1 15-34 Freescale Semiconductor...
Page 281
UART Modules OUTCH TRANSMITTER READY SEND CHARACTER TO TRANSMITTER RETURN Figure 15-27. UART Software Flowchart (5 of 5) MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 15-35...
Chapter 16 Queued Serial Peripheral Interface (QSPI) Module This chapter describes the operation of the Queued Serial Peripheral interface module of the MCF5253 and provides its memory map and register descriptions. 16.1 Features The QSPI module provides a serial peripheral interface with queued transfer capability. It allows users to queue up to 16 transfers at once, eliminating CPU intervention between transfers.
The QSPI uses a dedicated 80-byte block of static RAM accessible both to the module and the CPU to perform queued operations. The RAM is divided into three segments as follows: • 16 command control bytes (command RAM) MCF5253 Reference Manual, Rev. 1 16-2 Freescale Semiconductor...
The QSPI contains an 80-byte block of static RAM that can be accessed by both the user and the QSPI. This RAM does not appear in the MCF5253 memory map because it can only be accessed by the user indirectly through the QSPI address register (QAR) and the QSPI data register (QDR).
Before any data transfers begin, control data must be written to the command RAM, and any out-bound data must be written to transmit RAM. Also, the queue pointers must be initialized to the first and last entries in the command queue. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 16-5...
A delay can also be inserted between consecutive transfers to allow serial A/D converters to complete conversion. There are two transfer delay options: the user can MCF5253 Reference Manual, Rev. 1 16-6 Freescale Semiconductor...
Wraparound mode is enabled by setting QWR[WREN]. The queue can wrap to pointer address 0x0, or to the address specified by QWR[NEWQP], depending on the state of QWR[WRTO]. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 16-7...
1 After executing command pointed to by QWR[ENDQP], wrap back to entry zero, or the entry pointed to by QWR[NEWQP] and continue execution. Wraparound location. Determines where the QSPI wraps to in wraparound mode. WRTO 0 Wrap to RAM entry zero. 1 Wrap to RAM entry pointed to by QWR[NEWQP]. MCF5253 Reference Manual, Rev. 1 16-10 Freescale Semiconductor...
Reserved, should be cleared. QSPI finished interrupt enable. Interrupt enable for SPIF. Setting this bit enables the interrupt, and clearing it disables SPIFE the interrupt. 7–4 Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 16-11...
QSPI Data Register (QDR) The QDR, shown in Figure 16-9, is used to access QSPI RAM indirectly. The CPU reads and writes all data from and to the QSPI RAM through this register. MCF5253 Reference Manual, Rev. 1 16-12 Freescale Semiconductor...
The delay between transfers is determined by QDLYR[DTL]. Chip select to QSPI_CLK delay enable. DSCK 0 Chip select valid to QSPI_CLK transition is one-half QSPI_CLK period. 1 QDLYR[QCD] specifies the delay from QSPI_CS valid to QSPI_CLK. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 16-13...
The QSPI RAM is set up for a queue of 16 transfers. All four QSPI_CS signals are used in this example. 1. Set QSPI pin functionality by the programming the PIN_CONFIG register as appropriate. MCF5253 Reference Manual, Rev. 1 16-14...
Page 297
12. Write QAR with 0x0010 to select the first receive RAM entry. 13. Read QDR to get the received data for each transfer. 14. Repeat steps 5 through 13 to do another transfer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 16-15...
The audio interface module provides the necessary input and output features to receive and transmit digital audio signals over serial audio interfaces (IIS/EIAJ) and over digital audio interfaces (IEC958). The MCF5253 is equipped with three serial audio interfaces compliant with Philips I S and Sony EIAJ format.
Besides the mechanism to let the processor access the audio data, there are several interrupts and control registers to allow the processor to determine when it should read or write data to the appropriate Processor Data Interface Register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-3...
UCHANTXUNDER U Channel transmit register underrun reg. IntClear UCHANTX NEXTFIRST U Channel transmit register next byte will be first write to Tx reg U1CHANRCVFULL U1Channel receive register full read Rcv reg MCF5253 Reference Manual, Rev. 1 17-6 Freescale Semiconductor...
SELECT FREQUENCY INVERT Reset 0 Figure 17-2. IIS1 Configuration Registers (0x10) Figure 17-3 illustrates the valid bits in the IIS2 Configuration Registers and Table 17-5 provides the description of the bit fields. MCF5253 Reference Manual, Rev. 1 17-8 Freescale Semiconductor...
Page 307
0 Not active 1 Active CFLG CFLG sample position. See note 16 0 Sample CFLG input 1 SCLK clock after incoming LRCK edge 1 Sample CFLG input 6 SCLK clocks before incoming LRCK edge MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-9...
Page 308
010 48 bit clocks / word clock 000 32 bit clocks / word clock Other settings: reserved, undefined LRCK INVERT See note 5 following bit these descriptions. 1 Invert on word clock 0 No invert on word clock MCF5253 Reference Manual, Rev. 1 17-10 Freescale Semiconductor...
IIS/EIAJ Transmitter Descriptions The two I S/EIAJ transmitters operate independently. Each of the transmitters has the capability of transmitting data from one of several sources: • One of the three processor data out registers. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-11...
SCLK/LRCK. Data is always clocked on the rising edge of the SCLK bit clock (non-inverted). SCLK (inverted clock) SCLK (noninverted) Left (if noninverted) LRCK(IIS) LRCK(Sony-16 bit) Left (if noninverted) Data out D19 D18 D17 Data In Figure 17-5. IIS/EIAJ Timing Diagram (16 SCLK edges per word) MCF5253 Reference Manual, Rev. 1 17-12 Freescale Semiconductor...
For a description of the control (or “C”) channel in EBU data formatting, refer to the IEC958-3 specification’s description of control channel. Figure 17-9 illustrates the valid bits in the EBURcvCChannel. MCF5253 Reference Manual, Rev. 1 17-16 Freescale Semiconductor...
EBU signal. If the receiver finds such an illegal sequence, the illegal symbol interrupt is set. No corrective action is undertaken. When the interrupt occurs, this means: a) The EBU signal is has been affected by noise MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-17...
U Channel Receive and Q Channel Receive Register Descriptions Figure 17-10 illustrates the valid bits in the U Channel Receive and Q Channel Receive Registers and Table 17-8 provides the description of the bit fields. MCF5253 Reference Manual, Rev. 1 17-18 Freescale Semiconductor...
Page 317
Table 17-9. CDTEXTCONTROL Register Field Descriptions Field Description Notes 0 No action on free-running sync position counter 2, 3 PRESETEN 1 Preset free-running sync position counter 14–8 Sync presetting count 1, 3 PRESETCOUNT MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-19...
This section details the behavior of the user channel receive interface on incoming CD user channel subcode in the IEC958 receiver. This mode is selected if UsyncMode (bit 1) in register CD-Subcode control, is set. MCF5253 Reference Manual, Rev. 1 17-20 Freescale Semiconductor...
Page 319
QChannelRcvFull occurs, it is coincident with UChannelRcvFull. There is only one QChannelRcvFull for every 8 UChannelRcvFull. The convention is that the most significant data is transmitted first, and is left-aligned in the registers. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-21...
‘0’. In addition to data, the interface allows for transmission of the C- and U-channels and control over the Valid flag. Note: For the U-channel, only the CD User Data format is supported. MCF5253 Reference Manual, Rev. 1 17-22...
CD standard specification. The generation of the data needs to be done in software and loaded into hardware registers. The Audio peripheral has provisions to insert this CD subcode stream into the outgoing MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
EBU1 Reset Figure 17-13. CD-Subcode Register 17.6.3 CD Subcode Interrupts The following interrupts are associated with the CD Subcode data: • UChannelTxEmpty—Register is empty, needs re-loaded. • UChannelTxUnderrun—Under run error on register. MCF5253 Reference Manual, Rev. 1 17-24 Freescale Semiconductor...
Page 323
; load UChannelTransmit with data from pointer update pointer reset interrupt end if ; MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-25...
RCK clock is kept silent. At a certain point in time, the CDR60 will start clocking the RCK, and then it will require that the first symbol transmitted from the MCF5253 to the CDR60 is a sync symbol. If this is not the case, the CDR60 fails to synchronize.
Multiple address to read this register allows MOVEM instruction to read FIFO. 0x5C 0x60 0x64 PDIR3-R Processor data in Right – 0x68 Multiple address to read this register allows MOVEM instruction to read FIFO. 0x6C 0x70 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-27...
Data written to it will end in one of the FIFO ‘s. (fig 17-1) 12,14, 17a, 17b or 25. • PDIR1-L, PDIR1-R (Processor data in). Used to transfer data to the processor. These 32-bit registers, each occupy 4 consecutive longword addresses are used to read data from the audio bus. MCF5253 Reference Manual, Rev. 1 17-28 Freescale Semiconductor...
Table 17-15. DataInControl Register Field Descriptions Field Description Reset 31–24 Reserved. 0 Normal operation PDIR3 ZERO 1 Always read zero from PDIR3 CONTROL 0 Normal operation PDIR3 RESET 1 Reset PDIR3 to one sample remaining MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-29...
Page 328
01 Full interrupt if at least 2 samples in FIFO INTERRUPT 10 Full interrupt if at least 3 samples in FIFO SELECT 11 Full interrupt if at least 6 samples in FIFO MCF5253 Reference Manual, Rev. 1 17-30 Freescale Semiconductor...
Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-31...
Automatic Resynchronization of FIFOs An automatic FIFO resynchronization feature is available on the MCF5253. It can be enabled or disabled separately for every FIFO. If enabled, the hardware will check if the left and right FIFOs are in sync, and if not, it will set the filling pointer of the right FIFO to be equal to the filling pointer of the left FIFO.
0 Auto synchronization off 1 Auto synchronization on IIS1 FIFO AUTO SYNC 0 Auto synchronization off 1 Auto synchronization on PDIR2 FIFO AUTO SYNC 0 Auto synchronization off 1 Auto synchronization on MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-33...
IIS1 Tx FIFO. Even if the FIFO is in reset state, the interrupt will continue running. 17.7.7.2 PDIR1, PDIR2, and PDIR3, Interrupts With FIFO’s feeding data to the PDIR registers, three interrupts are associated. 1. Full 2. Under/over 3. Resync MCF5253 Reference Manual, Rev. 1 17-34 Freescale Semiconductor...
Page 334
IIS 2 transmit FIFO empty write to FIFO ebuTxEmpty IEC958 transmit FIFO empty write to FIFO PDIR2 full Processor data input full read from PDIR2 PDIR1 full Processor data input full read from PDIR1 MCF5253 Reference Manual, Rev. 1 17-36 Freescale Semiconductor...
While this is a situation that should be taken seriously, it will rarely occur, if at all. However, should this happen, the system will continue to repeat the last sample until the FIFO buffer has new data. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-37...
See note 3. ENABLE 1 Descramble enabled. 0 Escramble disabled 9, 10 DECODE See note 4. MODE 00 No CRC check 01 Mode 1 10 Mode 2, form 1 11 Mode 2, form 2 MCF5253 Reference Manual, Rev. 1 17-38 Freescale Semiconductor...
Page 337
Notation used is 32-bit words. Bits31-16 are part of the LEFT sample, bits 15-0 are part of the RIGHT sample. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-39...
2352 bytes (the nominal block length). • crcError interrupt—Set when the next longword to be read is the first word of a new block, and CRC check on the previous block failed. MCF5253 Reference Manual, Rev. 1 17-40 Freescale Semiconductor...
PDIR2 and PDOR3 registers support DMA transfer, as the others need more than 1 long-word to transfer data to/from the FIFO and cannot be used with DMA operation. Operation is as follows: • If PDIR2 is full and DMAConfig(1) is set to ‘0’, DMA1REQ is activated. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-41...
CRIN (either external generated clock or crystal) to the recovered SPDIF audio clock - if so desired. Some external hardware is required for this including a set of varicap diodes. MCF5253 Reference Manual, Rev. 1 17-42...
Page 341
For measurement of the EBU input: FreqMeas = (EBU Freq) / Faudio × (2 ** 15) × Gain • Table 17-24. PhaseConfig and Frequency Measure Register Addresses Address Name Width Description Access MBAR2 + 0xA3 PhaseConfig Phase Configuration (gain and source select) MBAR2 + 0xA8 FreqMeas Frequency measurement MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-43...
The XTRIM output allows use of varicap-controlled crystal. (See Figure 17-26). To do this, the XTRIM must output a PWM/PDM modulated phase-error signal. One 16-bit config register is associated with this functionality. MCF5253 Reference Manual, Rev. 1 17-44 Freescale Semiconductor...
17-27. It is a first-order pulse density modulator, working from the system clock divided by 16. XTRIM Output 16-bit adder PdmOut[15:0] Memory-mapped Register sysclock/16 Figure 17-27. PDM Modulator Used on XTRIM Output MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 17-45...
Chapter 18 C Modules This chapter provides the system configuration and protocol of the Inter IC Communications (I modules of the MCF5253, the memory map and register descriptions, and a programming example. 18.1 C Interface Features • Compatibility with I C Bus standard •...
CONTROL COMPARE Figure 18-1. I C Module Block Diagram 18.2 C Overview The MCF5253 provides dual I C interface capability. The I C interface described in this chapter is fully compatible with the I C Bus Standard. The I C is a two-wire, bidirectional serial bus that provides a simple and efficient method of data exchange between devices.
A standard communication is composed of four parts: 1. START signal 2. Slave address transmission 3. Data transfer 4. STOP signal They are described briefly in the following sections and shown in Figure 18-2. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 18-3...
18-2). 18.4.3 Data Transfer Once successful slave addressing is achieved, the data transfer can proceed on a byte-by-byte basis in the direction specified by the R/W bit sent by the calling master. MCF5253 Reference Manual, Rev. 1 18-4 Freescale Semiconductor...
Once a device clock has gone low, it holds the SCL line low until the clock high state is reached. However, the change of low to high in the MCF5253 clock may not change the state of the SCL line if MCF5253 Reference Manual, Rev.
Table 18-1 shows the register summary of the I C interface. Table 18-1. I C Interfaces Register Summary Address C Module Registers MBAR+$280 C Address Register (MADR) MBAR+$284 C Frequency Divider Register (MFDR) MCF5253 Reference Manual, Rev. 1 18-6 Freescale Semiconductor...
C Status Register (MBSR2) MBAR2 + $450 MBAR2 I C Data I/O Register (MBDR2) NOTE External masters cannot access the MCF5253 on-chip memories or MBAR, but can access any I C module register. 18.5.1 C Address Registers (MADR) This register contains the address that the I C will respond to when addressed as a slave.
Page 352
Table 18-4 The MFDR frequency value can be changed at any point in a program. Table 18-4. I C Prescaler Values MBC5-0 (hex) Divider (dec) MBC5-0 (hex) Divider (dec) MCF5253 Reference Manual, Rev. 1 18-8 Freescale Semiconductor...
Page 353
C interrupts. It also contains the bits that govern operation as Master or Slave. Address MBAR+ $288 (MBCR) Access: Supervisor or User read/write MBAR2+ $448 (MBCR2) IIEN MSTA TXAK RSTA Reset Figure 18-6. MBCR Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 18-9...
This status register is read-only with the exception of bit 1 (IIF) and bit 4 (IAL), which can be cleared by software. All bits are cleared on reset except bit 7 (ICF) and bit 0 (RXAK), which are set (=1) at reset. MCF5253 Reference Manual, Rev. 1 18-10...
Page 355
C is a slave and has an address match. Checking this bit, the CPU can select slave transmit/receive mode according to the command of the master. 1 Slave transmit, master reading from slave 0 Slave receive, master writing to slave MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 18-11...
3. Set the IEN bit of the I C Control Register (MBCR) to enable the I C bus interface system. 4. Modify the MBCR to select master/slave mode, transmit/receive mode, and interrupt-enable or not. MCF5253 Reference Manual, Rev. 1 18-12 Freescale Semiconductor...
Generation of START After completion of the initialization procedure, users can transmit serial data by selecting the “master transmitter'’ mode. If the MCF5253 is connected to a multimaster bus system, users must test the state of the I C Busy Bit (IBB) to check whether the serial bus is free.
MOVE.B TXCNT,D0 ;Get value from the transmitting counter BEQ.S ;If no more data, branch to end MOVE.B DATABUF,-(A7) ;Transmit next byte of data MOVE.B (A7)+,MBDR MOVE.B TXCNT,D0 ;Decrease the TXCNT SUBQ.L #1,D0 MCF5253 Reference Manual, Rev. 1 18-14 Freescale Semiconductor...
Setting RXAK means an “end-of-data’' signal from the master receiver, after which it must be switched from transmitter mode to receiver mode by software. A read from MBDR then releases the SCL line so that the master can generate a STOP signal. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 18-15...
4. Sets the IAL to indicate the failed attempt to engage the bus When considering these cases, the slave service routine should test the IAL first and the software should clear the IAL bit if it is set. MCF5253 Reference Manual, Rev. 1 18-16 Freescale Semiconductor...
Page 361
Rx Mode Read Data Dummy Read Generate Dummy Read Dummy Read From MBDR From MBDR Stop Signal From MBDR From MBDR And Store Figure 18-9. Flow-Chart of Typical I C Interrupt Routine MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 18-17...
19.1 Overview The boot ROM on the MCF5253 serves to boot the CPU in designs which do not have external Flash memory or ROM. Typically these systems use a separate MCU for control, and/or the MCF5253 is used as a stand-alone decoder.
• Hard Disk Drive (IDE) In slave mode, the MCF5253 will wait for communication from a controlling MCU and store the code it receives in RAM. It executes this code after receiving an execute command. The controlling MCU must control the data transfer and handle error recovery if required.
The command is coded in the upper nibble; the size is coded in the lower nibble. The size specification defines the word length to be used to store the data in the MCF5253 memory space. This allows writing to registers through the boot loader.
– Data/Code section The load address provides the start location where the boot record will be stored within the MCF5253’s memory map, the execution address provides the entry point code execution will begin from after the boot record has been loaded into memory. The CRC allows the boot record to be validated before attempting to begin code execution.
Multiple ‘Store Immediate’ headers can be used if several separate blocks of data need to be loaded before code execution can begin. Example utilities are available from Freescale to generate appropriate boot record files if required, contact your local Freescale representative for further details. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 19-7...
Chapter 20 Background Debug Mode (BDM) Interface This chapter details the MCF5253 hardware debug support. The topics discussed are real-time trace support, background debug mode (BDM), and real-time debug support. The memory map, register descriptions and debug support operation are provided.
These outputs indicate the current status of the processor pipeline and are not related to the current bus transfer. The PST value is updated each processor cycle. MCF5253 Reference Manual, Rev. 1 20-2 Freescale Semiconductor...
(4 bits): one nibble allows the processor to transmit information concerning the execution status of the core (processor status: PST), while the other nibble allows operand data to be MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
$4, when executed. This instruction can define logic analyzer triggers for debug and/or performance analysis. Additionally, a WDDATA instruction is supported that allows the processor core to write any operand (byte, word, longword) directly to the DDATA port, independent of any debug module MCF5253 Reference Manual, Rev. 1 20-4 Freescale Semiconductor...
The PST can continue with the next instruction before the address has completely displayed on the DDATA because of the DDATA FIFO. If the FIFO is full and the MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
ColdFire implements the BDM controller in a dedicated hardware module. Although some BDM operations do require the CPU to be halted (For example, CPU register accesses), other BDM commands such as memory accesses can be executed while the processor is running. MCF5253 Reference Manual, Rev. 1 20-6 Freescale Semiconductor...
ColdFire processor into emulation mode using the EMU bit in the configuration/status register (CSR). Once the system initialization is complete, the processor response to a BDM GO command is dependent on the set of BDM commands performed while breakpointed. Specifically, if the processor’s PC register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-7...
CPUCLK as well as the DSI. The DSO output is delayed from the DSCLK-enabled CPUCLK rising edge. All events in the debug module’s serial state machine are based on the rising edge of the microprocessor clock. MCF5253 Reference Manual, Rev. 1 20-8 Freescale Semiconductor...
The Control Bit (Bit 16) is reserved. Command and data transfers initiated by the development system should C-Control clear bit 16. 15–0 The data field contains the message data to be communicated from the development system to the debug Data Field module. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-9...
Read the debug module register. Parallel $2D {$4† 20.3.4.1. MODULE REGISTER DRc[4:0]} 11/20-24 WRITE DEBUG WDMREG Write the operand data to the debug module Parallel $2C {$4† 20.3.4.1. MODULE REGISTER register. Drc[4:0]} 12/20-24 MCF5253 Reference Manual, Rev. 1 20-10 Freescale Semiconductor...
Page 381
BDM command set, the optional set of extension words is defined as “Address,” “Data,” or “Operand Data.” Table 20-7. BDM Size Field Encoding Encoding Operand Size Bit Values Byte 8 bits Word 16 bits Longword 32 bits Reserved MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-11...
In the third cycle, the development system supplies the low-order 16 bits of a memory address. The debug module always returns the “not ready” response in this cycle. At the completion of the third cycle, the MCF5253 Reference Manual, Rev. 1 20-12...
CPU core is not halted. Figure 20-8. Command/Result Formats Command Sequence: Next CMD RAREG/RDREG LS Result MS Result Next CMD “Not Ready” BERR Figure 20-9. Read A/D Register Command Sequence Operand Data: None MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-13...
Attribute Register (BAAR). The hardware forces the low-order bits of the address to zeros for word and longword accesses to ensure that operands are always accessed on natural boundaries: words on 0-modulo-2 addresses, longwords on 0-modulo-4 addresses. MCF5253 Reference Manual, Rev. 1 20-14 Freescale Semiconductor...
Attribute Register (BAAR). The hardware forces the low-order bits of the address to zeros for word and longword accesses to ensure that operands are always accessed on natural boundaries: words on 0-modulo-2 addresses, longwords on 0-modulo-4 addresses. MCF5253 Reference Manual, Rev. 1 20-16 Freescale Semiconductor...
READ is executed to set up the starting address of the block and to retrieve the first result. The DUMP command retrieves subsequent operands. The initial address is incremented by the operand size (1, 2, or MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 388
The size field is examined each time a DUMP command is processed, allowing the operand size to be dynamically altered. Figure 20-15. DUMP Command/Result Format MCF5253 Reference Manual, Rev. 1 20-18 Freescale Semiconductor...
FILL, NOP or by a WRITE command. Otherwise, an illegal command response is returned. The NOP command can be used for intercommand padding without corrupting the address pointer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-19...
Page 390
BERR Write Data Fill (B/W) Memory “Not Ready” Location “Not Ready” Next Cmd Next Cmd “Illegal” “Not Ready” “Cmd Complete” Next Cmd “Not Ready” BERR Figure 20-17. Fill Memory Block Command Sequence MCF5253 Reference Manual, Rev. 1 20-20 Freescale Semiconductor...
NOP performs no operation and may be used as a null command where required. Command Formats: Table 20-13. NOP Command Command Sequence: NEXT CMD SYNC_PC “CMD COMPLETE” Figure 20-19. No Operation Command Sequence MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-21...
Result Data: Successful write operations return a $FFFF. Bus errors on the write cycle are indicated by the assertion of bit 16 in the status message and by a data pattern of $0001. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-23...
The DSCLK signal must be inactive while debug module register writes from the CPU accesses are performed using the WDEBUG instruction. Figure 20-25. WDMREG BDM Command Register MCF5253 Reference Manual, Rev. 1 20-24 Freescale Semiconductor...
The presence of rounding logic in the output data path of the eMAC requires special care for BDM-initiated reads and writes of its programming model. In particular, any result rounding modes must MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-25...
The debug module provides a number of hardware resources to support various hardware breakpoint functions. Specifically, three types of breakpoints are supported: PC with mask, operand address range, and data with mask. These three basic breakpoints can be configured into one- or two-level triggers with MCF5253 Reference Manual, Rev. 1 20-26 Freescale Semiconductor...
Once the debug interrupt is recognized, the processor aborts execution and initiates exception processing. At the initiation of the exception processing, the core enters emulator mode. After the standard 8-byte MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-27...
SRAM module is disabled while in this mode. The return-from-exception (RTE) instruction exits emulation mode. The processor status output port provides a unique encoding for emulator mode entry ($D) and exit ($7). MCF5253 Reference Manual, Rev. 1 20-28 Freescale Semiconductor...
(setting IPW = 1). The BDM commands must not be issued if the ColdFire processor is accessing the debug module registers using the WDEBUG instruction. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-29...
This field contains the 32-bit address which marks the lower bound of the address breakpoint range. Additionally, if a breakpoint on a specific address is required, the value is programmed into the ABLR. MCF5253 Reference Manual, Rev. 1 20-30 Freescale Semiconductor...
The Transfer Modifier Mask field corresponds to the TM field. Setting a bit in this field causes the corresponding bit in TM to be ignored in address comparisons. The Read/Write field is compared with the R/W signal of the processor’s local bus. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-31...
TDR. The PBR is accessible in supervisor mode as debug control register $8 using the WDEBUG instruction and through the BDM port using the RDMREG and WDMREG MCF5253 Reference Manual, Rev. 1 20-32 Freescale Semiconductor...
The DBMR is accessible in supervisor mode as debug control register $F using the WDEBUG instruction and through the BDM port using the WDMREG command. The DBR is overwritten by the BDM hardware when accessing memory as described in Section 20.4.1.2, “Debug Module Hardware.” MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-33...
Page 404
The data breakpoint register supports both aligned and misaligned references. The relationship between the processor address, the access size, and the corresponding location within the 32-bit data bus is shown Table 20-20. MCF5253 Reference Manual, Rev. 1 20-34 Freescale Semiconductor...
The CSR is accessible in supervisor mode as debug control register $0 using the WDEBUG instruction and through the BDM port using the RDMREG and WDMREG commands. MCF5253 Reference Manual, Rev. 1 20-36 Freescale Semiconductor...
Page 407
There is no support for any type of “nesting” of debug interrupts. If set, the PSTCLK Disable bit disables the generation of the PSTCLK output signal, and forces this signal to remain quiescent. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-37...
Page 408
In this mode, the trigger reporting can be considered to be precise. As previously detailed, the occurrence of an address and/or data breakpoint should always happen before the next instruction begins execution. Therefore the occurrence of the address/data breakpoints should be guaranteed. MCF5253 Reference Manual, Rev. 1 20-38 Freescale Semiconductor...
The debug module supports concurrent operation of both the processor and most BDM commands. BDM commands may be executed while the processor is running, except for the operations that access processor/memory registers as follows: MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 20-39...
• Sample the MCF5253 system pins during operation and transparently shift out the result • Set the MCF5253 output drive pins to fixed logic values while reducing the shift register path to a single cell • Protect the MCF5253 system output and input pins from backdriving and random toggling (such...
TRST Figure 21-1. JTAG Test Logic Block Diagram 21.3 JTAG Signal Descriptions The JTAG operation on the MCF5253 is enabled when TEST[2:0]= 000, in which case the external pin descriptions in Table 21-1 apply.Otherwise, the JTAG Test Access Port signals (TCK/TMS/TDI/TDO/TRST) are interpreted as the debug port pins.
21.3.1 Test Clock (TCK) TCK is the dedicated JTAG test logic clock that is independent of the MCF5253 processor clock. Various JTAG operations occur on the rising or falling edge of TCK. The internal JTAG controller logic is designed such that holding TCK high or low for an indefinite period of time will not cause the JTAG test logic to lose state information.
21-2. For more detail on each state, refer to the IEEE 1149.1A Standard JTAG document. NOTE From any state that the TAP controller is in, Test-Logic-Reset can be entered if TMS is held high for at least five rising edges of TCK. MCF5253 Reference Manual, Rev. 1 21-4 Freescale Semiconductor...
Page 415
E1IR PAUSE - DR PAUSE - IR PaDR PaIR EXIT2 - DR EXIT2 - IR E2DR E2IR UPDATE - IR UPDATE - DR UpIR UpDR Figure 21-2. JTAG TAP Controller State Machine MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 21-5...
IDCODE The IDCODE instruction selects the 32-bit IDcode register for connection as a shift path between the TDI pin and the TDO pin. This instruction lets users interrogate the MCF5253 to determine its version number MCF5253 Reference Manual, Rev. 1...
The SAMPLE/PRELOAD instruction provides two separate functions. First, it obtains a sample of the system data and control signals present at the MCF5253 input pins and just prior to the boundary scan cell at the output pins. This sampling occurs on the rising edge of TCK in the capture-DR state when an instruction encoding of 2 is resident in the instruction register.
TDI pin to the bypass register to the TDO pin. This instruction enhances test efficiency by reducing the overall shift path when a device other than the MCF5253 processor becomes the device under test on a board design with multiple chips on the overall IEEE1149.1A defined boundary-scan chain. The bypass register has been implemented in accordance with IEEE1149.1A so that the shift register stage is set to...
21.7 Disabling IEEE 1149.1A Standard Operation There are two ways to use the MCF5253 without the IEEE 1149.1A test logic being active: 1. Non-use of the JTAG test logic by either non-termination (disconnection) or intentional fixing of TAP logic values.
Figure 21-4. Disabling JTAG in JTAG Mode A second method of using the MCF5253 without the IEEE 1149.1A logic being active is to select Debug mode by setting TEST[2:0]= 001. The IEEE 1149.1A test controller is now placed in the test-logic-reset state by the internal assertion of the TRST signal to the controller and the TAP pins function as debug mode pins.
22.1 Introduction This chapter includes registers that are used to configure the various modules that are new to the MCF5253 family. It also includes a shared 16 kB local memory for the ATA and USB modules. 22.2 Memory Map and Register Definitions Table 22-1 provides the memory map and register definitions for the ATA DMA integration module.
Page 422
1 ATA to RAM ATA DMA transfer active. ADTA 1 ATA DMA armed. Will transfer data when needed as long as atadma_count > 0. 0 ATA DMA blocked. WIll not transfer data. MCF5253 Reference Manual, Rev. 1 22-2 Freescale Semiconductor...
ATA DMA word count. Indicates amount of words to transfer on the ATA DMA bus. COUNT 22.2.4 RTC Time Register (RTC_TIME) Chapter 26, “Real-Time Clock” for a detailed description of this register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 22-3...
A block diagram of how the devices are tied to this local bus is given in Figure 22-5. 16 kB RAM Arbiter USB Controller ATA DMA Controller ATA Controller Figure 22-5. ATA/USB Shared RAM Block Diagram MCF5253 Reference Manual, Rev. 1 22-4 Freescale Semiconductor...
During the transfer, this address is autoincremented. The address is offset-0, so the value that needs to be programmed here is the result of the following equation: [(ColdFire cache RAM address) - (MBAR2 + 0x20000)]. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 22-5...
Page 426
ATA. 10. The DMA will end the transfer when the ATA_DCOUNT reaches zero. On DMA complete, a DMA interrupt is requested. MCF5253 Reference Manual, Rev. 1 22-6 Freescale Semiconductor...
ATA interface. The ATA interface of the MCF5253 is an AT attachment host interface. Its main use is to interface with hard disc drives and optical disc drives. It interfaces with the ATA device over a number of ATA signals.
ATA bus cycle by the ATA protocol engine. The IP bus cycle is stalled until completion of the ATA bus cycle on read, or until putting the write data on the ATA bus on write. MCF5253 Reference Manual, Rev. 1 23-2...
ATA bus pulls its DMARQ line high. During an ATA bus DMA transfer, data is transferred between the ATA bus and the FIFO. The transfer will pause to avoid FIFO overflow and FIFO underflow. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-3...
This signal is the ATA reset signal. When low, the ATA bus is in reset state. When high, no reset. The ATA bus is in reset whenever the appropriate bit in the control register is cleared. After system reset, the ATA bus is in reset. MCF5253 Reference Manual, Rev. 1 23-4 Freescale Semiconductor...
Page 431
This is the ATA data bus. 23.4.2 Electrical Spec on the ATA Bus, Bus Buffers To meet electrical spec on the ATA bus, several requirements must be met. For a detailed description, refer to the ATA specification. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-5...
Max difference in buffer propagation delay for any of following signals: transceiver ATA_IORDY, ATA_Dx (read) tbuf Max buffer propagation delay transceiver tcable1 Cable propagation delay for ATA_Dx cable tcable2 Cable propagation delay for control signals: cable ATA_DIOR, ATA_DIOW, ATA_IORDY, ATA_DMACK MCF5253 Reference Manual, Rev. 1 23-6 Freescale Semiconductor...
– t0(min) = (time_1 + time_2 + time_9) * T time_1, time_2r, time_9 Figure 23-2. In PIO write mode, timing waveforms are somewhat different. A timing diagram is given in Figure 23-3. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-7...
Avoid bus contention when switching buffer off by making toff long – enough Figure 23-3. 23.4.3.3 Timing in Multiword DMA Mode In multi-word DMA mode, see Figure 23-4 for read timing diagram and Figure 23-5 for write timing diagram. MCF5253 Reference Manual, Rev. 1 23-8 Freescale Semiconductor...
UDMA in are provided. Figure 23-6 shows timing for UDMA in transfer start. Figure 23-6. UDMA in Transfer Start Timing Diagram Figure 23-7 shows timing for host terminating UDMA in transfer. MCF5253 Reference Manual, Rev. 1 23-10 Freescale Semiconductor...
Page 437
Figure 23-7. UDMA in Host Terminates Transfer Figure 23-8 shows timing for device terminating UDMA in transfer. Figure 23-8. UDMA in Device Terminates Transfer Timing parameters for UDMA in burst are listed in Table 23-6. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-11...
UDMA Out Timing Diagrams UDMA mode timing is more complicated than PIO mode or MDMA mode. In this section, timing diagrams for UDMA out are provided. Figure 23-9 shows timing for UDMA out transfer start. MCF5253 Reference Manual, Rev. 1 23-12 Freescale Semiconductor...
Page 439
Figure 23-9. UDMA Out Transfer Start Timing Diagram Figure 23-10 shows timing for host terminating UDMA out transfer. Figure 23-10. UDMA Out Host Terminates Transfer Figure 23-11 shows timing for device terminating UDMA out transfer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-13...
– toff toff = time_off * T - tskew1 23.5 Memory Map and Register Definitions Section 23.5.2, “Register Descriptions” on page 23-18 provides the detailed descriptions for all of the ATA registers. MCF5253 Reference Manual, Rev. 1 23-14 Freescale Semiconductor...
(they remain same.) The few 16-bit and 32-bit registers represent strings of 2 or 4 bytes. The byte order in the 16-bit or 32-bit register is dependent on endianess selection. MCF5253 Reference Manual, Rev. 1 23-18...
Access: User read/write TIME_OFF[7:0] Reset Figure 23-12. TIME_OFF Register 23.5.2.2.2 TIME_ON Register Figure 23-13 for illustration of valid bits in the TIME_ON Register and Table 23-8 for description of the bit fields. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-19...
Access: User read/write TIME_4[7:0] Reset Figure 23-19. TIME_4 Register 23.5.2.2.9 TIME_9 Register Figure 23-20 for illustration of valid bits in the TIME_9 Register and Table 23-8 for description of the bit fields. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-21...
Access: User read/write TIME_ENV[7:0] Reset Figure 23-26. TIME_ENV Register 23.5.2.2.16 TIME_RPX Register Figure 23-27 for illustration of valid bits in the TIME_RPX Register and Table 23-8 for description of the bit fields. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-23...
Access: User read/write TIME_CVH[7:0] Reset Figure 23-33. TIME_CVH Register 23.5.2.2.23 TIME_SS Register Figure 23-34 for illustration of valid bits in the TIME_SS Register and Table 23-8 for description of the bit fields. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-25...
Figure 23-36. FIFO_Data Register In 16-bit Mode 23.5.2.3.2 FIFO_Data Register in 32-Bit Mode Figure 23-37 for illustration of valid bits in the FIFO_Data Register in 32-bit Mode and Table 23-8 description of the bit fields. MCF5253 Reference Manual, Rev. 1 23-26 Freescale Semiconductor...
FIFO_FILL is a read-only register. Any read to it returns the current number of halfwords present in the FIFO. 23.5.2.4 ATA_CONTROL Register Figure 23-39 for illustration of valid bits in the ATA Control Register and Table 23-10 for description of the bit fields. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-27...
1 IORDY handshake will be used 23.5.2.5 Interrupt Registers A group of three registers control the interrupt interface from the ATA module and going to the CPU and DMA. There are two interrupts controlled by these registers: MCF5253 Reference Manual, Rev. 1 23-28 Freescale Semiconductor...
Page 455
ATA bus. It is cleared when there is activity on the ATA bus. When the bit is set in the interrupt pending register, and the same bit is set in the interrupt enable register, ipbus_int will be active, signalling interrupt to the cpu. The interrupt clear register has no influence on this bit. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-29...
ATA bus. It is cleared when there is activity on the ATA bus. When the bit is set in the interrupt pending register, and the same bit is set in the interrupt enable register, ipbus_int will be active, signalling interrupt to the cpu. The interrupt clear register has no influence on this bit. MCF5253 Reference Manual, Rev. 1 23-30 Freescale Semiconductor...
ATA bus are swapped. No swaps occur in little endian mode, nor for any other register. 23.6 Functional Description The ATA interface provides two ways to communicate with the ATA peripherals connected to the ATA bus. MCF5253 Reference Manual, Rev. 1 23-32 Freescale Semiconductor...
To access the drive in PIO mode, simply read or write to the correct drive register. The bus cycle will be translated to an ATA cycle, and the drive is accessed. When drive registers are accessed while the ATA bus is in reset, the read or write is discarded, not done. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 23-33...
The host can also wait unit the drive asserts ATA_INTRQ. This also indicates end of transfer. 9. On end of transfer, the host or host DMA should wait until controller_idle is set, and next read the remaining halfwords from the FIFO, and transfer these to memory. MCF5253 Reference Manual, Rev. 1 23-34 Freescale Semiconductor...
DMA transfer on the ATA bus. The nature of these commands is beyond the scope of this document. You should consult the ATA specification to know how to communicate with the drive. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 462
These reads will cause the running DMA to pause; after the read is completed, the DMA resumes. The host can also wait unit the drive asserts ATA_INTRQ. This also indicates end of transfer. On end of transfer, no extra FIFO manipulations are needed. MCF5253 Reference Manual, Rev. 1 23-36 Freescale Semiconductor...
Chapter 24 Universal Serial Bus Interface This chapter describes the universal serial bus (USB) interface of the MCF5253. The content includes the operation, signal descriptions, host data structures, and host operations. Also provided is the device operational model and deviations from the host mode of operation.
Host mode supports direct connect of FS/LS devices 24.2 Block Diagram The MCF5253 implements a USB OTG module. This module may be connected to one of two external ports. Collectively the module and external ports are called the USB interface. The USB interface is shown Figure 24-1.
Note that the USB Controller does not support Low speed operation in device mode as per USB 2.0 specification. 24.5.2 PHY Clocks The built-in PHY has its own on-chip oscillator and PLL to generate the USB serial clocks. The oscillator needs an external 24 MHz crystal. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-3...
The ID register provides a simple way to determine if the module is provided in the system. The ID register identifies the module and its revision. Figure 24-2 shows the ID register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-5...
Page 468
Table 24-3. ID Register Field Descriptions Field Description 31–24 Reserved. 23–16 Revision number of the module. REVISION 15–14 Reserved. 13–8 Ones complement version of ID[5:0]. 7–6 Reserved. 5–0 Configuration number. This number is set to 0x05. MCF5253 Reference Manual, Rev. 1 24-6 Freescale Semiconductor...
Always 1 indicating the module is host capable. 24.6.1.4 Device Hardware Parameters (HWDEVICE) Register—Non-EHCI This register is not defined in the EHCI specification. The HWDEVICE register provides the device hardware parameters for this implementation. MCF5253 Reference Manual, Rev. 1 24-8 Freescale Semiconductor...
Receive address. The number of address bits for the entire RX buffer. Always 0x5 (5). RXADD 7–0 Receive burst. Indicates the number of data beats in a burst for receive DMA data transfers. Always 0x4 (4). RXBURST MCF5253 Reference Manual, Rev. 1 24-10 Freescale Semiconductor...
Table 24-10 provides bit descriptions for the HCIVERSION register. Table 24-10. Host Controller Interface Version (HCIVERSION) Register Field Descriptions Field Name Description 15–0 – EHCI revision number. Value is 0x0100 indicating version 1.0. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-11...
The value of this field determines how many port registers are addressable in the operational register. Always 0x1. 24.6.2.4 Host Controller Capability Parameters (HCCPARAMS) This register identifies multiple mode control (time-base bit functionality) addressing capability. Figure 24-11 shows the HCCPARAMS register. MCF5253 Reference Manual, Rev. 1 24-12 Freescale Semiconductor...
Page 475
4K page boundary. This requirement ensures that the frame list is always physically contiguous. This field is always 1. 64-bit Addressing Capability. This field is always 0; 64-bit addressing is not supported. 0 Data structures use 32-bit address memory pointers MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-13...
USB Command Register (USBCMD) The module executes the command indicated in this register. Address MBAR2 0x740 Access: User read/write Reset FS2 ATDTW SUTW ASPE Reset Figure 24-14. USB Command Register (USBCMD) Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-15...
Page 478
The software should not write a one to this bit when the asynchronous schedule is inactive. Doing so will yield undefined results. This bit is used only in host mode. Writing a one to this bit when the USB OTG module is in device mode is selected will have undefined results. MCF5253 Reference Manual, Rev. 1 24-16 Freescale Semiconductor...
Page 479
The software should use this bit to prevent an attach event before the controller has been properly initialized. Writing a 0 to this will cause a detach event. 1 Run. 0 Stop. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-17...
Run/Stop bit being set to 0, either by the software or by the Host Controller hardware (for example, internal error). Used only in host mode. 1 Halted. 0 Running. 11–9 Reserved. MCF5253 Reference Manual, Rev. 1 24-18 Freescale Semiconductor...
Page 481
The controller sets this bit to a one when it enters the full or high-speed operational state. When the it exits the full or high-speed operation states due to Reset or Suspend events, the notification mechanisms are the USB Reset Received bit and the DCSuspend bits respectively. This bit is not EHCI compatible. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-19...
Sleep Enable. This is a non-EHCI bit. When this bit is a one, and the DCSuspend bit in the USBSTS register transitions, the controller will issue an interrupt. The interrupt is acknowledged by the software writing a one to the DCSuspend bit. Used only in device mode. 1 Enable. 0 Disable. MCF5253 Reference Manual, Rev. 1 24-20 Freescale Semiconductor...
Periodic Frame List during periodic schedule execution. The number of bits used for the index depends on the size of the frame list as set by the system software in the Frame List Size field in the USBCMD register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 484
Table 24-19. FRINDEX N Values USBCMD[FS] Frame List Size FRINDEX N value 1024 elements (4096 bytes) 512 elements (2048 bytes) 256 elements (1024 bytes) 128 elements (512 bytes) MCF5253 Reference Manual, Rev. 1 24-22 Freescale Semiconductor...
8 elements (32 bytes) 24.6.3.5 Control Data Structure Segment Register (CTRLDSSEGMENT) The CTRLDSSEGMENT register is not implemented on the MCF5253. 24.6.3.6 Periodic Frame List Base Address Register (PERIODICLISTBASE) This register contains the beginning address of the Periodic Frame List in the system memory. The host controller driver loads this register prior to starting the schedule execution by the controller.
Note that on the USB OTG module, this register is shared between the host and device mode functions. In host mode, it is the ASYNCLISTADDR register; in device mode, it is the ENDPOINTLISTADDR register. See Section 24.6.3.9, “Endpoint List Address Register (ENDPOINTLISTADDR), Non-EHCI,” for more information. MCF5253 Reference Manual, Rev. 1 24-24 Freescale Semiconductor...
This register is shared between the host and device mode functions. In device mode, it is the ENDPOINTLISTADDR register; in host mode, it is the ASYNCLISTADDR register. See Section 24.6.3.8, “Current Asynchronous List Address Register (ASYNCLISTADDR),” for more information. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-25...
SOF. Too many back-off events can waste bandwidth and power on the system bus and thus should be minimized (not necessarily eliminated). Back-offs can be minimized with use of the TSCHHEALTH (T ) parameter described below. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-27...
Page 490
TXSCHHEALTH exceeds 10 per second, try raising the value by 1. If streaming mode is disabled via the USBMODE register, treat TXFIFOTHRES as the maximum value for purposes of the TXSCHOH calculation. MCF5253 Reference Manual, Rev. 1 24-28 Freescale Semiconductor...
It is also used to initiate test mode or force signaling and allows the software to put the PHY into low power suspend mode and disable the PHY clock. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-29...
Page 492
Port Force Full-speed Connect. This bit is used to disable the chirp sequence that allows the port to identify itself as a PFSC HS port. 0 Allow the port to identify itself as High Speed. 1 Force the port to connect only at Full-speed. This bit is not defined in the EHCI specification. MCF5253 Reference Manual, Rev. 1 24-30 Freescale Semiconductor...
Page 493
This feature is implemented in the host/OTG controller (PPC = 1). For the USB OTG module in a device-only implementation port power control is not necessary, thus PPC and PP = 0. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-31...
Page 494
This field is zero if Port Power(PP) is zero in host mode. For device mode: 1 Port in suspend state. 0 Port not in suspend state. Default. In device mode this bit is a read only status bit. MCF5253 Reference Manual, Rev. 1 24-32 Freescale Semiconductor...
Page 495
When the port is disabled, (0) downstream propagation of data is blocked except for reset. This field is zero if Port Power(PP) is zero in host mode. In Device Mode, the device port is always enabled. (This bit will be one). MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-33...
The status inputs are de-bounced using a 1 msec time constant. Values on the status inputs that do not persist for more than 1 msec will not cause an update of the Status inputs, or cause and OTG interrupt. MCF5253 Reference Manual, Rev. 1 24-34...
Page 497
The software must write a one to clear this bit. 1 millisecond timer Interrupt Status. This bit is set once every millisecond. 1msS The software must write a one to clear this bit. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-35...
Page 498
0 A device Hardware assist B-disconnect to A-connect HABA 0 Disabled 1 Enable automatic B-disconnect to A-connect sequence Hardware assist data pulse HADP 0 No pulse sequence started 1 Start data pulse sequence Reserved. MCF5253 Reference Manual, Rev. 1 24-36 Freescale Semiconductor...
This register is not defined in the EHCI specification. This register controls the operating mode of the module. Address MBAR2 + 0x7A8 Access: User read/write Reset SDIS SLOM Reset Figure 24-27. USB Mode (USBMODE) Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-37...
The USB OTG module defaults to the idle state and needs to be initialized to the desired operating mode after reset. 24.6.3.16 Endpoint Setup Status Register (ENDPTSETUPSTAT)—Non-EHCI This register is not defined in the EHCI specification. This register contains the endpoint setup status. It is used only in device mode. MCF5253 Reference Manual, Rev. 1 24-38 Freescale Semiconductor...
This register is not defined in the EHCI specification. This register is used to initialize endpoints. It is used by the USB OTG module only in device mode. Address MBAR2 + 0x7B0 Access: User read/write PETB Reset PERB Reset Figure 24-29. Endpoint Initialization (ENDPTPRIME) Register MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-39...
If a packet is in progress for one of the associated endpoints, then that transfer will continue until completion. The hardware will clear this register after the endpoint flush operation is successful. MCF5253 Reference Manual, Rev. 1 24-40...
USB reset, by the USB DMA system, or through the ENDPTFLUSH register. ERBR[3] (bit 3 of the register) corresponds to endpoint 3. Note: These bits will be momentarily cleared by the hardware during hardware endpoint re-priming operations when a dTD is retired, and the dQH is updated. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-41...
ERCE[3] (bit 3 of the register) corresponds to endpoint 3. 24.6.3.21 Endpoint Control Register 0 (ENDPTCTRL0), Non-EHCI This register is not defined in the EHCI specification. Every device will implement endpoint 0 as a control endpoint. MCF5253 Reference Manual, Rev. 1 24-42 Freescale Semiconductor...
Page 505
The software can write a one to this bit to force the endpoint to return a STALL handshake to the Host. It will continue returning STALL until the bit is cleared by the software or it will automatically be cleared upon receipt of a new SETUP request. 1 Endpoint Stalled 0 Endpoint OK MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-43...
Note: When only one endpoint (RX or TX, but not both) of an endpoint pair is used, the unused endpoint should be configured as a bulk type endpoint. TX endpoint data source. This bit should always be written as 0, which selects the Dual Port Memory/DMA Engine as the source. MCF5253 Reference Manual, Rev. 1 24-44 Freescale Semiconductor...
It is responsible for moving all of the data to be transferred over the USB between the module and buffers in DMA cache memory. Like the system interface block the DMA engine block uses a simple synchronous bus signaling protocol. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-45...
Interrupt, Control, and Bulk data streams are managed via queue heads and Queue Element Transfer Descriptors. These data structures are optimized to reduce the total memory footprint of the schedule and to reduce (on average) the number of memory accesses needed to execute a USB transaction. MCF5253 Reference Manual, Rev. 1 24-46 Freescale Semiconductor...
Frame List Link pointers direct the host controller to the first work item in the frame’s periodic schedule for the current micro-frame. The link pointers are aligned on DWord boundaries within the Frame List. Figure 24-36 shows the format for the Frame List Link Pointer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-47...
The Asynchronous list is a simple circular list of queue heads. The ASYNCLISTADDR register is simply pointer to the next queue head. This implements a pure round-robin service for all queue heads linked into the asynchronous list. MCF5253 Reference Manual, Rev. 1 24-48 Freescale Semiconductor...
31–5 Link Pointer These bits correspond to memory address signals [31–5], respectively. This field points to another Isochronous Transaction Descriptor (iTD/siTD) or Queue Head (QH). 4–3 – Reserved. These bits are reserved and their value has no effect on operation. The software should initialize this field to zero. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-49...
1 one byte, 2 two bytes, etc.). The maximum value this field may contain is 0xC00 (3072). Interrupt on complete. If this bit is set, it specifies that when this transaction completes, the Host Controller should issue an interrupt at the next interrupt threshold. MCF5253 Reference Manual, Rev. 1 24-50 Freescale Semiconductor...
This field is also used for all IN transfers to detect packet babble. The software should not set a value larger than 1024 (400h). Any value larger yields undefined results. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-51...
T 0x18 Figure 24-39. Split-Transaction Isochronous Transaction Descriptor (siTD) Host controller read/write; all others read-only. 24.8.4.1 Next Link Pointer DWord0 of a siTD is a pointer to the next schedule data structure. MCF5253 Reference Manual, Rev. 1 24-52 Freescale Semiconductor...
– Reserved. Bit is reserved for future use. It should be cleared. 6–0 Device Address This field selects the specific device serving as the data source or sink. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-53...
This field is initialized by the software to the total number of bytes expected in this transfer. Maximum Transfer value is 1023 (3FFh) 15–8 µFrame Split complete progress mask. This field is used by the host controller to record which C-prog-mask split-completes have been executed. MCF5253 Reference Manual, Rev. 1 24-54 Freescale Semiconductor...
(as selected with the page indicator bit (P field)). The host controller is not required to write this field back when the siTD is retired (Active bit transitioned from a one to a zero). MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Host controller updates (host controller writes) to stand-alone qTDs only occur during transfer retirement. References in the following bit field definitions of updates to the qTD are to the qTD portion of a queue head. MCF5253 Reference Manual, Rev. 1 24-56 Freescale Semiconductor...
This field contains the physical memory address of the next qTD to be processed in the event that the qTD Pointer current qTD execution encounters a short packet (for an IN transaction). The field corresponds to memory address signals [31–5], respectively. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-57...
Current Page. This field is used as an index into the qTD buffer pointer list. Valid values are in the range 0x0 to 0x4. The host controller is not required to write this field back when the qTD is retired. MCF5253 Reference Manual, Rev. 1 24-58...
Page 521
01 IN Token generates token (69H) 10 SETUP Token generates token (2DH) (undefined if endpoint is an Interrupt transfer type, for example. µFrame S-mask field in the queue head is non-zero.) 11 Reserved. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-59...
Page 522
If the QH[EPS] field does not indicate a high-speed device, then this field is used as an error indicator bit. It is set by the host controller whenever a periodic split-transaction receives an ERR handshake. MCF5253 Reference Manual, Rev. 1 24-60 Freescale Semiconductor...
Figure 24-41. Queue Head Layout Offsets 0x04 through 0x0B contain the static endpoint state. Host controller read/write; all others read-only. Offsets 0x10 through 0x2F contain the transfer overlay. Offsets 0x14 through 0x27 contain the transfer results. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-61...
USB2.0 Hub Transaction Translator. There are additional fields used for addressing the hub and scheduling the protocol transactions (for periodic). The host controller must not modify the bits in this region. MCF5253 Reference Manual, Rev. 1 24-62 Freescale Semiconductor...
Page 525
The value is the port number identifier on the USB 2.0 hub (for hub at device address Hub Addr below), below which the full- or low-speed device associated with this endpoint is attached. This information is used in the split-transaction protocol. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-63...
[31–5], respectively. 4–0 – Reserved. These bits are ignored by the host controller when using the value as an address to write data. The actual value may vary depending on the usage. MCF5253 Reference Manual, Rev. 1 24-64 Freescale Semiconductor...
The general operational model is for the USB modules in host mode is defined by the Enhanced Host Controller Interface (EHCI) Specification. The EHCI specification describes the register-level interface for a host controller for the USB Revision 2.0. It includes a description of the hardware/software interface MCF5253 Reference Manual, Rev. 1 24-66 Freescale Semiconductor...
At this point, the port is active with SOFs occurring down the enabled port enabled High-speed ports, but the schedules have not yet been enabled. The EHCI host controller will not transmit SOFs to enabled Full- or Low-speed ports. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-67...
In this implementation, however, over-current is not reported to the USB core. Therefore the bits: Over-current Active and Over-current Change in the PORTSC register will be static. The over-current detection and limiting logic resides outside the MCF5253. The USB software stack is responsible for monitoring the Over-current condition on the external device.
Whenever a resume event is detected, the Port Change Detect bit in the USBSTS register is set. If the Port Change Interrupt Enable bit is a one in the USBINTR MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
The periodic frame list is an array of physical memory pointers. The objects referenced from the frame list must be valid schedule data structures as defined in Section 24.8, “Host Data Structures.” MCF5253 Reference Manual, Rev. 1 24-70 Freescale Semiconductor...
Page 533
ASYNCLISTADDR register. The software must set queue head horizontal pointer T-bits to a zero for queue heads in the asynchronous schedule. Section 24.9.9, “Asynchronous Schedule” for complete operational details. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-71...
To aid the presentation, two terms are defined. The host controller's view of the 1-millisecond boundaries is called H-Frames. The high-speed bus's view of the 1-millisecond boundaries is called B-Frames. MCF5253 Reference Manual, Rev. 1 24-72 Freescale Semiconductor...
Page 535
FRINDEX[2:0] and incrementing SOFV based on the transition of 0 to 1 of FRINDEX[2:0]. The software is allowed to write to FRINDEX. Section 24.6.3.4, “Frame Index Register (FRINDEX),” provides the requirements that the software should adhere when writing a new value in FRINDEX. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-73...
Interrupt queue heads are linked into the frame list ordered by poll rate. Longer poll rates are linked first (for example, closest to the periodic frame list), followed by shorter poll rates, with queue heads with a poll rate of one, on the very end. MCF5253 Reference Manual, Rev. 1 24-74 Freescale Semiconductor...
When the indexed active bit is a one the host controller continues to parse the iTD. It stores the indexed transaction description and the general endpoint information (device address, endpoint number, maximum MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-75...
Page 538
Detected bit and clear the Active bit. Note, that the host controller is not required to update the iTD field Transaction n Length in this error scenario. If the Mult field is greater than one, then the host controller MCF5253 Reference Manual, Rev. 1 24-76...
If the buffer is large, then the system software can use a small set of iTDs to service the entire buffer. The system software can activate the transaction description records (contained in each iTD) in any pattern required for the particular data stream. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-77...
(relative to the current location of the host controller execution in the periodic list) and still have the host controller process them. MCF5253 Reference Manual, Rev. 1 24-78 Freescale Semiconductor...
ASYNCLISTADDR register to get the next queue head. The Asynchronous Schedule Status bit in the USBSTS register indicates status of the asynchronous schedule. The system software enables (or disables) the asynchronous schedule by writing a one (or zero) MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-79...
This is a software requirement section. There are two independent events for adding queue heads to the asynchronous schedule. The first is the initial activation of the asynchronous list. The second is inserting a new queue head into an activated asynchronous list. MCF5253 Reference Manual, Rev. 1 24-80 Freescale Semiconductor...
-- schedule. Software provides this pointer with the -- following strict rules: -- if the host software is one queue head, then -- pQHeadNext must be the same as -- QueueheadToUnlink.HorizontalPointer. If the host MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-81...
Page 544
(A & B). It is sufficient that the host controller can set the status bit (and clear the doorbell bit) as soon as it has traversed beyond current reachable schedule information (that is, traversed beyond queue head (B) in this example). MCF5253 Reference Manual, Rev. 1 24-82 Freescale Semiconductor...
If the controller ever encounters an H-bit of one and a Reclamation bit of zero, the controller simply stops traversal of the asynchronous schedule. An example illustrating the H-bit in a schedule is shown in Figure 24-50. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-83...
This section presents an overview of how the host controller interacts with queuing data structures. Queue heads use the Queue Element Transfer Descriptor (qTD) structure defined in Section 24.8.5, “Queue Element Transfer Descriptor (qTD).” MCF5253 Reference Manual, Rev. 1 24-84 Freescale Semiconductor...
4K page. The final portion, which may only be large enough to occupy a portion of a page, must start at the top of the page and be contiguous within that page. Figure 24-51 illustrates these requirements. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-85...
Page 548
The transactions continue for the rest of the buffer, with the host controller automatically moving to the next page pointer (that is, C_Page) when necessary. There are three conditions for how the host controller handles C_Page. MCF5253 Reference Manual, Rev. 1 24-86 Freescale Semiconductor...
The system software may set IOC's to occur more frequently. A motivation for this may be that it wants early notification so that interface data structures can be re-used in a timely manner. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-87...
The host controller preserves the Ping State bit across all queue advancements. This means that when a new qTD is written into the queue head overlay area, the previous value of the Ping State bit is preserved. MCF5253 Reference Manual, Rev. 1 24-88 Freescale Semiconductor...
• STALL. The target endpoint responded with a STALL handshake. The host controller sets the halt bit in the status byte, retires the qTD but does not attempt to advance the queue. MCF5253 Reference Manual, Rev. 1 24-90 Freescale Semiconductor...
EHCI periodic schedule and queue head data structure. The S and C labels indicate micro-frames where the software can schedule start-splits and complete splits (respectively). MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-91...
Page 554
The system software cannot build an efficient schedule that satisfies this requirement unless it uses FSTNs. Figure 24-54 illustrates the general layout of the periodic schedule. MCF5253 Reference Manual, Rev. 1 24-92 Freescale Semiconductor...
Page 555
SplitXState indicates Do_Start, and the current micro-frame as indicated by FRINDEX[2:0] is 0, then execute a start-split transaction. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-93...
• When a QH's EPS field indicates a Full/Low-speed device, the host controller only considers it for execution if its SplitXState is DoComplete (note: this applies whether the PID Code indicates an MCF5253 Reference Manual, Rev. 1 24-94 Freescale Semiconductor...
Page 557
In frame N+1 (micro-frames 0 and 1), when the host controller encounters Save-Path FSTN (Save-N), it observes that Save-N.Back Path Link Pointer.T-bit is zero (definition of a Save-Path indicator). The host controller saves the value of Save-N. Normal Path Link Pointer and follows Save-N.Back Path Link MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-95...
Save-Place FSTN from one poll rate level to another. During the transition, the software must preserve the integrity of the previous schedule until the new schedule is in place. MCF5253 Reference Manual, Rev. 1 24-96 Freescale Semiconductor...
It is calculated from the three least significant bits of the FRINDEX register (that is, cMicroFrameBit = (1 shifted-left(FRINDEX[2:0]))). The cMicroFrameBit has at most one bit asserted, which always MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-97...
This is the state the software must initialize a full- or low-speed interrupt queue head StartXState bit. This state is entered from the Do_Complete Split state only after the split transaction is complete. MCF5253 Reference Manual, Rev. 1 24-98 Freescale Semiconductor...
-- Return values: -- TRUE - no error -- FALSE - error Boolean rvalue = TRUE; previousBit = cMicroframeBit logical-rotate-right(1) -- Bit-wise anding previousBit with C-mask indicates -- whether there was an intent MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-99...
Page 562
NYET response from the transaction translator. Do not update any transfer state (except for C-prog-mask and FrameTag) and stay in this state. The host controller must not adjust Cerr on this response. MCF5253 Reference Manual, Rev. 1 24-100 Freescale Semiconductor...
Page 563
The other possible combinations of tests A, B, C, and D may indicate that data or response was lost. Table 24-67 lists the possible combinations and the appropriate action. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-101...
Rule 3: If transitioning from Do_Start Split to Do Complete Split and the current value of FRINDEX[2:0] is not 6, or currently in Do Complete Split and the current value of (FRINDEX[2:0]) is not 7, FrameTag is set to FRINDEX[7:3]. This accommodates all other cases Figure 24-53. MCF5253 Reference Manual, Rev. 1 24-102 Freescale Semiconductor...
This simple arrangement allows a single isochronous scheduling model and adds the additional feature that all data received from the endpoint (per split transaction) must land into a contiguous buffer. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-103...
Case 2b: Start & Complete in H-Frame, Micro-Frame 0 HS/FS/LS Bus Micro-Frame B-Frame N–1 B-Frame N B-Frame N+1 H-Frame N H-Frame N+1 siTD siTD Figure 24-57. Split Transaction, Isochronous Scheduling Boundary Conditions MCF5253 Reference Manual, Rev. 1 24-104 Freescale Semiconductor...
Page 567
Back Pointer. This field in a siTD is used to complete an IN split-transaction using the previous H-Frame's siTD. This is only used when the scheduling of the complete-splits span an H-Frame boundary. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-105...
Page 568
(not shown). The complete-splits to extract this data must use the buffer pointer from siTD . The only way for the host controller to reach siTD from H-Frame is to use siTD 's back pointer. MCF5253 Reference Manual, Rev. 1 24-106 Freescale Semiconductor...
As with split transaction Interrupt, it is the host controller's responsibility to detect when it has missed an opportunity to execute a complete-split. The MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 570
(for example, state not advanced) and report the appropriate error to the client driver. MCF5253 Reference Manual, Rev. 1 24-108 Freescale Semiconductor...
Each time the host controller reaches an active siTD in this state, it checks the siTD[S-mask] against cMicroFrameBit. If there is a one in the appropriate position, the siTD executes a start-split transaction. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Page 572
T-count starts greater than 3. Transition from MID to END. This case can occur for any of the scheduling boundary cases where the T-count starts greater than 2. MCF5253 Reference Manual, Rev. 1 24-110 Freescale Semiconductor...
Test A. cMicroFrameBit is bit-wise ANDed with the siTD[C-mask] field. A non-zero result indicates that the software scheduled a complete-split for this endpoint, during this micro-frame. This test is always applied to a newly fetched siTD that is in this state. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-111...
Page 574
Bytes To Transfer]) MDATA and DATA0/1 data payloads up to and including 192 bytes. The host controller may optionally clear siTD[Status-Active] and set siTD[Status-Babble Detected] when it receives MDATA or DATA0/1 with a data payload of more than 192 bytes. MCF5253 Reference Manual, Rev. 1 24-112 Freescale Semiconductor...
Page 575
If Test A succeeds, but Test B fails, it means that one or more of the complete-splits have been skipped. The host controller sets the Missed Micro-Frame status bit and clears the Active bit. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
SplitXState to Do Start Split. The host controller then determines whether the case 2b start split boundary condition exists (that is, if cMicroframeBit is 1 and siTD [S-mask[0]] is 1). If this criterion MCF5253 Reference Manual, Rev. 1 24-114 Freescale Semiconductor...
S-masks of all siTDs for this endpoint have a value of 0x10 (a one bit in micro-frame 4) and C-mask value of 0xC3 (one-bits in micro-frames 0,1, 6 and 7). Additionally, the software ensures that the Back MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
Clear the Run/Stop bit in the USBCMD register and wait for the HCHalted bit in the USBSTS register, to transition to a one. Note that an EHCI host controller implementation may optionally MCF5253 Reference Manual, Rev. 1 24-116 Freescale Semiconductor...
(via an OS-specific mechanism), schedules a deferred procedure call (DPC) which will execute later. The DPC routine processes the results of the schedule execution. The precise mechanisms used are beyond the scope of this document. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-117...
In general, this is called a Packet Babble. When a device sends more data than the Maximum Length number of bytes, the host controller sets the Babble Detected bit to a one and halts MCF5253 Reference Manual, Rev. 1 24-118...
Simply truncating the packet is not considered acceptable. An acceptable implementation option is to 1's complement the CRC bytes and send them. There are other options suggested in the Transaction Translator section of the USB Specification Revision 2.0. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-119...
Interrupt on Async Advance Doorbell bit in the USBCMD register. If it is set, it sets the Interrupt on Async MCF5253 Reference Manual, Rev. 1 24-120...
Device Controller Driver (DCD) software and the Device Controller. The data structure definitions in this chapter support a 32-bit memory buffer address space. The interface consists of device Queue Heads and Transfer Descriptors. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-121...
The device Endpoint Queue Head (dQH) is where all transfers are managed. The dQH is a 48-byte data structure, but must be aligned on 64-byte boundaries. During priming of an endpoint, the dTD (device MCF5253 Reference Manual, Rev. 1 24-122...
01 Execute 1 Transaction. 10 Execute 2 Transactions. 11 Execute 3 Transactions. Note: Non-ISO endpoints must set Mult = 00. Note: ISO endpoints must set Mult = 01, 10, or 11 as needed. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-123...
The set-up buffer is dedicated storage for the 8-byte data that follows a set-up PID. NOTE Each endpoint has a TX and an RX dQH associated with it, and only the RX queue head is used for receiving setup data packets. MCF5253 Reference Manual, Rev. 1 24-124 Freescale Semiconductor...
Terminate (T). 1=pointer is invalid. 0=Pointer is valid (points to a valid Transfer Element Descriptor). This bit indicates to the Device Controller that there are no more valid entries in the queue. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-125...
Page 588
Device Controller software. This field contains the status of the last transaction performed on this qTD. The bit encodings are: Status Field Description Active. Halted. Data Buffer Error. Transaction Error. 4,2,0 Reserved. MCF5253 Reference Manual, Rev. 1 24-126 Freescale Semiconductor...
4. Configure ENDPOINTLISTADDR Pointer. For additional information on ENDPOINTLISTADDR, refer Table 24-23. 5. Enable the microprocessor interrupt associated with the USB OTG and optionally change setting of ITC field in USBCMD register. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-127...
Appendix C.2 of the USB Specification Rev. 2.0. The following state diagram depicts the state of a USB 2.0 device. MCF5253 Reference Manual, Rev. 1 24-128...
Page 591
Software Only State Figure 24-63. USB 2.0 Device States States powered, attach, defaultFS/HS, suspendFS/HS are implemented in the USB_DR and are communicated to the DCD using the status bits identified in Table 24-79. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-129...
DCD is processing a USB reset event, then it is likely that no dTDs have been allocated. 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. MCF5253 Reference Manual, Rev. 1 24-130 Freescale Semiconductor...
PORTSCn while the device is in suspend state. Sending resume signal to an upstream port should cause the host to issue resume signaling and bring the suspended bus segment (one more devices) back to the active condition. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-131...
ENDPTCTRLn register otherwise the behavior is undefined. Table 24-81 shows how to construct a configuration word for endpoint initialization. Table 24-81. Device Controller Endpoint Initialization Field Value Data Toggle Reset Data Toggle Inhibit MCF5253 Reference Manual, Rev. 1 24-132 Freescale Semiconductor...
The DCD may reset the data toggle state bit and cause the data toggle sequence to reset in the device controller by writing a '1' to the data toggle reset bit in the ENDPTCTRLn register. This should only be necessary when configuring/initializing an endpoint or returning from a STALL condition. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-133...
Since only the leading data is stored in the device controller FIFO, it is necessary for the device controller to begin filling in behind leading data after the transaction starts. The FIFO must be sized to account for the maximum latency that can be incurred by the system memory bus. MCF5253 Reference Manual, Rev. 1 24-134 Freescale Semiconductor...
Bytes (dTD) Max. Packet Length (dQH) – – – – NOTE The MULT field in the dQH must be set to ‘00’ for bulk, interrupt, and control endpoints. TX-dTD is complete when: MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-135...
NYET/ACK— NYET unless the Transfer Descriptor has packets remaining according to the USB variable length protocol then ACK. SYSERR—System error should never occur when the latency FIFOs are correctly sized and the DCD is responsive. MCF5253 Reference Manual, Rev. 1 24-136 Freescale Semiconductor...
ENDPTPRIME register is zero and the associated bit in the ENDPTSTATUS register is a one. If a prime fails, that is, The ENDPTPRIME bit goes to zero and the ENDPTSTATUS bit MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
SYSERR—System error should never occur when the latency FIFOs are correctly sized and the DCD is responsive. Force Bit Stuff Error. NYET/ACK—NYET unless the Transfer Descriptor has packets remaining according to the USB variable length protocol then ACK. MCF5253 Reference Manual, Rev. 1 24-138 Freescale Semiconductor...
Transaction Error bit and the data is stored as usual for the application software to sort out. • TX Packet Retired — MULT counter reaches zero. — Fulfillment Error [Transaction Error bit is set] — #Packets Occurred > 0 AND # Packets Occurred < MULT MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-139...
Transfers”, the dQH also contains the following parameters for the associated endpoint: Multipler, Maximum Packet Length, Interrupt On Setup. The complete initialization of the dQH including these fields is demonstrated in the next section. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-141...
Write the Active bit in the status field to ‘0.’ • Write the Halt bit in the status field to ‘0.’ NOTE The DCD must only modify dQH if the associated endpoint is not primed and there are no outstanding dTD's. MCF5253 Reference Manual, Rev. 1 24-142 Freescale Semiconductor...
To conserve memory, the reserved fields at the end of the dQH can be used to store the Head and Tail pointers but it still remains the responsibility of the DCD to maintain the pointers. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-143...
1. Write dQH next pointer AND dQH terminate bit to 0 as a single DWord operation. 2. Clear active and halt bit in dQH (in case set from a previous error). 3. Prime endpoint by writing '1' to correct bit position in ENDPTPRIME. MCF5253 Reference Manual, Rev. 1 24-144 Freescale Semiconductor...
For Transmit packets, a packet is only complete after the actual bytes reaches zero, but for receive packets, the host may send fewer bytes in the transfer according the USB variable length packet protocol. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-145...
Device Controller to cease data transfers on the pipe for one (micro)frame. During the ‘dead’(micro)frame, the Device Controller reports error on the pipe and primes for the following frame. MCF5253 Reference Manual, Rev. 1 24-146 Freescale Semiconductor...
USB Interrupt (w/ ENDPTCOMPLETE). System Error Unrecoverable error. Immediate Reset of core; free transfers buffers in progress and restart the DCD. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-147...
Section 24.6.2.3, “Host Controller Structural Parameters (HCSPARAMS)” for usage information. 24.12.1.2 Operational Registers The addition of two-bit Port Speed (PSPD) to the PORTSCn register is added to the operational registers to support the embedded TT: MCF5253 Reference Manual, Rev. 1 24-148 Freescale Semiconductor...
LS traffic. Maximum Packet Size must be less than or equal 64 or undefined behavior may result. 2. siTD (for direct attach FS) – Periodic (ISO Endpoint) MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-149...
HS hub, the start/complete split operation is simple an internal operation to the embedded Transaction Translator. Table 24-94 summarizes the conditions where handshakes are emulated from internal state instead of actual handshakes to HS split bus traffic. MCF5253 Reference Manual, Rev. 1 24-150 Freescale Semiconductor...
The option to limit the tracking to only 4 periodic data pipes exists in the by changing the configuration constant VUSB_HS_TT_PERIODIC_CONTEXTS to 4. The result is a significant gate count savings to the core given the limitations implied. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-151...
Note that the free running interrupt is shared with the device-mode start-of-frame interrupt. See Section 24.6.3.2, “USB Status MCF5253 Reference Manual, Rev. 1 24-152 Freescale Semiconductor...
• [Port Change Interrupt] Port enable change occurs to notify the host controller that the device in now operational and at this point the port speed has been determined. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 24-153...
• Port Owner is read-only and always reads 0. • A 2-bit Port Speed indicator in PORTSC register provides the current operating speed of the port to the host controller driver. MCF5253 Reference Manual, Rev. 1 24-154 Freescale Semiconductor...
Chapter 25 FlexCAN Module This chapter discusses the modes of operation, signals, memory map, register descriptions, and the functional and initialization sequence of the FlexCAN controller of the MCF5253. 25.1 Features Following are the main features of the FlexCAN module: •...
(such as fiber optic cable or an unshielded twisted pair of wires). The FlexCAN supports both the standard and extended identifier (ID) message formats specified in the CAN protocol specification, revision 2.0, part B. MCF5253 Reference Manual, Rev. 1 25-2 Freescale Semiconductor...
CAN protocol functions are enabled. User and supervisor modes differ in the access to some restricted control registers. 25.3.2.2 Freeze Mode Freeze mode is entered by setting: • CANMCR n [FRZ], and • CANMCR n [HALT], or by asserting the BKPT signal. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-3...
(logic 1). FlexCAN behaves as it normally does when transmitting and treats its own transmitted message as a message received from a remote node. In this mode, FlexCAN MCF5253 Reference Manual, Rev. 1 25-4...
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. MCF5253 Reference Manual, Rev. 1 25-6 Freescale Semiconductor...
Page 623
FlexCAN exits these modes. 0 FlexCAN is either in normal mode, listen-only mode, or loop-back mode. h1FlexCAN is in disable or freeze mode. Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-7...
Exceptions are the BOFFMSK, ERRMSK, and BOFFREC bits, which can be accessed at any time. MCF5253 Reference Manual, Rev. 1 25-8 Freescale Semiconductor...
Page 625
Clock source. Selects the clock source for the CAN interface to be fed to the prescalar. This bit should only be CLK_SRC changed while the module is disabled. 0 Clock source is CRIN 1 Clock source is the internal bus clock, SYSCLK MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-9...
Page 626
Propagation segment. Defines the length of the propagation segment in the bit time. The valid programmable PROPSEG values are 0–7. Propagation segment time (PROPSEG + 1) time-quanta Note: A time-quantum = 1 S clock period. MCF5253 Reference Manual, Rev. 1 25-10 Freescale Semiconductor...
(only while in freeze mode), as locked frames that matched a message buffer (MB) through a mask may be transferred into the MB (upon release) but may no longer match. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-11...
(indicated by the ERRSTAT n [ACKERR] bit). After the transition to error-passive state, the TXECTR does not increment anymore by acknowledge errors. Therefore, the device never goes to the bus off state. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-13...
1 to them. Writing 0 has no effect. Refer to Section 25.7.1, “Interrupts.” Offset MBAR2 0x1020 (CANCTRL0) Access: User read/write MBAR2 0x2020 (CANCTRL1) Reset R BIT1 BIT0 IDLE TXRX BOFF CONF Reset Figure 25-9. FlexCAN Error and Status (ERRSTATn) Register MCF5253 Reference Manual, Rev. 1 25-14 Freescale Semiconductor...
Page 631
CANCTRLn[LOM] bit is set, FLTCONF will indicate error-passive. Since the CANCTRLn register is not affected by soft reset, the FLTCONF field will not be affected by soft reset if the LOM bit is set. 00 Error active 01 Error passive 1x Bus off Reserved, should be cleared. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-15...
IFLAG n bit and, if the corresponding IMASK n bit is set, will generate an interrupt. The interrupt flag is cleared by writing a 1, while writing 0 has no effect. MCF5253 Reference Manual, Rev. 1 25-16 Freescale Semiconductor...
0x2000). The 512-byte message buffer space is fully used by the 32 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. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-17...
Page 634
Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7 Figure 25-13. Message Buffer Structure Register for Both Extended and Standard Frames MCF5253 Reference Manual, Rev. 1 25-18 Freescale Semiconductor...
Page 635
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 MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-19...
Page 636
Data frame to be transmitted once, unconditionally. After transmission, the 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. MCF5253 Reference Manual, Rev. 1 25-20 Freescale Semiconductor...
The CPU prepares or changes an MB for transmission by writing the following: 1. Control/status word to hold Tx MB inactive (CODE = 1000) 2. ID word 3. Data bytes 4. Control/status word (active CODE, LENGTH) NOTE The first and last steps are mandatory. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-21...
The CPU prepares or changes an MB for frame reception by writing the following: 1. Control/status word to hold Rx MB inactive (CODE = 0000) 2. ID word 3. Control/status word to mark the Rx MB as active and empty (CODE = 1000) MCF5253 Reference Manual, Rev. 1 25-22 Freescale Semiconductor...
FlexCAN MB, then the frame will be received by the FlexCAN. Such a frame is a self-received frame. Note that FlexCAN does not receive frames transmitted by itself if another device on the CAN bus has an ID that matches the FlexCAN Rx MB ID. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-23...
Any CPU write access to the C/S word of an MB causes that MB to be excluded from the transmit or receive processes during the current matching or arbitration round. This mechanism is called MB deactivation. It is temporary, affecting only for the current match/arbitration round. MCF5253 Reference Manual, Rev. 1 25-24 Freescale Semiconductor...
ID is locked, the last received frame with that ID is kept within the serial message buffer, while all preceding ones are lost. There is no indication of lost messages when this occurs. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor...
CAN bus. These conditions include detection of a dominant bit in the following: • First or second bit of intermission • Seventh (last) bit of the end-of-frame (EOF) field in receive frames MCF5253 Reference Manual, Rev. 1 25-26 Freescale Semiconductor...
SYNC_SEG: Has a fixed length of one time quantum. Signal edges are expected to happen within this section. 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. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-27...
Page 644
It is the user’s responsibility to ensure the bit time settings are in compliance with the CAN standard. For bit time calculations, use an IPT (Information Processing Time) of 2, which is the value implemented in the FlexCAN module MCF5253 Reference Manual, Rev. 1 25-28 Freescale Semiconductor...
1. Initialize all operation modes in the CANCTRL n register. a) Initialize the bit timing parameters PROPSEG, PSEGS1, PSEG2, and RJW. b) Select the S-clock rate by programming the PRESDIV field. c) Select the internal arbitration mode via the LBUF bit. MCF5253 Reference Manual, Rev. 1 Freescale Semiconductor 25-29...
MB caused the interrupt. The other interrupt source (wired OR of bus off and error) acts in the same way, located in the ERRSTAT n register. The bus off and error interrupt mask bits are located in the CANCTRL n register. MCF5253 Reference Manual, Rev. 1 25-30 Freescale Semiconductor...
This chapter provides the external signal descriptions, memory map, register descriptions, and functional descriptions of the Real-Time Clock module of the MCF5253. The real time clock (RTC) is a mixed-signal circuit which provides an indicator of time (in seconds) for various purposes in the system.
Page 648
To indicate the real-time clock has been in low battery state, it will set the RTC_POWER_LOSS status bit in the ATA-DMA configuration register. This bit will remain set, until the user sets the RTC_CLEAR bit in the ATA-DMA configuration register. MCF5253 Reference Manual, Rev. 1 26-2 Freescale Semiconductor...
Need help?
Do you have a question about the MCF5253 and is the answer not in the manual?
Questions and answers