Movie colors issue

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Movie colors issue

    Hi Segger team and users,

    I have a problem with colors while running stemwin with ili9488 controller on a 320*480 TFT,
    the colors are ok while running static images or colors , I run the
    COLOR_ShowColorBar demo and I see that colors are correct.
    but the problem starts to appear when I run videos , I always see the yellow
    color turned to blue.
    this problem only happens when running videos , I used the MOVIE_ShowFeatures Demo as a test.
    I use those settings as suggested by segger.
    color conversion : GUICC_565
    flex color driver : GUIDRV_FLEXCOLOR_F66709
    pfmode : GUIDRV_FLEXCOLOR_M16C0B16
    I am doing the interface with stm32f407 processor while defining memory like that
    #define GUI_NUMBYTES (1024) * 100
    my heap and stack are configured to be 2000 byte each.
    and I tried several initialization sequences from forums and also from the TFT supplier , but
    got same output.
    Heres' the current initialization sequence.

    C Source Code

    1. /* PGAMCTRL (Positive Gamma Control) (E0h) */
    2. LCD_WriteReg(0xE0);
    3. LCD_WriteData(0x00);
    4. LCD_WriteData(0x07);
    5. LCD_WriteData(0x0f);
    6. LCD_WriteData(0x0D);
    7. LCD_WriteData(0x1B);
    8. LCD_WriteData(0x0A);
    9. LCD_WriteData(0x3c);
    10. LCD_WriteData(0x78);
    11. LCD_WriteData(0x4A);
    12. LCD_WriteData(0x07);
    13. LCD_WriteData(0x0E);
    14. LCD_WriteData(0x09);
    15. LCD_WriteData(0x1B);
    16. LCD_WriteData(0x1e);
    17. LCD_WriteData(0x0f);
    18. /* NGAMCTRL (Negative Gamma Control) (E1h) */
    19. LCD_WriteReg(0xE1);
    20. LCD_WriteData(0x00);
    21. LCD_WriteData(0x22);
    22. LCD_WriteData(0x24);
    23. LCD_WriteData(0x06);
    24. LCD_WriteData(0x12);
    25. LCD_WriteData(0x07);
    26. LCD_WriteData(0x36);
    27. LCD_WriteData(0x47);
    28. LCD_WriteData(0x47);
    29. LCD_WriteData(0x06);
    30. LCD_WriteData(0x0a);
    31. LCD_WriteData(0x07);
    32. LCD_WriteData(0x30);
    33. LCD_WriteData(0x37);
    34. LCD_WriteData(0x0f);
    35. /* Power Control 1 (C0h) */
    36. LCD_WriteReg(0xC0);
    37. LCD_WriteData(0x10);
    38. LCD_WriteData(0x10);
    39. /* Power Control 2 (C1h) */
    40. LCD_WriteReg(0xC1);
    41. LCD_WriteData(0x41);
    42. /* VCOM Control (C5h) */
    43. LCD_WriteReg(0xC5);
    44. LCD_WriteData(0x00);
    45. LCD_WriteData(0x2c); // VCOM
    46. LCD_WriteData(0x80);
    47. /* Memory Access Control (36h) */
    48. LCD_WriteReg(0x36);
    49. LCD_WriteData(0x08);
    50. /* Interface Pixel Format (3Ah) */
    51. LCD_WriteReg(0x3A); //Interface Mode Control
    52. LCD_WriteData(0x55);
    53. LCD_WriteReg(0xB0); //Interface Mode Control
    54. LCD_WriteData(0x00);
    55. LCD_WriteReg(0xB1); //Frame rate 70HZ
    56. LCD_WriteData(0xB0);
    57. /* Display Inversion Control (B4h) */
    58. LCD_WriteReg(0xB4);
    59. LCD_WriteData(0x02);
    60. /* Display Function Control (B6h) */
    61. LCD_WriteReg(0xB6); //RGB/MCU Interface Control
    62. LCD_WriteData(0x02);
    63. LCD_WriteData(0x22);
    64. /* Set Image Function (E9h) */
    65. LCD_WriteReg(0xE9);
    66. LCD_WriteData(0x00);
    67. /* Adjust Control 3 (F7h) */
    68. LCD_WriteReg(0XF7);
    69. LCD_WriteData(0xA9);
    70. LCD_WriteData(0x51);
    71. LCD_WriteData(0x2C);
    72. LCD_WriteData(0x82);
    73. /* Sleep Out (11h) */
    74. LCD_WriteReg(0x11);
    75. HAL_Delay(150);
    76. /* Display ON (29h) */
    77. LCD_WriteReg(0x29);
    78. ili9488_SetPos(0,0,0,0);
    Display All

    -------------------------------------------------------------------------------
    my read and write functions

    C Source Code

    1. static void LcdWriteReg(U16 Data)
    2. {
    3. LCD_CMD = Data;
    4. }
    5. static void LcdWriteData(U16 Data)
    6. {
    7. LCD_Data = Data;
    8. }
    9. static void LcdWriteDataMultiple(U16 * pData, int NumItems)
    10. {
    11. while (NumItems--)
    12. {
    13. LcdWriteData (*pData++);
    14. }
    15. }
    16. uint16_t ili9488_ReadData()
    17. {
    18. return LCD_Data;
    19. }
    20. static void LcdReadDataMultiple(U16 * pData, int NumItems)
    21. {
    22. while (NumItems--)
    23. {
    24. *pData++ = ili9488_ReadData();
    25. }
    26. }
    Display All


    I tried to minimize the memory seen by stemwin so that I would minimize the memory requirements ,but I got same results
    just smaller screen
    #define XSIZE_PHYS 200
    #define YSIZE_PHYS 200
    please if you need any more information to help me out solving this problem let me know,
    Thanks a lot.
    Amr.