cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 StemWin

kadir ustun1
Senior
Posted on May 15, 2018 at 12:48

Hello everyone,

I try to use WM_MOTION_SetMovement function at STemWin, and I use external interrupt, but when ı use external interrupt code is not work. please help me.

this code :

WM_MOTION_SetMovement(hMotion, GUI_COORD_X, 500, 100);

GUI_Delay(500);

// _Delay(500 *2);

WM_DeleteWindow(hMotion);

WM_DeleteWindow(hDraw);
15 REPLIES 15
Posted on June 04, 2018 at 15:14

Yes , ı did. this problem is solved. But ı have another question.    I want to use two layer. but GUI_SelectLayer(1) is work but then I dont use other layer.

I think I need to configure this code. but How ? please help me ?

void LCD_X_Config(void)

{

uint32_t i;

LCD_LL_Init();

/* At first initialize use of multiple buffers on demand */

&sharpif (NUM_BUFFERS > 1)

for (i = 0; i < GUI_NUM_LAYERS; i++)

{

GUI_MULTIBUF_ConfigEx(i, NUM_BUFFERS);

}

&sharpendif

/* Set display driver and color conversion for 1st layer */

GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER_0, COLOR_CONVERSION_0, 0, 0);

/* Set size of 1st layer */

if (LCD_GetSwapXYEx(0)) {

LCD_SetSizeEx (0, YSIZE_PHYS, XSIZE_PHYS);

LCD_SetVSizeEx(0, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);

} else {

LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);

LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);

}

&sharpif (GUI_NUM_LAYERS > 1)

/* Set display driver and color conversion for 2nd layer */

GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER_1, COLOR_CONVERSION_1, 0, 1);

/* Set size of 2nd layer */

if (LCD_GetSwapXYEx(1)) {

LCD_SetSizeEx (1, YSIZE_PHYS, XSIZE_PHYS);

LCD_SetVSizeEx(1, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);

} else {

LCD_SetSizeEx (1, XSIZE_PHYS, YSIZE_PHYS);

LCD_SetVSizeEx(1, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);

}

&sharpendif

/*Initialize GUI Layer structure */

layer_prop[0].address = LCD_LAYER0_FRAME_BUFFER;

&sharpif (GUI_NUM_LAYERS > 1)

layer_prop[1].address = LCD_LAYER1_FRAME_BUFFER;

&sharpendif

/* Setting up VRam address and custom functions for CopyBuffer-, CopyRect- and FillRect operations */

for (i = 0; i < GUI_NUM_LAYERS; i++)

{

layer_prop[i].pColorConvAPI = (LCD_API_COLOR_CONV *)apColorConvAPI[i];

layer_prop[i].pending_buffer = -1;

/* Set VRAM address */

LCD_SetVRAMAddrEx(i, (void *)(layer_prop[i].address));

/* Remember color depth for further operations */

layer_prop[i].BytesPerPixel = LCD_GetBitsPerPixelEx(i) >> 3;

/* Set custom functions for several operations */

LCD_SetDevFunc(i, LCD_DEVFUNC_COPYBUFFER, (void(*)(void))CUSTOM_CopyBuffer);

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

/* Filling via DMA2D does only work with 16bpp or more */

if (LCD_LL_GetPixelformat(i) <= LTDC_PIXEL_FORMAT_ARGB4444)

{

LCD_SetDevFunc(i, LCD_DEVFUNC_FILLRECT, (void(*)(void))CUSTOM_FillRect);

LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_8BPP, (void(*)(void))BSP_LCD_DrawBitmap8bpp);

}

/* Set up drawing routine for 16bpp bitmap using DMA2D */

if (LCD_LL_GetPixelformat(i) == LTDC_PIXEL_FORMAT_RGB565) {

LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_16BPP, (void(*)(void))BSP_LCD_DrawBitmap16bpp); /* Set up drawing routine for 16bpp bitmap using DMA2D. Makes only sense with RGB565 */

}

/* Set up custom color conversion using DMA2D, works only for direct color modes because of missing LUT for DMA2D destination */

GUICC_M1555I_SetCustColorConv(Color2IndexBulk_M1555IDMA2D, Index2ColorBulk_M1555IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB1555 */

GUICC_M565_SetCustColorConv (Color2IndexBulk_M565DMA2D, Index2ColorBulk_M565DMA2D); /* Set up custom bulk color conversion using DMA2D for RGB565 */

GUICC_M4444I_SetCustColorConv(Color2IndexBulk_M4444IDMA2D, Index2ColorBulk_M4444IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB4444 */

GUICC_M888_SetCustColorConv (Color2IndexBulk_M888DMA2D, Index2ColorBulk_M888DMA2D); /* Set up custom bulk color conversion using DMA2D for RGB888 */

GUICC_M8888I_SetCustColorConv(Color2IndexBulk_M8888IDMA2D, Index2ColorBulk_M8888IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB8888 */

/* Set up custom alpha blending function using DMA2D */

GUI_SetFuncAlphaBlending(DMA2D_AlphaBlending); /* Set up custom alpha blending function using DMA2D */

/* Set up custom function for translating a bitmap palette into index values.

Required to load a bitmap palette into DMA2D CLUT in case of a 8bpp indexed bitmap */

GUI_SetFuncGetpPalConvTable(_LCD_GetpPalConvTable);

/* Set up a custom function for mixing up single colors using DMA2D */

GUI_SetFuncMixColors(DMA2D_MixColors);

/* Set up a custom function for mixing up arrays of colors using DMA2D */

GUI_SetFuncMixColorsBulk(LCD_MixColorsBulk);

}

}
Posted on June 04, 2018 at 15:14

Thank you for answered. This problem is solved.

Posted on June 04, 2018 at 15:15

void LCD_X_Config(void)

{

uint32_t i;

LCD_LL_Init();

/* At first initialize use of multiple buffers on demand */

&sharpif (NUM_BUFFERS > 1)

for (i = 0; i < GUI_NUM_LAYERS; i++)

{

GUI_MULTIBUF_ConfigEx(i, NUM_BUFFERS);

}

&sharpendif

/* Set display driver and color conversion for 1st layer */

GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER_0, COLOR_CONVERSION_0, 0, 0);

/* Set size of 1st layer */

if (LCD_GetSwapXYEx(0)) {

LCD_SetSizeEx (0, YSIZE_PHYS, XSIZE_PHYS);

LCD_SetVSizeEx(0, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);

} else {

LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);

LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);

}

