Description : Rotate TFT display to portrait failed with lvgl
What MCU/Processor/Board and compiler are you using : LPC54S018 , MCUxpresso V11.4.4 , SDK 2.xLPC54018 2.10.0 , 800 x 480 landscape FTF display .
What LVGL version are you using : lvgl 7.10.1
What have you tried so far : used the" rotated" parameter and set to 1.
“sw_rotate” parameter not found in the demo project "lpcxpresso54s018littevgl_demo_widgets_bm " .
You will need at least LVGL 7.11.0 to use software rotation (otherwise the driver needs to have special logic to handle it). I’d suggest using the release/v7 branch on GitHub, as the 7.11.0 release had some bugs which have been fixed since then, and we don’t officially support anything older than the release branch for the previous major version.
in the function
void _lv_disp_refr_task(lv_task_t * task)
lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
/*Flush the content of the VDB*/
lv_refr_vdb_flush();
/* With true double buffering the flushing should be only the address change of the
* current frame buffer. Wait until the address change is ready and copy the changed
* content to the other frame buffer (new active VDB) to keep the buffers synchronized*/
while(vdb->flushing);
We tested with version8 , still no working rotation in portrait.
We had contact with nxp:
Feedback NXP support :
We checked this new feature for different platforms (rt500, RT1060, lpc54s018) and found that it works for some of them and not for others. The implementation is the same in all the devices, and it is not different in the driver, so we are not sure what’s going on. As this is a new LVGL feature, we are discussing with them possible causes.
At this moment , we are about 6 weeks further and have no solution received from LVGL.
I am testing with my i.MX RT1064 and i.MX RT1060 and I ended up with a black screen like @Paul_B mentioned. Interestingly my customer , who is using an RT1064 got a irregular line red, white and gray.
I have used the _lvgl_guider and the lvgl_demo_widgets_bm examples from the latest NXP MCUXpresso SDK. The version of the LVGL is 8.0.2.
Hi @kisvegabor
I was able to perform 180 degree rotation (rotated = 2 ) with hardcode, although the display refreshing does not look good and touch is not okay . I am using lvgl_demo_widgets_bm demo.
If you disable the full_refresh flag, probably the flush_cb needs to be modified as well.
I believe now the flush_cb only set a new frame buffer for the LCD periphery. But with full_refresh = 0 LVGL will only draw only the changed area so the simple address swapping won’t work.
Instead there should be a frame_buffer permanently set for LCD periphery and the flush_cb should copy the refreshed areas to that frame buffer.
The FAE of EBV have tested the earlier changes.
Last Friday , I uploaded mcuxpresso V11.5 with SDK2.11 for LPC54S018 .
I have some problems with the OM40003 (not possible to erase the flash with GUI Flash Tool , even with ISP0 button pudhed-in) . Can also not debug with the OM40003.
First I must solve this problem before I can test .
Hi Paul,
If you are still going with this issue ( or appears frequently) :
When the MCU is set into ISP mode, try to do an erase using ROM bootloader. This easily done with the Flash Magic Tool ( Download - Flash Magic ). They are NXP partners. If use tool to regain debug access quickly.
If you get any positive results to rotate the image, please share.