cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Display's parameters ?

ihsanoglu
Senior

In applications for STM32f746-disco board, the display's parameters in rk043fn48h.h are as the following:

/** 
  * @brief  RK043FN48H Timing  
  */  
#define  RK043FN48H_HSYNC            ((uint16_t)41)   /* Horizontal synchronization */
#define  RK043FN48H_HBP              ((uint16_t)13)   /* Horizontal back porch      */
#define  RK043FN48H_HFP              ((uint16_t)32)   /* Horizontal front porch     */
#define  RK043FN48H_VSYNC            ((uint16_t)10)   /* Vertical synchronization   */
#define  RK043FN48H_VBP              ((uint16_t)2)    /* Vertical back porch        */
#define  RK043FN48H_VFP              ((uint16_t)2)    /* Vertical front porch       */
 
/** 
  * @brief  RK043FN48H frequency divider  
  */    
#define  RK043FN48H_FREQUENCY_DIVIDER    5            /* LCD Frequency divider      */

While in the datasheet of the display, the timing parameters are stated as the following

0690X000009jrqBQAQ.png

You can check the datasheet from this link https://mikrocontroller.bplaced.net/wordpress/wp-content/uploads/2018/01/RK043FN48H-CT672B-V1.0.pdf

Could someone please explain the relation between timings stated in datasheet and the parameters configured in the code.

I need to find the correct values for another display. And I can't manage to understand the relation between datasheet and code values.

Please remember that the clock speed for the LTDC is set to 9.6 MHz.

3 REPLIES 3
Martin KJELDSEN
Chief III

Hi @Abdullah İhsanoğlu​,

Which application was this? How did you create it? I wouldn't bet on the parameters being the same across all applications for the STM32F746-DISCO board. You've got some demos int he cube firmware packs, you've got demos/examples from the TouchGFX designer.

/Martin

Its just an empty project for STM32F746-DISCO using template 1.1 Version 1.1

N. SANTINI
ST Employee

Hi,

I have to agree with you, these values are quite unexpected given the display's datasheet and the AN4861...

I would expect something like :

#define HSYNC   ((uint16_t) 1)  /* Horizontal synchronization */

#define HBP    ((uint16_t) 43) /* Horizontal back porch  */

#define HFP    ((uint16_t) 😎  /* Horizontal front porch  */

#define VSYNC   ((uint16_t) 10) /* Vertical synchronization */

#define VBP    ((uint16_t) 12) /* Vertical back porch  */

#define VFP    ((uint16_t) 4)  /* Vertical front porch  */

Since I am quite curious, I put these values instead of the default one in one of the F7 Cube firmware demo (STM32Cube_FW_F7_V1.15.0\Projects\STM32746G-Discovery\Applications\STemWin\STemWin_acceleration).

The result is the same, no glitch on display, so I guess this display is quite flexible regarding its timings. 

Since these settings come directly from the team that chose the display and built the example I would expect that they fine tuned the values, keep in mind that displays have some tolerances on these values (min/max).

If I cannot explain them I can tell you that the expected values (as exaplined in AN4861) are also working fine.

So for your own display i would suggest to follow the AN4861 (Rev 2, Section 4.7.2) and just enter the typical values for horizontal Sync Width, back porch, etc from your display's datasheet into the CubeMX tool (LTDC configuration - Parameter settings).

Best regards,

Nicolas SANTINI

STMicroelectronics

T.O.M.A.S. - Technically Oriented Microcontroller Application Services