2019-11-19 02:41 AM
2019-11-19 04:27 AM
The SPI port of the ILI9341 LCD controller is connected to SPI5 on pins PF7(SCK), PF9(MOSI), PC2(CS#). MISO is not used, the interface is half duplex.
Modify the ili9341_Init() function (in the STM32CubeF4 BSP library) to use the internal GRAM instead of the LCD interface. I think just skipping the LCD_INTERFACE command would do it. Review http://www.displayfuture.com/Display/datasheet/controller/ILI9341.pdf
Now you should be able to write pixel data directly to the LCD through SPI5 using the write memory (0x2C) and write memory continue (0x3C) commands, without allocating a frame buffer on the STM32.
2019-11-19 05:01 AM
You can use also the parallel interface to ILI9341 (and use its internal GRAM), although the pins are not connected conveniently to use FMC, you still can manipulate them through GPIO as needed.
JW
2019-11-19 05:22 AM
The communication mode is controlled by some resistor bridges, so this involves reconfiguring those bridges on the board.
2019-11-26 11:44 PM
thanks for useful reply.
I have problem for initialization LCD and send the data to the LCD. When I pushed the data to LCD, LCD is going to the background color is black(default color).
I have used BSP LCD driver. in this driver LCD initialization used BSP_SDRAM_init() . so its not woking when i am remove this form function lcd display is going to black.
uint8_t BSP_LCD_Init(void)
{
/* On STM32F429I-DISCO, it is not possible to read ILI9341 ID because */
/* PIN EXTC is not connected to VDD and then LCD_READ_ID4 is not accessible. */
/* In this case, ReadID function is bypassed.*/
/*if(ili9341_drv.ReadID() == ILI9341_ID)*/
/* LTDC Configuration ----------------------------------------------------*/
LtdcHandler.Instance = LTDC;
/* Timing configuration (Typical configuration from ILI9341 datasheet)
HSYNC=10 (9+1)
HBP=20 (29-10+1)
ActiveW=240 (269-20-10+1)
HFP=10 (279-240-20-10+1)
VSYNC=2 (1+1)
VBP=2 (3-2+1)
ActiveH=320 (323-2-2+1)
VFP=4 (327-320-2-2+1)
*/
/* Configure horizontal synchronization width */
LtdcHandler.Init.HorizontalSync = ILI9341_HSYNC;
/* Configure vertical synchronization height */
LtdcHandler.Init.VerticalSync = ILI9341_VSYNC;
/* Configure accumulated horizontal back porch */
LtdcHandler.Init.AccumulatedHBP = ILI9341_HBP;
/* Configure accumulated vertical back porch */
LtdcHandler.Init.AccumulatedVBP = ILI9341_VBP;
/* Configure accumulated active width */
LtdcHandler.Init.AccumulatedActiveW = 269;
/* Configure accumulated active height */
LtdcHandler.Init.AccumulatedActiveH = 323;
/* Configure total width */
LtdcHandler.Init.TotalWidth = 279;
/* Configure total height */
LtdcHandler.Init.TotalHeigh = 327;
/* Configure R,G,B component values for LCD background color */
LtdcHandler.Init.Backcolor.Red= 0;
LtdcHandler.Init.Backcolor.Blue= 0;
LtdcHandler.Init.Backcolor.Green= 0;
/* LCD clock configuration */
/* PLLSAI_VCO Input = HSE_VALUE/PLL_M = 1 Mhz */
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 192 Mhz */
/* PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 192/4 = 48 Mhz */
/* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_8 = 48/4 = 6Mhz */
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
PeriphClkInitStruct.PLLSAI.PLLSAIN = 192;
PeriphClkInitStruct.PLLSAI.PLLSAIR = 4;
PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_8;
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
/* Polarity */
LtdcHandler.Init.HSPolarity = LTDC_HSPOLARITY_AL;
LtdcHandler.Init.VSPolarity = LTDC_VSPOLARITY_AL;
LtdcHandler.Init.DEPolarity = LTDC_DEPOLARITY_AL;
LtdcHandler.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
BSP_LCD_MspInit();
HAL_LTDC_Init(&LtdcHandler);
/* Select the device */
LcdDrv = &ili9341_drv;
/* LCD Init */
LcdDrv->Init();
/* Initialize the SDRAM */
BSP_SDRAM_Init();
/* Initialize the font */
BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
return LCD_OK;
}
Please tell me, can I use BSP LCD driver with out using SDRAM or another way to do it.@berendi @Community member please sir.
2019-11-27 12:33 AM
The BSP_LCD functions are not useful in this case at all, because they assume the RGB interface which needs plenty of available RAM to read the framebuffer from.
Configure SPI5 to talk to the LCD panel, then modify ili9341_Init(), remove the part that configures the RGB interface. Then you have to write your own functions that write data to the LCD panel through SPI5.
2019-12-02 09:26 PM
hello dear,
I have more tried using SPI5 but I have problem in initialization of LCD.
thanks
rajat.
2019-12-02 11:09 PM
As this is an atypical use case you might have to work through your problems.