Hello,
I have interfaced the MPC5674F DSPI_C channel with a NOR Flash (S25FL512S). The communication works correctly at 16 MHz, and I am able to read the status register, returning 0x82 as expected. However, when I increase the clock speed to 33 MHz, the data read by the software is incorrect (0xC1 instead of 0x82).
Observations:
I am attaching screenshots of the waveforms for both clock speeds:
Waveform @ 16MHz
Waveform @33 MHz
software_read@33 MHz
software_read@16 MHz
Could you help me identify the root cause of this issue? Specifically, why is the software misinterpreting the correct data at 33 MHz, even though the waveforms appear correct on the oscilloscope? Could this be related to timing, configuration, or any limitations of the DSPI interface at higher clock speeds?
Looking forward to your insights.
Thank you!
Narendra .C
# MPC5674F, #SPI
Solved! Go to Solution.
Hi,
try to use Modified Transfer Format (MTFE=1) and delay sampling of SIN by setting SMPL_PT bits. See more in chapter 24.4.7.3 Modified SPI/DSI Transfer Format (MTFE = 1, CPHA = 0) of the device RM.
BR, Petr
Hi,
try to use Modified Transfer Format (MTFE=1) and delay sampling of SIN by setting SMPL_PT bits. See more in chapter 24.4.7.3 Modified SPI/DSI Transfer Format (MTFE = 1, CPHA = 0) of the device RM.
BR, Petr
Hi @PetrS,
The issue is resolved, and the communication is working fine at 33 MHz after configuring MTFE = 1 and SMPL_PT = 1 as suggested. Thank you for your guidance!
I have a follow-up question:
In the Modified Transfer Format, the master samples data on odd clock cycles. Could this behavior impact the overall performance or data throughput of the system in any way?
Looking forward to your insights.
Best regards,
Narendra
MPC5674F ,#DSPI
Hi,
CPHA specifies sampling edge (odd or even), not MTFE. In MTFE you can delay SIN sampling from selected SCK edge by amount of 1 or 2 system clocks, as shown e.g in Figure 24-31. DSPI Modified Transfer Format (MTFE=1, CPHA=0, fsck = fperiph/4)
This not not affect overall performance or data throughput.
BR, Petr