GRAPH: Random pixels at borders

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

    • GRAPH: Random pixels at borders

      Hello,
      in a GRAPH widget I want to display a scale in the border area.
      I have added 10 pixels border on the right and on the bottom side.
      In these border areas frequently appear random pixels. Did I miss something in my initialization?

      Regards
      Jan


      Source Code

      1. hGraph = WM_GetDialogItem(pMsg->hWin, ID_GRAPH);
      2. GRAPH_SetAutoScrollbar(hGraph, GUI_COORD_X, 0); /*disable GRAPH hor. scrollbar*/
      3. GRAPH_SetAutoScrollbar(hGraph, GUI_COORD_Y, 0); /*disable GRAPH vert. scrollbar*/
      4. GRAPH_SetColor(hGraph, GUI_GRAY, GRAPH_CI_GRID);
      5. GRAPH_SetColor(hGraph, GUI_GRAY, GRAPH_CI_FRAME);
      6. GRAPH_SetColor(hGraph, GUI_BLACK, GRAPH_CI_BORDER);
      7. GRAPH_SetColor(hGraph, GUI_BLACK, GRAPH_CI_BK);
      8. GRAPH_SetGridFixedX(hGraph, 1);
      9. GRAPH_SetGridDistX(hGraph, (FFTWidthMaCon) / 10);
      10. GRAPH_SetGridDistY(hGraph, FFTVerSizeMaCon / 8);
      11. GRAPH_SetGridVis(hGraph, 1);
      12. GRAPH_SetLineStyleH(hGraph, GUI_LS_DOT);
      13. GRAPH_SetLineStyleV(hGraph, GUI_LS_DOT);
      14. GRAPH_SetBorder(hGraph, 0, 0, 10, 10);
      15. hScaleH = GRAPH_SCALE_Create(FFTVerSizeMaCon, GUI_TA_CENTER, GRAPH_SCALE_CF_HORIZONTAL, FFTWidthMaCon / 10); /*create hor. scale*/
      16. GRAPH_SCALE_SetTextColor(hScaleH, GUI_WHITE);
      17. GRAPH_SCALE_SetFont(hScaleH, GUI_FONT_10_1);
      18. GRAPH_SCALE_SetNumDecs(hScaleH, 0); /*no digits after decimal point*/
      19. GRAPH_SCALE_SetFactor(hScaleH, 200.0 / (float)(FFTWidthMaCon - 1));
      20. GRAPH_AttachScale(hGraph, hScaleH);
      Display All
    • Hello Jan,

      Which device are you using and which emWin driver?

      It looks a bit like as if the data where not entirely written into the framebuffer but reside in the CPU cache.

      For example, on STM32 devices devices we call SCB_CleanInvalidateDCache() before any DMA2D operation to ensure the data is properly written into the RAM.

      Best regards,
      Sven
      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.