I'm using a ILI9341 TFT display with S32K146EVB-Q144 board.
I tried to use the LCD_TFT project in the S32K cookbook.
I verified in Solace that SPI data is being transmitted but the data is not being displayed on the display. The display just turns ON.
I tested the display with an STM controller, and it was working fine.
How can I solve this issue?
Hi @Arjun2
The LCD & TOUCH TFT Shield Display project from the S32K cookbook is based in the STMPE610. If you need to use the ILI9341 screen instead, you will need to port over the library or required commands for that device.
The functions for the STMPE610 touchscreen can be found in the STMPE610.c file.
Best regards,
Julián
Hi @Arjun2,
I understand you are using functions related to the ILI9341 display, but this device is a third party, which is out of scope for this community's support.
You can use the STMPE610 driver code as reference and search for the ILI9341 driver library to implement instead. I do not think the driver will work directly with your display, as the commands may not be the same.
Best regards,
Julián
Hi @Arjun2,
Add the necessary functions to send the commands and data for the ILI9341.
Will it work?
Yes. There should be no reason why this would not work. Just make sure to send the same commands. You can compare the data frame with the STM controller you mentioned previously.
In the case I need to add a software delay precise to milliseconds. How can I add that to the same project?
The simplest solution is to add a delay function. There are some community posts sharing how to do this. For example: Help:Delay Function for time delay(S32K144) - NXP Community or Solved: Delay function using OSIF - NXP Community.
Or should I create a project, add an OSIF component so that I can get precise delay.
Then add the LPSPI code from the example project and Display codes to this project?
In this case should I add LPSPI component, or can I just copy the SPI code from the example project?
That would also work. I would go with the easiest option for you. I think taking the LPSPI example and adding OSIF component is the simplest solution, but you can implement it however you want.
If you create an OSIF project firstly, you must also add the LPSPI component and the source code for it to work.
Best regards,
Julián
Best
Hi @Arjun2,
Is it possible to compare the frame signal from both the S32K1 and the STM32? Either with an oscillator or logic analyser. This way we can confirm the same data is being sent.
If OSIF implementation is not working, you could try to add clk delays within the SPI driver, you may need to read how the SPI delay works, but there are some existing community posts talking about this feature:
Best regards,
Julián