Cypress CY7C67300 manual External Memory Interface

Page 5

CY7C67300

External Memory Interface

EZ-Host provides a robust interface to a wide variety of external memory arrays. All available external memory array locations can contain either code or data. The CY16 RISC processor directly addresses a flat memory space from 0x0000 to 0xFFFF.

External Memory Interface Features

Supports 8-bit or 16-bit SRAM or ROM

SRAM or ROM can be used for code or data space

Direct addressing of SRAM or ROM

Two external memory mapped page registers

External Memory Access Strobes

Access to external memory is sampled asynchronously on the rising edge of strobes with a minimum of one wait state cycle. Up to seven wait state cycles may be inserted for external memory access. Each additional wait state cycle stretches the external memory access time by 21 ns (you must be running in internal memory when changing wait states). An external memory device with 12 ns access time is necessary to support 48 MHz code execution.

Page Registers

EZ-Host allows extended data or program code to be stored in external SRAM, or ROM. The total size of extended memory can be up to 512K bytes. The CY16 processor can access extended memory via two address regions of 0x8000-0x9FFF and 0xA000-0xBFFF. The page register 0xC018 can be used to control the address region 0x8000-0x9FFF and the page register 0xC01A controls the address region of 0xA000-0xBFFF.

Figure 1 illustrates that when the nXMEMSEL pin is asserted the upper CPU address pins are driven by the contents of the Page x registers.

Figure 1. Page n Registers External Address Pins Logic

 

nXMEMSEL Pin

0000 + PC[14:0]

 

 

1

 

 

A[18:0]

 

 

 

 

 

 

 

 

 

 

 

PAGEx Register[5:0] + PC[12:0]

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Where:

x = 1 or 2

PC = Program Counter

A = CPU Address Bus

Note:

PAGE 1 Register Active Range = 8000h to 9FFFh PAGE 2 Register Active Range = A000h to BFFFh nXMEMSEL Pin Active Range = 8000h to BFFFh

Merge Mode

Merge modes enabled through the External Memory Control register [0xC03A] allow combining of external memory regions in accordance with the following:

nXMEMSEL is active from 0x8000 to 0xBFFF

nXRAMSEL is active from 0x4000 to 0x7FFF when RAM Merge is disabled; nXRAMSEL is active from 0x4000 to 0xBFFF when RAM Merge is enabled

nXROMSEL is active from 0xC100 to 0xDFFF when ROM Merge is disabled; nXROMSEL is active from 0x8000 to 0xDFFF (excluding the 0xC000 to 0xC0FF area) when ROM Merge is enabled

Program Memory Hole Description

Code residing in the 0xC000-0xC0FF address space is not accessible by the CPU.

DMA to External Memory Prohibited

EZ-Host supports an internal DMA engine to rapidly move data between different functional blocks within the chip. This DMA engine is used for SIE1, SIE2, HPI, SPI, HSS, and IDE but it can only transfer data between the specified block and internal RAM or ROM. Setting up the DMA engine to transfer to or from an external memory space might result in internal RAM data corruption because the hardware (for example, HSS/HPI/SIE1/SIE2/IDE) does not explicitly check the address range. For example, setting up a DMA transfer to external address 0x8000 might result in a DMA transfer into address 0x0000.

External Memory Related Resource Considerations:

By default A[18:15] are not available for general addressing and are driven high on power up. The Upper Address Enable register must be written appropriately to enable A[18:15] for general addressing purposes.

47K ohm external pull up on pin A15 for 12 MHz crystal operation.

During the 3 ms BIOS boot procedure the CPU external memory bus is active.

ROM boot load value 0xC3B6 located at 0xC100.

HPI, HSS, SPI, SIE1, SIE2, and IDE cannot DMA to external memory arrays.

Page 1 banking is always enabled and is in effect from 0x8000 to 0x9FFF.

Page 2 banking is always enabled and is in effect from 0xA000 to 0xBFFF.

CPU memory bus strobes may wiggle when chip selects are inactive.

Document #: 38-08015 Rev. *J

Page 5 of 99

[+] Feedback

