Crooked image LVGL 8.3.11

Description

Crooked image LVGL 8.3.11

What MCU/Processor/Board and compiler are you using?

STM32H723VGT6

What do you want to achieve?

Correct work

What have you tried so far?

I tried buffers of different sizes.

Code to reproduce

Add the relevant code snippets here.

The code block(s) should be between ```c and ``` tags:

/*You code here*/
void lvgl_init()
{
	static lv_disp_draw_buf_t draw_buf;
	static uint16_t buf1[LCD_WIDTH * 10];                        /*Declare a buffer for 1/10 screen size*/
	lv_init();
	lv_disp_draw_buf_init(&draw_buf, buf1, NULL, LCD_WIDTH * 10);  /*Initialize the display buffer.*/

	static lv_disp_drv_t disp_drv;        /*Descriptor of a display driver*/
	lv_disp_drv_init(&disp_drv);          /*Basic initialization*/
	disp_drv.flush_cb = tft_lvgl_disp_flush;    /*Set your driver function*/
	disp_drv.draw_buf = &draw_buf;        /*Assign the buffer to the display*/
	disp_drv.hor_res = lcd_get_width();   /*Set the horizontal resolution of the display*/
	disp_drv.ver_res = lcd_get_height();   /*Set the vertical resolution of the display*/
	lv_disp_drv_register(&disp_drv);      /*Finally register the driver*/
}

#define LCD_WIDTH		240
#define LCD_HEIGHT 		320
 
#define LCD_BL_ON() HAL_GPIO_WritePin(LCD_BL_GPIO_Port, LCD_BL_Pin, GPIO_PIN_SET)
#define LCD_BL_OFF() HAL_GPIO_WritePin(LCD_BL_GPIO_Port, LCD_BL_Pin, GPIO_PIN_RESET)
 
#define LCD_CMD_BASE        		((uint32_t)0xC0000000)
#define LCD_DATA_BASE        		((uint32_t)0xC0020000)

static void MPU_Config_FMC(void)
{
	MPU_Region_InitTypeDef MPU_InitStruct;

	/* Disable the MPU */
	HAL_MPU_Disable();

	/* Configure the MPU attributes for SDRAM */
	MPU_InitStruct.Enable = MPU_REGION_ENABLE;
	MPU_InitStruct.BaseAddress = 0xC0000000;
	MPU_InitStruct.Size = MPU_REGION_SIZE_4MB;
	MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
	MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
	MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
	MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
	MPU_InitStruct.Number = MPU_REGION_NUMBER0;
	MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
	MPU_InitStruct.SubRegionDisable = 0x00;
	MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;

	HAL_MPU_ConfigRegion(&MPU_InitStruct);

	/* Enable the MPU */
	HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
	HAL_SetFMCMemorySwappingConfig(FMC_SWAPBMAP_SDRAM_SRAM);	
}

## Screenshot and/or video
![image|690x453](upload://AbBJaHfaqZ1CMpwvQsXOQch1Wwj.jpeg)


If possible, add screenshots and/or videos about the current state.