2414859_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2414859_en-US

2414859_en-US

Seeking help regarding the rotation issue on the RT1052 display.

The screen I purchased is portrait orientation, but I need it to be displayed in landscape mode. I used guiguider to generate the basic display code for the RT1052.

And add software rotation

disp_drv.sw_rotate= 1;
disp_drv.rotated = 1;
 
Set as single buffer
SDK_ALIGN( __attribute__ ((section("lvglDisplayBuffer"))) static uint8_t s_frameBuffer[1][DEMO_FB_SIZE], DEMO_FB_ALIGN);
SDK_ALIGN( __attribute__ ((section("lvglDisplayBuffer"))) static uint8_t s_lvglBuffer[DEMO_DB_SIZE], DEMO_FB_ALIGN);
The screen displays correctly, but the refresh rate is too slow and doesn't meet my needs.
 
Set as double buffer
SDK_ALIGN( __attribute__((section("lvglDisplayBuffer"))) static uint8_t s_frameBuffer[2][DEMO_FB_SIZE], DEMO_FB_ALIGN);
Only the backlight is on; the screen is black.
why is that?
 

#if FB_USE_SRAM
static void DEMO_WaitVsync(lv_disp_drv_t *disp_drv)
{
s_framePending = true;

#if defined(SDK_OS_FREE_RTOS)
if (xSemaphoreTake(s_frameSema, portMAX_DELAY) != pdTRUE)
{
PRINTF("Display flush failed\r\n");
assert(0);
}
#else
while (s_framePending)
{
}
#endif
}

static void copy_area(const lv_area_t *area, lv_color_t *color_p, uint8_t *fb, uint32_t fbStrideBytes)
{
uint32_t y;
uint32_t areaWidth = lv_area_get_width(area);

fb += (area->y1 * fbStrideBytes + area->x1 * sizeof(lv_color_t));

for (y = area->y1; y <= area->y2; y++)
{
lv_memcpy(fb, color_p, areaWidth * sizeof(lv_color_t));
fb += fbStrideBytes;
color_p += areaWidth;
}
}

static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{
/* Wait VSYNC for each small update. /
DEMO_WaitVsync(disp_drv);

/* Copy data from draw buffer to frame buffer./
copy_area(area, color_p, (uint8_t*) s_frameBuffer, LCD_WIDTH * LCD_FB_BYTE_PER_PIXEL);

SCB_CleanInvalidateDCache();

lv_disp_flush_ready(disp_drv);
}
#else

static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{


// DCACHE_CleanByRange((uint32_t)color_p, DEMO_FB_SIZE);
DCACHE_CleanInvalidateByRange((uint32_t)color_p, DEMO_FB_SIZE);

ELCDIF_SetNextBufferAddr(LCDIF, (uint32_t)color_p);

s_framePending = true;

#if defined(SDK_OS_FREE_RTOS)
if (xSemaphoreTake(s_frameSema, portMAX_DELAY) == pdTRUE)
{
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
else
{
PRINTF("Display flush failed\r\n");
assert(0);
}
#else
while (s_framePending)
{
}

/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
#endif
}
#endif

i.MXRT 105xRe: 求助关于RT1052显示旋转问题

Hi @dsd ,

Thank you for your question!

First, please check the following LVGL limitations: Screen rotation is not supported when full_refresh=1 is enabled. Please refer to:

 
Additionally, the RT1050 has hardware PXP support for rotation, which is the more recommended solution. Please refer to: https://docs.nxp.com/bundle/GUIGUIDERUG-1.6.1/page/topics/rotate_screen_and_widgets.html
And the PXP rotation-related demo in the SDK.
 
Best regards,
Gavin
Re: 求助关于RT1052显示旋转问题

Helllo,

When using NXP i.MX RT1052 with Guiguider (LVGL) for screen rotation development, the "slow single-buffer refresh and black screen with double-buffer" problem you encounter is mainly due to the mismatch between software rotation and the hardware ELCDIF controller, double-buffer switching mechanism, and memory address index.


Best Regards

Re: 求助关于RT1052显示旋转问题Thank you very much, rotating the PXP drive does work and perfectly solves the problem.
タグ(1)
評価なし
バージョン履歴
最終更新日:
木曜日
更新者: