2021-04-23 01:50 AM
I've been trying to get anything on the screen for 2 weeks, several hours of coding/trying/reading/watching a day, and still have nada. Other than manually activating backlight after moving backlight enable resistor to GPIO pin. But my primary question for now is the following: I can start the project in CubeIDE with initializing peripherals for my Disco board, but if I don't, there is no way for me to find all the LCD specs for DSI/LTDC.
What modes does my screen support? What latencies does it support (CAS latencies and stuff)? What DSI frequency is max? This information is not anywhere to be found. It's not in any datasheets, both MCU and disco's, it's not in any reference manuals, it's impossible to google it out (I spent a good hour trying all possible word combinations and didn't get anything near what I need). So where do I get the specs of the display of STM32F469i disco?
Solved! Go to Solution.
2021-04-23 07:10 AM
27,429,000 / 832 / 550 = 59.94 Hz
The requirements for the DSI is that it clocks at least as fast as the data is delivered out the LTDC
27,429,000 * 16 bpp = 438,864,000 bps
27,429,000 * 24 bpp = 658,296,000 bps
DSI ceiling for the STM32F4 / F7 / H7 is 1Gbps (2 lanes 500Mbps)
The DSI clocks up to 250 MHz data on both edges
http://www.orientdisplay.com/pdf/OTM8009A.pdf
2021-04-23 03:05 AM
Hello @ilyus and welcome to the STM32 Community =)
I recommend to take a look at these resources available on the ST website:
Hope this helps you.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-23 05:16 AM
This is pretty useless information, I've read all of this several times. These are specs of MCU, not specs of DISPLAY. The fact that MCU can output 9000 different frequencies doesn't mean this specific display supports them. So sorry, your answer is not correct :(
2021-04-23 06:54 AM
Aren't there actual worked examples? Setting the DSI to two lanes, 500 MHz, and perhaps a pixel clock in the 27 MHz region?
16 bits at 62.5 MHz = 1Gbps
27 MHz / 800 / 480 = 70 Hz, assume this gets close to 60 Hz with exact line totals
Aren't these all in the OTM8009A sources and related include files?
STM32Cube_FW_F4_V1.24.0\Drivers\BSP\Components\otm8009a\otm8009a.c
STM32Cube_FW_F4_V1.24.0\Drivers\BSP\STM32469I-Discovery\stm32469i_discovery_lcd.c
And the Kiss of Death screen?
KoD KM-040TMP-02-0621 (WVGA)
https://community.st.com/s/question/0D50X00009XkYPw/km040tmp02a
/* Width and Height in Portrait mode */
#define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */
#define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */
/* Width and Height in Landscape mode */
#define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */
#define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */
/**
* @brief OTM8009A_480X800 Timing parameters for Portrait orientation mode
*/
#define OTM8009A_480X800_HSYNC ((uint16_t)2) /* Horizontal synchronization */
#define OTM8009A_480X800_HBP ((uint16_t)34) /* Horizontal back porch */
#define OTM8009A_480X800_HFP ((uint16_t)34) /* Horizontal front porch */
#define OTM8009A_480X800_VSYNC ((uint16_t)1) /* Vertical synchronization */
#define OTM8009A_480X800_VBP ((uint16_t)15) /* Vertical back porch */
#define OTM8009A_480X800_VFP ((uint16_t)16) /* Vertical front porch */
/**
* @brief OTM8009A_800X480 Timing parameters for Landscape orientation mode
* Same values as for Portrait mode in fact.
*/
#define OTM8009A_800X480_HSYNC OTM8009A_480X800_VSYNC /* Horizontal synchronization */
#define OTM8009A_800X480_HBP OTM8009A_480X800_VBP /* Horizontal back porch */
#define OTM8009A_800X480_HFP OTM8009A_480X800_VFP /* Horizontal front porch */
#define OTM8009A_800X480_VSYNC OTM8009A_480X800_HSYNC /* Vertical synchronization */
#define OTM8009A_800X480_VBP OTM8009A_480X800_HBP /* Vertical back porch */
#define OTM8009A_800X480_VFP OTM8009A_480X800_HFP /* Vertical front porch */
/**
* @brief Initializes the DSI LCD.
* The ititialization is done as below:
* - DSI PLL ititialization
* - DSI ititialization
* - LTDC ititialization
* - OTM8009A LCD Display IC Driver ititialization
* @retval LCD state
*/
uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation)
{
DSI_PLLInitTypeDef dsiPllInit;
DSI_PHY_TimerTypeDef PhyTimings;
static RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
uint32_t LcdClock = 27429; /*!< LcdClk = 27429 kHz */
uint32_t laneByteClk_kHz = 0;
uint32_t VSA; /*!< Vertical start active time in units of lines */
uint32_t VBP; /*!< Vertical Back Porch time in units of lines */
uint32_t VFP; /*!< Vertical Front Porch time in units of lines */
uint32_t VACT; /*!< Vertical Active time in units of lines = imageSize Y in pixels to display */
uint32_t HSA; /*!< Horizontal start active time in units of lcdClk */
uint32_t HBP; /*!< Horizontal Back Porch time in units of lcdClk */
uint32_t HFP; /*!< Horizontal Front Porch time in units of lcdClk */
uint32_t HACT; /*!< Horizontal Active time in units of lcdClk = imageSize X in pixels to display */
/* Toggle Hardware Reset of the DSI LCD using
* its XRES signal (active low) */
BSP_LCD_Reset();
/* Call first MSP Initialize only in case of first initialization
* This will set IP blocks LTDC, DSI and DMA2D
* - out of reset
* - clocked
* - NVIC IRQ related to IP blocks enabled
*/
BSP_LCD_MspInit();
/*************************DSI Initialization***********************************/
/* Base address of DSI Host/Wrapper registers to be set before calling De-Init */
hdsi_eval.Instance = DSI;
HAL_DSI_DeInit(&(hdsi_eval));
#if !defined(USE_STM32469I_DISCO_REVA)
dsiPllInit.PLLNDIV = 125;
dsiPllInit.PLLIDF = DSI_PLL_IN_DIV2;
dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1;
#else
dsiPllInit.PLLNDIV = 100;
dsiPllInit.PLLIDF = DSI_PLL_IN_DIV5;
dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1;
#endif
laneByteClk_kHz = 62500; /* 500 MHz / 8 = 62.5 MHz = 62500 kHz */
/* Set number of Lanes */
hdsi_eval.Init.NumberOfLanes = DSI_TWO_DATA_LANES;
/* TXEscapeCkdiv = f(LaneByteClk)/15.62 = 4 */
hdsi_eval.Init.TXEscapeCkdiv = laneByteClk_kHz/15620;
HAL_DSI_Init(&(hdsi_eval), &(dsiPllInit));
...
2021-04-23 06:55 AM
Hi @ilyus ,
I'm sorry that I couldn't help you.
In fact, LCD specs are generally confidential, this is why it is difficult to find documentation.
I would therefore advise you to contact the LCD display provider, they may help you more about the specs.
Imen
2021-04-23 07:07 AM
thanks for this info. Unfortunately, I couldn't find any examples still relevant, they are all for cubemx of ancient versions, there is literally not a single example that I can compile - I've tried a few of them (actually, ALL of them that you can find in google), and they were all heavily bugged and totally non-functional. Some of them even produced a picture, sometimes distorted, sometimes not, those that did still were unstable and hanged after 3 seconds and stuff, but I still can't figure how to make even 1 pixel show up. I followed some manuals, but it seems like none of the manuals are actually compatible with 469.
Still, your reply has almost 0 information on display spec. I have calculated necessary frequency long ago. But I have no idea what frequencies display actually supports, does it run at 10MHz? Does it run at 100MHz? I have no clue. I have no idea what synchronization widths/heights and porches are, I have no idea what signal polarity should be (active high? active low?). Default configuration for CubeIDE seems to be wrong, default configuration also sets up the 800x480 display in 200x480 mode in LTDC (and why the h is that?!). And even tho I follow the exact logic of 746 discovery with the exception of resolution (that I fixed; tried original resolution too - doesn't work either), I have still pitch black screen. External SDRAM is working, but I have no image. Already ordered 746 discovery, I figured there is something clearly wrong about 469 - lack of examples of integration into cubeide/touchgfx, not enough documentation (no datasheet for LCD panel) and overall weirdness of the thing. It's a pity such an expensive board feels like a waste, especially because the other one costs around the same money and has 9000 examples and everything - literally ANYTHING you google is about 746 and nothing else. I guess I'll have to wait until another development board arrives, 469 seems to be inadequately supported. Big sad.
Alright, your settings provide some info on display settings (MCU side again, not LCD specs with full list of acceptable values), but there is still not a single working fully compilable example for this board, it's just disappointing after TWO WEEKS of 5 hours every day I still can't make even a single pixel show up, and I have no idea what I'm doing wrong. Let's hope I can run something on 746 and maybe reproduce something too.
P.S. pardon my expressiveness, it had been building up for a while, let some steam off. Which doesn't change the fact that my points still hold
2021-04-23 07:10 AM
27,429,000 / 832 / 550 = 59.94 Hz
The requirements for the DSI is that it clocks at least as fast as the data is delivered out the LTDC
27,429,000 * 16 bpp = 438,864,000 bps
27,429,000 * 24 bpp = 658,296,000 bps
DSI ceiling for the STM32F4 / F7 / H7 is 1Gbps (2 lanes 500Mbps)
The DSI clocks up to 250 MHz data on both edges
http://www.orientdisplay.com/pdf/OTM8009A.pdf
2021-04-23 07:26 AM
This document is DEFINITELY something I needed, thank you. Maybe today I'll crack this thing with this datasheet. Much appreciated!
(I don't care about DSI clock ceiling on MCU side, I care about how quickly LCD can go, with MCU I always had datasheet and reference manual, while before you I had zero info on screen's capabilities)
2021-04-23 07:28 AM
>> but there is still not a single working fully compilable example for this board
The sync and porch info is in OTM8009A include files, and aren't hard to derive.
I guess I'd be angry if I spent 2 weeks on a task that might take 20 minutes if I had to download and install Keil too.
There are a handful of buildable examples that don't need CubeMX or CubeIDE, they use the underlying HAL and build in professional tools like Keil or IAR from the supplied project files.
STM32Cube_FW_F4_V1.24.0\Projects\STM32469I-Discovery\Applications\Display\LCD_Paint
STM32Cube_FW_F4_V1.24.0\Projects\STM32469I-Discovery\Applications\Display\LCD_AnimatedPictureFromSDCard
The docs for the panel are somewhat lacking due to the somewhat retasked use, ie a cheap mass-produced phone screen for another user/market
It is the same panel as that used for the F769 daughter board DSI screen.
2021-04-23 07:33 AM
I was planning to go with CubeIDE + TouchGFX combination. Tbh I have no idea how to integrate Keil and TouchGFX, it will take some research. I guess, the likelihood of me trying this combo will depend on my desperation. Probably around the moment when I learn memory address for all registers, which in my tempo is bound to happen sooner rather than later, considering I have 10 tabs with different datasheets open at all times haha.
Thanks for the clarification on the display. I already calmed down a little and I'm more willing to try to tackle this stuff again, pretty sure it will be some 4 hours without result again, but oh well. I have still no clue what I did wrong and I'm sure I did everything right (within my knowledge, at least I can reason why I did everything I did and things make full sense to me - but don't work), but we'll see how it goes this evening with screen controller's datasheet at hand (provided below).