Hi,
I'm working in a project with STM32f429ZIT6 and it controls a TFT LCD.
I have a developed code from my old colleague and it works (with STM32F429 DISCOVERY board) and I can see through a chinese TFT (TFT 1) which I want. Ok.
Currently I want to test another TFT (TFT 2) which has the same (exactly the same) pinout but I see blurred image and blinking. So, I compare the clock of the datasheet in each other, and it seems the first TFT works with falling egde clock and the second with rising edge clock.
So, how I can change this configuration? is it possible?
My TFTLCD_Init is configured as:
(I don't know why I can see here the code line to line instead of in a one line ?( )
Thanks
I'm working in a project with STM32f429ZIT6 and it controls a TFT LCD.
I have a developed code from my old colleague and it works (with STM32F429 DISCOVERY board) and I can see through a chinese TFT (TFT 1) which I want. Ok.
Currently I want to test another TFT (TFT 2) which has the same (exactly the same) pinout but I see blurred image and blinking. So, I compare the clock of the datasheet in each other, and it seems the first TFT works with falling egde clock and the second with rising edge clock.
So, how I can change this configuration? is it possible?
My TFTLCD_Init is configured as:
C Source Code
- void TFTLCD_Init(void){ uint8_t i = 0; /* GPIO pin configuration */ while(GPIOInitTable[i] != 0){ gpio_conf(GPIOInitTable[i], PINInitTable[i], MODE_AF, TYPE_PUSHPULL, SPEED_100MHz, PULLUP_NONE, AFInitTable[i]); i++; } /* PLL */ RCC->PLLSAICFGR = (200 << 6) | (7 << 24) | (4 << 28); /* Enable SAI PLL */ RCC->CR |= RCC_CR_PLLSAION; /* wait for SAI PLL ready */ while((RCC->CR & RCC_CR_PLLSAIRDY) == 0); /* enable clock for LTDC */ RCC->APB2ENR |= RCC_APB2ENR_LTDCEN; /* Synchronization Size Configuration */ LTDC->SSCR = ((HSYNC - 1) << 16) | (VSYNC - 1); /* Back Porch Configuration */ LTDC->BPCR = ((HBP - 1) << 16) | (VBP - 1); /* Active Width Configuration */ LTDC->AWCR = (ACTIVE_W << 16) | (ACTIVE_H); /* Total Width Configuration */ LTDC->TWCR = (TOTAL_WIDTH << 16) | (TOTAL_HEIGHT); /* Window Horizontal Position Configuration */ LTDC_Layer1->WHPCR = HBP | ((HBP + LCD_WIDTH - 1) << 16); /* Window Vertical Position Configuration */ LTDC_Layer1->WVPCR = VBP | ((VBP + LCD_HEIGHT - 1) << 16); /* Pixel Format Configuration */ LTDC_Layer1->PFCR = 2; /* Color Frame Buffer Address */ LTDC_Layer1->CFBAR = SDRAM_BASE; /* Color Frame Buffer Length */ LTDC_Layer1->CFBLR = ((LCD_WIDTH * PIXELWIDHT) << 16) | ((LCD_WIDTH * PIXELWIDHT) + 3); /* Enable Layer */ LTDC_Layer1->CR = LTDC_LxCR_LEN; /* Immediate Reload */ LTDC->SRCR = LTDC_SRCR_IMR; /* Enable LTDC */ LTDC->GCR = LTDC_GCR_LTDCEN; /* Enable dither */// LTDC->GCR = LTDC_GCR_DTEN;}
(I don't know why I can see here the code line to line instead of in a one line ?( )
Thanks
The post was edited 1 time, last by hibiscusblau ().