NXP LPSPI Configuration S32K344 EVB Hi team, I am currently working on LPSPI communication on the S32K344 EVK using NXP RTD 4.0.0. I have completed the required configuration for LPSPI and am trying to develop an SPI loopback communication on the EVK. However, I am currently facing an issue where the data is being transmitted, but I am not receiving the expected data in the RX buffer. I have attached the following for your reference: Project source code Relevant configuration details Could you please go through the attached project and configuration and help me identify the issue? Specifically, I would appreciate your support in checking: LPSPI master/slave configuration LPSPI pin configuration and signal routing TX/RX buffer configuration API usage for LPSPI transmit and receive Any additional configuration required for loopback communication on the S32K344 EVK Please let me know if any additional information or logs are required from my side. Thanks, Raky Re: NXP LPSPI Configuration S32K344 EVB Hi @rakYps21
I reviewed your code and configuration, and I could not find any issues. I also flashed the project onto an FRDM-A-S32K344 board, and as shown in the screenshots below, the RX buffers on both the master and slave sides contain the expected data for both transmissions.
I understand that you are using an S32K3x4EVB board. Could you please let me know which specific EVB variant you are using?
Also, if possible, could you share a picture of the MCU on your board? I would like to check the device marking and mask set.
BR, VaneB Re: NXP LPSPI Configuration S32K344 EVB Hi @VaneB, Thank you for your acknowledgment and for testing the setup from your end. I am currently using the FRDM Automotive S32K344MINI-EVB board HDQFP172 MCU. I have also shared an image of the MCU mounted on the board for your reference. Kindly check and confirm. Please let me know if you need any additional information from my side. Regards, Raky Re: NXP LPSPI Configuration S32K344 EVB Hi @rakYps21
Thank you for sharing the image.
It looks like we are using a very similar setup. To make sure both setups are aligned, could you please double-check that your SPI signals on your setup are connected as shown below and match the pin assignments specified in the FRDM-A-S32K344 Rev. A schematic?
Re: NXP LPSPI Configuration S32K344 EVB Hi @rakYps21
The connections were a little difficult to distinguish in the photo, so I have marked them on the FRDM-A-S32K344 image below using different colors for clarity: brown for CLK, red for PCS, orange for MOSI, and yellow for MISO.
I am also attaching the captured signals so you can verify that the SPI communication is working as expected.
Re: NXP LPSPI Configuration S32K344 EVB @VaneB Also, could you please share images of your setup and the physical connections for reference? Looking forward to your response and further guidance on the issue. BR, Raky Re: NXP LPSPI Configuration S32K344 EVB Hi @VaneB , I have double-checked the SPI signal connections and pin assignments on my setup, and they are configured as specified in the FRDM-A-S32K344. Everything matches the configuration you mentioned. Looking forward to your response and further guidance on the issue. Best regards, Raky Re: NXP LPSPI Configuration S32K344 EVB @VaneB Thank you so much for your support. It is working as expected now. Does LPSPI support internal Loopback for this FRDM-A-S32K344 EVB ? Re: NXP LPSPI Configuration S32K344 EVB I am currently working on interfacing the external NFC reader IC with the NXP S32K344 board. I would now like to establish communication with the external NFC reader instead of using SPI loopback mode. For this, I understand that I need to configure the following hardware interfaces: 1. 3.3 V power supply and common ground 2. NFC_IRQ interrupt signal 3. SPI MOSI, MISO, CLK (SCK), and CS signals Additionally, I need your guidance on implementing the platform-specific functions required by the library, particularly the following: #define platformDelay(t) vTaskDelay(pdMS_TO_TICKS(t)) #define platformGetSysTick() xTaskGetTickCount() #define platformSpiTxRx(txBuf, rxBuf, len) Could you please help clarify the following? 1. What are the recommended hardware connections and GPIO configurations for interfacing the external NFC reader with the NXP S32K344? 2. How should the NFC_IRQ signal be configured and handled on the NXP platform? 3. How should platformGetSysTick() and platformDelay() be implemented to ensure compatibility with the RFAL library? 4. How should platformSpiTxRx() be implemented using the NXP LPSPI driver to transmit and receive data from the NFC reader? 5. Are there any additional platform-specific configurations or initialization steps required to establish communication with the external NFC reader? Your guidance would be greatly appreciated. Thank you for your support. Regards, Raky
View full article