Hello all,
I am just a beginner for S32K344 and trying to communicate with external flash. I control NSS with GPIO myself. I try to read device's ID which consists of 2 step:
1 - Send ID read command to the external flash
2 - Read 3 bytes back from the external flash
I send the following commands;
FLASH_NSS_LOW();
Spi_SetupEB(0u, CommandArray, NULL, 1u);
Spi_SyncTransmit(SpiConf_SpiSequence_FlashSpiSequence);
Spi_SetupEB(0u, NULL, ReadArray, 3u);
Spi_SyncTransmit(SpiConf_SpiSequence_FlashSpiSequence);
FLASH_NSS_HIGH();
Is this sequence correct? Because whenever i send Spi_SyncTransmit command, i receive an abnormal pulse. I checked the forums i came to this topic;
https://community.nxp.com/t5/S32K/S32K3-SPI-CS-problem-when-using-GPIO-to-simulate-CS/td-p/1564367
Therefore, i removed FLASH_NSS_LOW to Lpspi_TransmitTxInit after State->TxIndex = 0u;
So, when i send the first command the pulse is ignored, however when i send the second Spi_SyncTransmit another pulse just messes up my command.
I would appreciate any help at this stage.
Thank you,
Hi @S3RD4R ,
Sorry for the late response, this topic was missed in my support list,
Your sequence seems correct if you use external buffer, despite that I'm not sure what is FLASH_NSS_LOW and FLASH_NSS_HIGH in your source code.
If the issue you faced is the same with https://community.nxp.com/t5/S32K/S32K3-SPI-CS-problem-when-using-GPIO-to-simulate-CS/td-p/1564367, the simple workaround is remove macro ERR_IPV_LPSPIV2_0001 from the compiling process.