GUI_CopyRect is not working in STemWin (STM32F7)

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

  • GUI_CopyRect is not working in STemWin (STM32F7)

    Hi,

    Used the STemWin with quite a few demos on STM32F746G-Discovery so far succesfully, yet it seems that the GUI_CopyRect is not working.

    Tested it with many code variations but no rectangle nomatter small or large, overlapping or not, could be copied.

    This code supposedly copies the "Hello world!" phrase on STemWin hello world example application but it is not doing anything at all..

    Source Code

    1. void MainTask(void) {
    2. int i,j;
    3. GUI_Clear();
    4. GUI_SetFont(&GUI_Font20_1);
    5. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
    6. // GUI_CopyRect here should copy the phrase 50 pixels below, yet it does nothing
    7. GUI_CopyRect((LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2,
    8. (LCD_GetXSize()-100)/2, 50 + (LCD_GetYSize()-20)/2, 100, 20);
    9. while(1);
    10. }
    Display All



    Can someone tell me how can we make the GUI_CopyRect work properly?

    Regards,
    Christos

    The post was edited 1 time, last by Christos ().

  • Hi,

    May there is a custom function for the copy operation is set in the configuration file LCDConf.c and may that function does not work:

    LCD_SetDevFunc(i, LCD_DEVFUNC_COPYRECT, (void(*)(void))pfCustomFunction);

    You could comment out that function call to check if that is the cause.

    Regards, Jörg
    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.
  • Hi Jörg and thanks,

    Yes, that did made it to show up.
    Though, as I've seen around the sources, there are a few CUSTOM_* functions (4 I think) that take advantage of the DMA2D controller and make things faster.
    By commenting out the CUSTOM_CopyRect, I guess a plain memcpy happens at the standard implementation, thus its way too slow for my application.
    Is there something we can do about this?

    Regards,
    Christos
  • Hi Christos,

    If the default behavior is too slow you can use your own function for that operation. With other words the already existing function in your configuration file (which obviously currently does not work right) should be used for that operation. In that case you should find the cause of the currently existing problem in your custom function.

    Regards, Jörg
    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.