Advanced Technology Attachment Controller (ATA)
MCF5253 Reference Manual, Rev. 1
Freescale Semiconductor
23-33
•
PIO mode read/write operation to the ATA bus
•
DMA transfers with the ATA bus
The operation of the peripheral is described in detail in the following sections.
23.6.1
Resetting ATA Bus
The ATA bus reset ATA_RST is asserted whenever bit 6 ata_rst_b of register ata_control is cleared to 0.
At the same time, the ATA protocol engine is reset. When this bit is set to 1, the reset is released.
23.6.2
Programming ATA Bus Timing and iordy_en
The timing the ATA interface will operate with on the ATA bus is programmable. The 24 timing registers
at MBAR2 + 0x80 to MBAR2 + 0x817 are used for this. How these registers affect the timing parameters
on the ATA bus, is detailed in
Section 23.4, “External Signal Description
.” It is allowed to reprogram these
registers at any time when the ATA bus is idle, so before reprogramming make sure that:
•
bit dma_pending in ata_control register is cleared.
•
bit controller_idle in interrupt_pending register is set.
These 2 conditions can be accomplished by first writing dma_pending to 0, then waiting until
controller_idle is set, then reprogram the timing parameters. If dma_pending was 1 before the
reprogramming started, it should be set again after new timing is in effect to allow the drive to finish the
current DMA transfer.
It only makes sense to reprogram the bus timing in the middle of an ongoing DMA transfer when this is
necessary because the operating system wants to change the bus clock period. (Dynamic voltage frequency
scaling).
It is necessary to wait for controller_idle because a PIO read or write to the ATA bus terminates after the
bus cycle with the CPU has been terminated. If the wait for controller_idle does not occur, the new timing
values may affect a bus cycle that is still running, and cause error.
The bit iordy_en in register ata_control influences whether the ATA interface will response to the iordy
signal coming from the drive. To reprogram it, same rules as for the timing registers apply: Only allowed
when dma_pending is cleared, while controller_idle is set.
23.6.3
Access to ATA Bus in PIO Mode
Access to the ATA bus in PIO mode is possible after:
•
ata_rst_b bit in register ata_control is set.
•
Timing parameters have been programmed.
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.
Summary of Contents for MCF5253
Page 1: ...Document Number MCF5253RM Rev 1 08 2008 MCF5253 Reference Manual...
Page 26: ...MCF5253 Reference Manual Rev 1 xxvi Freescale Semiconductor...
Page 32: ...MCF5253 Reference Manual Rev 1 xxxii Freescale Semiconductor...
Page 46: ...MCF5253 Introduction MCF5253 Reference Manual Rev 1 1 14 Freescale Semiconductor...
Page 62: ...Signal Description MCF5253 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Page 98: ...Instruction Cache MCF5253 Reference Manual Rev 1 5 10 Freescale Semiconductor...
Page 104: ...Static RAM SRAM MCF5253 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Page 128: ...Synchronous DRAM Controller Module MCF5253 Reference Manual Rev 1 7 24 Freescale Semiconductor...
Page 144: ...Bus Operation MCF5253 Reference Manual Rev 1 8 16 Freescale Semiconductor...
Page 176: ...System Integration Module SIM MCF5253 Reference Manual Rev 1 9 32 Freescale Semiconductor...
Page 198: ...Analog to Digital Converter ADC MCF5253 Reference Manual Rev 1 12 6 Freescale Semiconductor...
Page 246: ...DMA Controller MCF5253 Reference Manual Rev 1 14 18 Freescale Semiconductor...
Page 282: ...UART Modules MCF5253 Reference Manual Rev 1 15 36 Freescale Semiconductor...
Page 344: ...Audio Interface Module AIM MCF5253 Reference Manual Rev 1 17 46 Freescale Semiconductor...
Page 362: ...I2 C Modules MCF5253 Reference Manual Rev 1 18 18 Freescale Semiconductor...
Page 370: ...Boot ROM MCF5253 Reference Manual Rev 1 19 8 Freescale Semiconductor...