emWin with ILI9341 Graphic problem

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

    • emWin with ILI9341 Graphic problem

      Hello,
      I have made an STemWin example with STM32F407 and ILI9341 with SPI interface.
      I think that there is an graphic driver problem. The graphics are not sharp. What Could be the correct driver settings ?
      My settings are;
      pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565, 0, 0);
      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B8);
      Images
      • image.jpg

        244.35 kB, 1,280×960, viewed 568 times
    • Hi,

      Hard to say what's going wrong here.

      I suggest to double check your routines for writing and reading data, set in the PortAPI struct.

      Please try the code below.

      C Source Code

      1. void MainTask(void) {
      2. GUI_RECT Rect = { 0, 0, 49, 49 };
      3. GUI_COLOR aColor[] = { GUI_RED, GUI_GREEN, GUI_BLUE };
      4. char * apColor[GUI_COUNTOF(aColor)] = { "Red", "Green", "Blue" };
      5. unsigned i;
      6. GUI_Init();
      7. GUI_SetTextMode(GUI_TM_TRANS);
      8. for (i = 0; i < GUI_COUNTOF(aColor); i++) {
      9. GUI_SetColor(aColor[i]);
      10. GUI_FillRectEx(&Rect);
      11. GUI_SetColor(GUI_WHITE);
      12. GUI_DispStringInRect(apColor[i], &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
      13. GUI_MoveRect(&Rect, Rect.x1 - Rect.x0 + 1, Rect.y1 - Rect.y0 + 1);
      14. }
      15. GUI_MoveRect(&Rect, -(Rect.x1 - Rect.x0 + 1), -(Rect.y1 - Rect.y0 + 1));
      16. GUI_SetColor(GUI_WHITE);
      17. GUI_DrawLine(0, ((Rect.y1 - Rect.y0 + 1) << 1) - 1, ((Rect.x1 - Rect.x0 + 1) << 1) - 1, 0);
      18. GUI_DispStringAt("Test", 0, (Rect.y0 + Rect.y1) >> 1);
      19. GUI_DispStringAt("Test", (Rect.x0 + Rect.x1) >> 1, 0);
      20. GUI_InvertRect(10, 10, Rect.x1 - 10, Rect.y1 - 10);
      21. while (1) {
      22. GUI_Exec();
      23. }
      24. }
      Display All
      The output should like on screenshot attached (simulation).

      Best regards,
      Sven
      Images
      • TestScreen.png

        4.03 kB, 226×208, viewed 548 times
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.