
How to Use S6J3200 Quad Flash, Traveo™ Family
www.cypress.com Document No. 002-04454 Rev. *B 5
1. After the System Reset, the software shall initialize the DDRHSSPI by reading the DDRHSSPIn_MID Register
and setting the Peripheral Communication related attributes in the DDRHSSPIn_PCC0, DDRHSSPIn_PCC1,
DDRHSSPIn_PCC2 and DDRHSSPIn_PCC3 Registers. Please make sure that the DDRHSSPIn_MCTRL.CSEN
bit is cleared to "0".
2. The next step is to configure the transfer protocol (i.e. whether the DDRHSSPI serial transfers use the Legacy or
the Quad Protocol and whether the DDRHSSPI would be used only for transmission, or both for transmission
and reception) in the DDRHSSPIn_DMTRP.TRP. DDRHSSPI loads the DDRHSSPIn_DMBCC.BCC with the
number of bytes to be serially transferred.
3. Configure the DDRHSSPIn_DMFIFOCFG Register, to set the FIFO threshold levels. By programming these
levels, the assertion of the service requests can be controlled. Also configure the
DDRHSSPIn_DMFIFOCFG.FWIDTH, to select the width of the FIFOs. Configure the service requests:
DDRHSSPI supports both Interrupt Service Request and DMA Service Request, for the normal data read
operations from RX-FIFO or write operations to TX-FIFO. For normal operation, either the Interrupt Service
Requests or the DMA Service Requests shall be enabled by the software. To enable the Interrupt Service
Requests for writing TX-FIFO, please program the bits in the DDRHSSPIn_TXE Register. To enable the Interrupt
Service Requests for reading RX-FIFO, please program the bits in the DDRHSSPIn_RXE Register. To enable
the DMA Service Request (for writing and/or reading), please program either/both of the
DDRHSSPIn_DMAEN.TXDMAEN and the DDRHSSPIn_DMAEN.RXDMAEN bits. The DMA Read Channel must
be setup to perform a block transfer of "DDRHSSPIn_DMFIFOCFG.RXFTH + 1" transfers. The DMA Write
Channel must be setup to perform a block transfer of "24-DDRHSSPIn_DMFIFOCFG.TXFTH" transfers. Select
the peripheral (in DDRHSSPIn_DMPSEL.PSEL) on which DDRHSSPI shall initiate the transfer.
4. Clear all relevant flags. This finishes the steps in initialization of DDRHSSPI for Direct Mode.
5. Set the DDRHSSPIn_MCTRL.MEN bit, to enable the module.
6. Flush FIFOs to ensure data consistency and avoid any data corruption from previous transfers.
7. When DDRHSSPI is configured, setting the DDRHSSPIn_DMSTART.START bit triggers the start of the serial
transaction. Once the serial transaction starts, if transmission is enabled in the
8. DDRHSSPIn_DMTRP.TRP, the DDRHSSPI reads data from TX-FIFO and loads them to the Shift Register. The
Shift Register is shifted left and the transmit data is shifted-out onto the Serial Interface. If DDRHSSPI is enabled
for Receive operation (in DDRHSSPIn_DMTRP.TRP), the DDRHSSPI receives the serial data with shifting the
Shift Register. The received data assembled in the Shift Register is pushed into the RX-FIFO.
9. Write the data to be transmitted into the TX-FIFO via DDRHSSPIn_TXFIFO0-23 Register address. Before writing
to the DDRHSSPIn_TXFIFO0-23 Register, modify the value of the DDRHSSPIn_DMFIFOCFG.TXCTRL bit
appropriately. Generally (i.e. when the data being written to the TX-FIFO is to be transmitted as it is), the
DDRHSSPIn_DMFIFOCFG.TXCTRL bit shall be "0". Only when in adding some kind of controls such as dummy
cycles, the DDRHSSPIn_DMFIFOCFG.TXCTRL bit shall be set to "1".The write access
toDDRHSSPIn_TXFIFO0-23 shall be performed after the control of the DDRHSSPIn_DMFIFOCFG.TXCTRL bit.
10. Service Requests are asserted by DDRHSSPI whenever the TX-FIFO level is below the threshold or whenever
the DDRHSSPI RX-FIFO level is above the threshold. The software shall write TX-FIFO or read RX-FIFO, to
ensure the serial data transfer of DDRHSSPI. After writing or reading the relevant FIFO, the software shall clear
the Interrupt Service Requests by writing the DDRHSSPIn_TXC or the
11. DDRHSSPIn_RXC Register. DMA Service Requests are cleared by the DMA Controller.
12. If reception is enabled in DDRHSSPIn_DMTRP Register, then the software fetches the received data from the
RX-FIFO.
13. Software judges if current serial transfer has finished, by checking (1)the DDRHSSPIn_TXF.TSSRS bit to be "1"
or(2)the DDRHSSPIn_DMBCS Register value to be0x0000.In the normal course of operation, the software
usually keeps repeating steps from 8 to 11 until the end of serial transfer.
When the software initiates a new serial transfer again, it starts this flow from step 2.
To switch between the Direct Mode and Command Sequencer Mode, or to re-program any of the parameter that
directly affect the serial transfer, the software shall first stop the current transfer and disable the DDRHSSPI (by
resetting DDRHSSPIn_MCTRL.MEN bit to "0"). The software can check the status bit
DDRHSSPIn_TXF.TSSRS to see if the current transfer has finished.