&sharpif (GUI_NUM_LAYERS > 1)

/* Set display driver and color conversion for 2nd layer */

GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER_1, COLOR_CONVERSION_1, 0, 1);

/* Set size of 2nd layer */

if (LCD_GetSwapXYEx(1)) {

LCD_SetSizeEx (1, YSIZE_PHYS, XSIZE_PHYS);

LCD_SetVSizeEx(1, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);

} else {

LCD_SetSizeEx (1, XSIZE_PHYS, YSIZE_PHYS);

LCD_SetVSizeEx(1, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);

}

&sharpendif

/*Initialize GUI Layer structure */

layer_prop[0].address = LCD_LAYER0_FRAME_BUFFER;

&sharpif (GUI_NUM_LAYERS > 1)

layer_prop[1].address = LCD_LAYER1_FRAME_BUFFER;

&sharpendif

/* Setting up VRam address and custom functions for CopyBuffer-, CopyRect- and FillRect operations */

for (i = 0; i < GUI_NUM_LAYERS; i++)

{

layer_prop[i].pColorConvAPI = (LCD_API_COLOR_CONV *)apColorConvAPI[i];

layer_prop[i].pending_buffer = -1;

/* Set VRAM address */

LCD_SetVRAMAddrEx(i, (void *)(layer_prop[i].address));

/* Remember color depth for further operations */

layer_prop[i].BytesPerPixel = LCD_GetBitsPerPixelEx(i) >> 3;

/* Set custom functions for several operations */

LCD_SetDevFunc(i, LCD_DEVFUNC_COPYBUFFER, (void(*)(void))CUSTOM_CopyBuffer);

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

/* Filling via DMA2D does only work with 16bpp or more */

if (LCD_LL_GetPixelformat(i) <= LTDC_PIXEL_FORMAT_ARGB4444)

{

LCD_SetDevFunc(i, LCD_DEVFUNC_FILLRECT, (void(*)(void))CUSTOM_FillRect);

LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_8BPP, (void(*)(void))BSP_LCD_DrawBitmap8bpp);

}

/* Set up drawing routine for 16bpp bitmap using DMA2D */

if (LCD_LL_GetPixelformat(i) == LTDC_PIXEL_FORMAT_RGB565) {

LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_16BPP, (void(*)(void))BSP_LCD_DrawBitmap16bpp); /* Set up drawing routine for 16bpp bitmap using DMA2D. Makes only sense with RGB565 */

}

/* Set up custom color conversion using DMA2D, works only for direct color modes because of missing LUT for DMA2D destination */

GUICC_M1555I_SetCustColorConv(Color2IndexBulk_M1555IDMA2D, Index2ColorBulk_M1555IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB1555 */

GUICC_M565_SetCustColorConv (Color2IndexBulk_M565DMA2D, Index2ColorBulk_M565DMA2D); /* Set up custom bulk color conversion using DMA2D for RGB565 */

GUICC_M4444I_SetCustColorConv(Color2IndexBulk_M4444IDMA2D, Index2ColorBulk_M4444IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB4444 */

GUICC_M888_SetCustColorConv (Color2IndexBulk_M888DMA2D, Index2ColorBulk_M888DMA2D); /* Set up custom bulk color conversion using DMA2D for RGB888 */

GUICC_M8888I_SetCustColorConv(Color2IndexBulk_M8888IDMA2D, Index2ColorBulk_M8888IDMA2D); /* Set up custom bulk color conversion using DMA2D for ARGB8888 */

/* Set up custom alpha blending function using DMA2D */

GUI_SetFuncAlphaBlending(DMA2D_AlphaBlending); /* Set up custom alpha blending function using DMA2D */

/* Set up custom function for translating a bitmap palette into index values.

Required to load a bitmap palette into DMA2D CLUT in case of a 8bpp indexed bitmap */

GUI_SetFuncGetpPalConvTable(_LCD_GetpPalConvTable);

/* Set up a custom function for mixing up single colors using DMA2D */

GUI_SetFuncMixColors(DMA2D_MixColors);

/* Set up a custom function for mixing up arrays of colors using DMA2D */

GUI_SetFuncMixColorsBulk(LCD_MixColorsBulk);

}

}
Posted on June 04, 2018 at 17:19

Please, show the whole project in the attached file

Posted on June 05, 2018 at 07:38

Hello,

actually ı need to setLCD_X_Config function in LCDConf_stm32f429i_disco_MB1c

Posted on June 05, 2018 at 07:38

But, I don't