Image 5
Contents Typical Applications EZ-Host FeaturesCY7C67300 Block Diagram Interface Descriptions IntroductionFunctional Overview USB Interface Interface Options for External Memory Bus Pins MEM PinsOTG Interface USB Interface Pins Pin Name Pin NumberOTG Interface Pins Pin Name Pin Number External Memory Interface External Memory Interface Pins Pin Name Pin Number External Memory Interface PinsExternal Memory Interface Block Diagrams Up to 256k x 16 External Code/Data Page ModeUart Interface General Purpose IO Interface GpioI2C Eeprom Interface Serial Peripheral InterfaceProgrammable Pulse/PWM Interface High-Speed Serial InterfaceHPI Interface Pins 3 HPI Interface Pins 3 Pin Name Pin NumberHost Port Interface IDE InterfaceIDE Interface Pins Pin Name Pin Number IDE Throughput ModeCharge Pump Interface Pins Pin Name Pin Number ActualCrystal Pins Booster PinsCrystal Pins Pin Name Pin Number Booster InterfaceBoot Configuration Interface Boot Configuration InterfaceBoot Mode Operational ModesSleep Power Savings and Reset DescriptionPower Saving Mode Description Memory Map Document # 38-08015 Rev. *JPage 15 Bank Selected 0xC018 0xC01AProcessor Control Registers RegistersBank Register Example Hex Value Binary Value Bank RegisterReserved Revision RegisterCPU Speed Definition Processor Speed Host/Device 2B Wake Enable Bit Power Control RegisterHost/Device 2A Wake Enable Bit Host/Device 1B Wake Enable BitInterrupt Enable Register Halt Enable Bit Sleep Enable BitOTG Interrupt Enable Bit SPI Interrupt Enable BitMailbox Interrupt Enable Bit HSS Interrupt Enable BitOut Mailbox Interrupt Enable Bit Uart Interrupt Enable BitPort 2B Diagnostic Enable Bit USB Diagnostic RegisterPort 2A Diagnostic Enable Bit Port 1B Diagnostic Enable BitExternal Memory Registers Upper Address Enable Bit Upper Address Enable Register 0xC038 R/WExtended Page n Map Register R/W Extended Page n Map RegisterTimer Registers Timeout Flag Bit Watchdog Timer RegisterLock Enable Bit WDT Enable BitGeneral USB Registers Timer n RegisterUSB n Control Register Port B D+ Status BitPort B Resistors Enable Bit Mode Select BitPort a Resistors Enable Bit EnablePreamble Enable Bit Port a SOF/EOP Enable Bit ReservedUSB Host Only Registers USB Host Only Register Register Name Address Host 1/HostHost n Address Register ISO Enable Bit Sync Enable BitArm Enable Bit Sequence Select BitUnderflow Flag Bit Port Select BitStall Flag Bit NAK Flag BitSequence Status Bit Error Flag BitHost n PID Register W Host n PID RegisterPID Select PID Select DefinitionHost n Count Result Register R Host n Count Result Register Endpoint Select BitsVbus Interrupt Enable Bit Host n Interrupt Enable RegisterID Interrupt Enable Bit Host n Device Address RegisterPort B Wake Interrupt Enable Bit SOF/EOP Interrupt Enable BitPort a Wake Interrupt Enable Bit Port B Connect Change Interrupt Enable BitPort B Wake Interrupt Flag Bit SOF/EOP Interrupt Flag BitPort a Wake Interrupt Flag Bit Port B Connect Change Interrupt Flag BitHost n SOF/EOP Counter Register Host n SOF/EOP Counter Register RHost n Frame Register R Host 1 Frame Register 0xC096 Host 2 Frame Register 0xC0B6USB Device Only Registers IN/OUT Ignore Enable BitDevice n Endpoint n Control Register R/W Device n Endpoint n Control RegisterNAK Interrupt Enable Bit Stall Enable BitEnable Bit Direction Select BitDevice n Endpoint n Count Register Device n Endpoint n Count Register R/WDevice n Endpoint n Status Register Device n Endpoint n Status Register R/WOUT Exception Flag Bit Exception Flag BitSequence Flag Bit Setup Flag BitDevice n Endpoint n Count Result Register R/W Device n Endpoint n Count Result RegisterDevice n Interrupt Enable Register Port Select Bit Device n Interrupt Enable Register R/WDevice n Port Select Register R/W Device n Port Select RegisterReset Interrupt Enable Bit SOF/EOP Timeout Interrupt Enable BitEP7 Interrupt Enable Bit EP6 Interrupt Enable BitDevice n Address Register W EP0 Interrupt Enable BitDevice n Address Register Device n Status Register R/WEP7 Interrupt Flag Bit Reset Interrupt Flag BitEP6 Interrupt Flag Bit EP5 Interrupt Flag BitSOF/EOP Timeout Interrupt Counter Bits SOF/EOP Timeout Flag BitEP2 Interrupt Flag Bit EP1 Interrupt Flag BitOTG Control Registers Vbus Pull-up Enable BitDevice n SOF/EOP Count Register OTG Control Register ReservedGpio Registers SAS Enable Bit Write Protect Enable BitMode Select Definition Gpio Configuration 108 HSS Enable BitInterrupt 0 Polarity Select Bit Reserved Interrupt 0 Enable BitGpio n Output Data Register Gpio n Input Data RegisterIDE Registers IDE Start Address Register Mode Select DefinitionIDE Start Address Register 0xC04A R/W IDE Enable Bit IDE Interrupt Enable BitIDE Stop Address Register IDE Control RegisterHSS Registers Register Name Address HSS RegistersIDE PIO Port Registers 0xC050 0xC06F R/W CTS Enable Bit Xoff Enable BitReceive Interrupt Enable Bit HSS Control RegisterTransmit Ready Bit Packet Mode Select BitReceive Overflow Flag Bit HSS Baud Rate RegisterHSS Transmit Gap Register HSS Transmit Gap Register 0xC074 R/WTransmit Gap Select Bits HSS Data Register 0xC076 R/WHSS Receive Counter Register HSS Receive Counter Register 0xC07A R/WHSS Transmit Address Register HSS Transmit Address Register 0xC07C R/WHSS Transmit Counter Register 0xC07E R/W HSS Transmit Counter RegisterHPI Registers Vbus to HPI Enable BitHPI Breakpoint Register HPI Registers Register Name Address Interrupt Routing RegisterSOF/EOP2 to HPI Enable Bit ID to HPI Enable BitSOF/EOP2 to CPU Enable Bit SOF/EOP1 to HPI Enable BitSIE1msg Register SIE2msg Register SIEXmsg Register WSIEXmsg Register HPI Mailbox Register 0xC0C6 R/WHPI Status Port Reset2 Flag BitVbus Flag Bit ID Flag BitSPI Registers Reset1 Flag BitDone1 Flag Bit Mailbox Out Flag BitPhase Select Bit 3Wire Enable BitMaster Active Enable Bit Master Enable BitRead Enable Bit Byte Mode BitSPI Control Register SCK Strobe BitTransmit Interrupt Enable Bit SPI Interrupt Enable RegisterTransfer Interrupt Enable Bit Fifo Error Flag BitTransmit Interrupt Flag Bit Receive Interrupt Flag BitSPI Interrupt Clear Register Transfer Interrupt Flag BitCRC Enable Bit CRC Mode Definition CRCMode CRC Polynomial 1514CRC Clear Bit SPI CRC Value Register Receive CRC BitSPI Data Register SPI Data Register 0xC0D6 R/WSPI Transmit Address Register 0xC0D8 R/W SPI Transmit Address RegisterSPI Receive Count Register SPI Transmit Count RegisterSPI Receive Address Register Uart Registers Uart Status Register Uart Status Register 0xC0E2 RReceive buffer full Receive buffer empty Uart Data Register 0xC0E4 R/WPWM Registers PWM Enable BitPWM Registers Register Name Address PWM Control RegisterPWM 2 Enable Bit PWM 3 Enable BitPWM 1 Enable Bit PWM 0 Enable BitPWM n Start Register PWM n Start Register R/WPWM n Stop Register R/W PWM n Stop RegisterPWM Cycle Count Register PWM Cycle Count Register 0xC0FA R/WPin Descriptions Name Type Pin DiagramPin Descriptions Mosi SPI Mosi D11/MOSISCK SPI SCK D8/MISOGPIO28/TX GPIO29/OTGIDGPIO27/RX GPIO26/CTS/PWM3Tie to Gnd for normal operation Booster Power input 2.7V toAbsolute Maximum Ratings DC CharacteristicsOperating Conditions Crystal Requirements XTALIN, XtaloutGND USB TransceiverClock Timing AC Timing CharacteristicsReset Timing LOW Sram Read Cycle15Sram Read Cycle Parameters Description Min Typical Max Unit Sram Write Cycle Parameters Sram Write CycleParameter Description Min Typical Max Unit HighSDA OUT I2C Eeprom Timing-Serial IOSCL HPI Host Port Interface Write Cycle Timing HPI Host Port Interface Read Cycle Timing Chip Select Hold Data Access Time, from HPInRD fallingRead Pulse Width Read Cycle TimeHSS Block Mode Transmit HSS Byte Mode TransmitHSS Byte and Block Mode Receive IDE TimingRegister Summary Register SummaryHardware CTS/RTS Handshake HSS SOF/EOP CRC SOF/EOP2 Ordering Information Package DiagramsOrdering Information Ordering Code Package Type Pb-FreeOrig. Submis Description of Change Sion Date Document HistoryUSB Sales, Solutions, and Legal InformationWorldwide Sales and Design Support Products PSoC Solutions