SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The EPI host bus supports both a synchronous and asynchronous interface to PSRAM memory when configured in 16-bit bus multiplexed mode. The EPIHBPSRAM register holds the values for the PSRAM bus configuration (CR) registers. The contents of the EPIHBPSRAM register can be sent to different memories depending on which WRCRE or RDCRE bit is set in the various EPIHB16CFGn registers. For example, if the WRCRE bit is enabled in EPIHB16CFG, then the CRE signal asserts and the contents are sent to the memory enabled by CS0. Enabling the WRCRE or RDCRE bit in EPIHB16CFG2 register activates CS1n during a PSRAM configuration register write or read. The WRCRE and RDCRE bit in EBIHB16CFG3 corresponds to CS2n and EPIHB16CFG4, to CS3n. The WRCRE bit clears when the transfer is done. There must not be any system access or nonblocking read activity during the CRE read or write-enable transfer. During a write to the PSRAM's CR, the configuration data is written out on data pins [20:0] of the EPI bus. For a PSRAM configuration read access, the RDCRE bit in the EPIHB16CFG register is set to signal that the next access is a read of the PSRAM configuration register (CR). The address for the CR is written to bits CR[19:18] of the EPIHBPSRAM register. The read data is returned at CR bits [15:0] of the EPIHBPSRAM register.
NOTE
These steps initialize the PSRAM interface:
NOTE
If the PSRAM CR register must be reprogrammed after initialization, the application should allow the previous transfer to complete before beginning configuration to ensure proper PSRAM functionality.
Latency Counter | Latency in Clocks | RDWS[1:0]/WRWS[1:0] | RWSM/WRWSM |
---|---|---|---|
BCR Code 2 | 3 | 0x0 | 0 |
BCR Code 3 | 4 | 0x1 | 1 |
BCR Code 4 | 5 | 0x1 | 0 |
BCR Code 5 | 6 | 0x2 | 1 |
BCR Code 6 | 7 | 0x2 | 0 |
BCR Code 8 | 9 | 0x3 | 0 |
In variable initial latency mode, the memory's WAIT (iRDY) pin guides the EPI module when to read and write. The WAIT (iRDY) pin stalls the access for the duration of the latency and adds cycles if there is a refresh collision. To get the best performance, set CR[13:11] = 0x2, the WRWS field of the EPIHB16CFG register to 0x0, and the WRWSM and RDWSM bit of the EPI16TIMEn register to 0. For the WAIT pin to be recognized correctly, set the IRDYDLY bit in the EPI16TIMEn register to 1 and the CR[8] = 1 in the EPIHBPSRAM register.
NOTE
Wait state latency works differently in PSRAM Burst mode than in other modes. In PSRAM Burst mode, the RDWS and WRWS bit fields define the latency for only the first access of the write or read cycle. Every access after that is a single access.
Figure 16-7 and Figure 16-8 depict a PSRAM burst read and write.
If a read or write transfer attempts to begin during a refresh event, the transfer is held off by the assertion of the iRDY pin by the memory to the EPI module. Figure 16-9 and Figure 16-10 depict the delay in data transfer during a refresh collision.