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
Hi @Julián_AragónM ,
Certainly, we can compare the data send in both S32 and STM32. I have attached the screenshots for your reference.
Can I add a component to an example project. I tried but I'm not able to do so.
This is for the S32K
This is the S32K
This is for the STM32
Hi @Arjun2
This is clearly not the same frame or commands being sent. Have you ported over the display's library?
There are some public repos and posts with the necessary commands to initialize the display. For example: ILI9341 TFT-LCD Initialization commands.
As I've said before, I cannot help you initialize the display, since this is a third-party device and we cannot test it, but if you have any issues with the SPI module, I can help.
You mentioned you cannot add a component to an example project; can you share the procedure you are using?
Best regards,
Julián
Hey @Julián_AragónM ,
There's been an update. I was playing around with delays and the display started working. But not completely, but there's progress.
When I'm flashing the code the display changes from a white screen to you can say display noise (small black and white parallel lines).
I'm also getting a warning as " No source available for "0x410" "
Hi @Arjun2,
Sorry for the delayed response. Could you share where is the "No source available for "0x410"" warning being shown?