Hello NXP Community,
we are continuing our investigation of temperature-dependent HyperRAM errors on an S32K328 connected to an Infineon S27KL0642DPBHB023, 8 MiB, 3.3 V.
The interface operates at 120 MHz in Octal DDR mode using external edge-aligned RWDS/DQS. Normal memory access uses the QuadSPI AHB memory-mapped window:
0x68000000 to 0x687FFFFF
Current relevant configuration
------------------------------
QuadSPI SCK = 120 MHz
DDR_EN = 1
DQS_EN = 1
DQS_FA_SEL = 3
DQS_OUT_EN = 1
FLSHCR.TCSS = 2
FLSHCR.TCSH = 5
FLSHCR.TDH = 1
SMPR.DLLFSMPFA = 4
SMPR.FSDLY = 0
SMPR.FSPHS = 0
DLL FREQEN = 0
DLL_CDL8 = 0
DLL_REFCNTR = 2
DLLRES = 8
SLV_DLY_OFFSET = 0
SLV_FINE_OFFSET = 8
SLAVE_AUTO_UPDT = 1
SLV_EN = 1
SLV_DLL_BYPASS = 0
The fine offset of 8 was selected empirically from temperature tests. It is not taken from the zero-offset reference configuration in Data Sheet Rev. 14.
Our current initialization contains this sequence:
Configure QuadSPI and LUT
Configure DLL using auto-update
Perform one dummy AHB read
Perform QuadSPI software reset
Configure DLL again
Read HyperRAM registers using IP commands
Start normal AHB accesses
The dummy read currently performs a volatile 32-bit read first and invalidates the corresponding Cortex-M7 cache line afterwards.
Difference from Data Sheet Rev. 14
----------------------------------
In S32K3xx Data Sheet Rev. 14, Table 66 appears to specify the following for the S32K328 120 MHz DDR, External DQS, Edge Aligned configuration:
FLSHCR.TCSS = 3
FLSHCR.TCSH = 3
FREQEN = 0
DLL_REFCNTR = 2
DLLRES = 8
SLV_DLY_OFFSET = 0
SLV_FINE_OFFSET = 0
SLAVE_AUTO_UPDT = 0
SLV_UPD = 1, according to the RM programming sequence
DLLFSMPFA = 4
FSDLY = 0
This differs from our current TCSS/TCSH = 2/5, fine offset 8 and auto-update mode.
Failure signature
-----------------
Temperature testing still shows occasional memory-test failures even with settings near the center of the measured sampling window.
The reported failures have a repeatable signature:
- A complete 32-byte block is affected.
- When reading address A, the returned block appears to match the expected pattern for address A + 0xFFE0.
- The same signature was reported with several DLL offset/fine settings.
The initialization-time DLL status indicated:
DLLA_LOCK = 1
SLVA_LOCK = 1
DLLA_RANGE_ERR = 0
FINE_UNDERFLOW = 0
We have not yet confirmed that these status values remain unchanged at the exact instant of every memory failure.
The 0xFFE0 displacement is notable because it equals 0x10000 - 0x20, but we do not assume that this proves a 64-KiB wrap or AHB addressing issue.
Questions
---------
1. For the S32K328 at 120 MHz DDR with external edge-aligned DQS, should we use the complete configuration from Data Sheet Rev. 14 Table 66, including:
TCSS/TCSH = 3/3
SLAVE_AUTO_UPDT = 0
SLV_DLY_OFFSET = 0
SLV_FINE_OFFSET = 0
2. Could you confirm the correct FLSHCR.TDH value for this exact Table 66 column?
3. If SLAVE_AUTO_UPDT = 0 is required, what is the exact sequence for:
SLV_EN
SLV_UPD
DLLEN
DLLA_LOCK
SLVA_LOCK
SLV_UPD clear
4. Is the following initialization sequence valid?
DLL configuration
dummy AHB read
QuadSPI software reset
second DLL configuration
first IP access
first AHB memory-mapped access
Or should software reset occur before the only DLL initialization?
5. After clearing SLV_UPD, which DLL lock indications remain valid and should be checked before the first HyperRAM access?
6. Which QuadSPI AHB buffers, FIFOs and sequence pointers must be cleared after software reset, DLL reconfiguration or IP-command access?
7. For the dummy AHB read, should the CPU cache line be invalidated and a DSB executed before the volatile read?
8. Is there any known S32K328 QuadSPI behavior that could return a complete 32-byte block associated with another address, particularly with an apparent displacement of 0xFFE0?
9. Which measurements or register traces would NXP recommend to distinguish between:
read-address generation error
write-address error
stale AHB buffer data
CPU cache coherency
HyperBus address wrapping
external-DQS sampling error
We can provide the complete LUT contents, initialization source and register dumps as attachments.
Thank you.