Check out our new Music Player Demo video running on NXP i.MX RT1050

Hi, spectacular!!
For run this demo there are any restriction about version of LVGL?

thank you

It works with LVGL 7+. (I tested using master.)

Pretty demo! I like it. I have tested it on the STM32F746 Disco board. It works fine except that the CPU load is at a high level most of time no matter whether the macro LV_USE_GPU_STM32_DMA2D is enabled or not. (The code is based on https://github.com/lvgl/lv_port_stm32f746_disco with some modification to enable on board QSPI flash)

1 Like

It seems you are using an older version of the music player. The bars should be thicker in the final version. Be sure to use the latest lv_example and lvgl.

Your music player demo looks really amazing. I just run it on RT1050 platform with dedicated LCD screen. I can’t reach 60 FPS and such a low CPU usage. Are you using FreeRTOS? Could you please share lv_config.h and FreeRTOSConfig.h settings?

I’ve used the SDK demo and edited littlevgl_support.c (12.7 KB)

Thanks for a quick answer. I applied your modification. After that I have more FPS but I can see fractals on the screen. Here is my whole project (lvgl_7.8_bm.zip) (634.6 KB) . To make things easier it is bare metal version with LVGL in version 7.8. I removed lvgl folder content, because of huge size. Could you be so kind and compare my project with your? I am really confused what I am doing wrong. For example what is your LV_DISP_DEF_REFR_PERIOD parameter settings? With default value set to 30 ms max. FPS showed by LVGL performance monitor is 33.

You need to reduce LV_DISP_DEF_REFR_PERIOD to achieve an FPS higher than 33. The difference is barely visible for most UIs; that’s why the value is so high by default.

I pointed that parameter to show that maybe not only littlevgl_support.c file need to be changed. When LV_DISP_DEF_REFR_PERIOD is set to 15 ms maximum value of FPS is 66. That was easy to figured it out :smiley:.
I compiled Music Player example with LV_DEMO_MUSIC_AUTO_PLAY set to 1. AVG FPS with LV_DISP_DEF_REFR_PERIOD set to 15 ms is 25. I can observe huge CPU load. Did you modify only littlevgl_support.c file? Are you using some settings to offload the CPU? Why I have fractals after your code modification?
I know I am asking a lot of questions, but I am trying to understand what I am doing wrong.

Here is my project: https://drive.google.com/file/d/1ocpqPFQZaSswjDfNkncM0cT0emG5NbeC/view?usp=sharing
Have you enabled -O3 optimization?

Thanks for sharing your sources. Code works perfectly, I need more time to find what is wrong. I see you are using lvgl in version 7.7.2, I am using 7.8.0. I will back to you with my conclusions.

1 Like

Finally I ran music player with satisfied number of FPS. Your code modification change a lot in terms of performance. The important thing is to disable GPU support. After that step there is no fractals and everything works smoothly.

I checked your “patch” with other lvgl examples ( benchmark, widgets) and I can confirm that it works much better (more FPS, less CPU load).

One more time thank you for your help.

Somehow I couldn’t use it with GPU because fsl_cache.h was missing.

But do you really say GPU is slower than LVGL’s software rendering? I’m so happy that it was worth the loooong hours spent with optimization. :slight_smile:

That is really strange I know, but this is how it works for now. To enable fsl.h file you have to in the project click Manage SDK Components and choose Drivers tab. I think sample project is not the gold sample and there is a place for optimization for sure. For example FreeRTOS example runs lv_tick_inc and lv_task_handler on the same function. In the same loop you can find vTaskDelay. I was really surprised at the begining why LVGL samples run so slow on CPU with 600MHz clock and dedicated GPU :slight_smile:

Which example is this? That should be updated.

I am using NXP SDK 2.8.5. There is sample code littlevgl_demo and littlevgl_terminal.

hi kisvegabo
i run music player demo in a new project
esp32 and stm32f429
is agood and ok run


video hmi stm32f429 player usb host otg

1 Like

Cool! Thanks for sharing! :slight_smile: