没有合适的资源?快使用搜索试试~ 我知道了~
AN13730.pdf
需积分: 0 0 下载量 98 浏览量
2023-10-30
22:11:53
上传
评论
收藏 1.94MB PDF 举报
温馨提示
试读
28页
AN13730.pdf
资源推荐
资源详情
资源评论
AN13730
How to Develop LVGL GUI Demo on Memory-constrained
MCU with GUI Guider
Rev. 0 — 9 September 2022 Application note
Document information
Information Content
Keywords GUI Guider 1.3.1, LVGL, LPC55S06
Abstract This application note introduces the use of the LVGL file system mechanism
to support external SPI Flash and the use of the LVGL input device
mechanism to support hardware buttons for screen switching.
NXP Semiconductors
AN13730
How to Develop LVGL GUI Demo on Memory-constrained MCU with GUI Guider
1 Introduction
An attractive GUI is reliant upon well designed images and fonts. The more complex
the GUI demo is, the more of these assets are required, leading to greater memory
resources being consumed. If the MCU selected for a design does not have abundant
on-chip Flash and on-chip RAM to store images and fonts, it means that you have to use
off-chip Flash and off-chip RAM.
Fortunately, LVGL provides file system mechanism to support external storage device
like SD card or serial Flash. This application note uses LPC55S06 as the target MCU.
It takes the implementation of an E-Bike UI as an example to introduce how to use the
LVGL file system to support a low-cost external serial Flash. The external serial flash
used in this application note is a Winbond W25Q64.
In addition to providing graphic functionality, LVGL supports an input device mechanism.
This application note introduces how to use hardware buttons as LVGL input devices to
achieve screen switching.
2 LPC55S06 overview
LPC55S0x/LPC550x is a family of highly cost effective Arm Cortex-M33-based micro-
controllers for embedded applications and includes the following features:
• Running at a frequency of up to 96 MHz
• TrustZone option for isolation of secure and non-secure code
• Floating Point Unit (FPU) and Memory Protection Unit (MPU)
• Up to 96 kB of on-chip RAM
• Up to 256 kB of on-chip Flash
• CAN-FD
• Five general-purpose timers
• SCTimer/PWM
• RTC/alarm timer
• 24-bit Multi-Rate Timer (MRT)
• Windowed Watchdog Timer (WWDT)
• Code Watchdog
• High-speed SPI (50 MHz)
• Eight flexible serial communication peripherals (each of which can be a USART, SPI,
I2C, or I2S interface)
• 16-bit 2.0 M samples/sec ADC capable of simultaneous conversions
• Temperature sensor.
The MCU features listed above are closely related to display performance include system
frequency, Flash capacity, RAM capacity, and SPI communication rate. This demo uses
high-speed SPI to connect to external serial Flash.
3 LVGL overview
LVGL is an open-source graphics library providing everything that you need to create
embedded GUI with easy-to-use graphical elements, beautiful visual effects, and low
memory footprint.
Key features:
AN13730 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2022. All rights reserved.
Application note Rev. 0 — 9 September 2022
2 / 28
NXP Semiconductors
AN13730
How to Develop LVGL GUI Demo on Memory-constrained MCU with GUI Guider
• Open source and free to use under MIT license
• Written in C (C++ compatible) and hosted on GitHub
• More than 30 powerful, fully customizable widgets, such as, button, image button,
checkbox, switch, slider, label, arc, bar, line, canvas, image, roller, slider, meter, table,
text area, animation, calendar, chart, list, menu, message box, tabview
• Display of any resolution, GPU support, Multi display support
• Supports multiple types of input devices, such as:
– Pointer-like input device like touchpad or mouse
– Keypads like a normal keyboard or simple numeric keypad
– Encoders with left/right turn and push options
– External hardware buttons which are assigned to specific points on the screen
• Drawing features, such as:
– anti-aliasing
– shadow
– line, arc, polygon
– mask
• Text features, such as;
– UTF-8 support
– Kerning
– word wrap and auto texts scrolling
– Arabic and Persian support
– font compression
– subpixel rendering
– online and offline font converter
– interface for custom font engine
– FreeType integration example
– multi-language support
• Image features, such as:
– various color formats: RGB, ARGB, Chroma keyed, indexed, alpha only
– Real-time recoloring of images
– Real-time zoom and rotation
– Images can be stored in flash or files (such as, SD card)
– Online and offline image converter
– Image decoder interface for caching
– PNG integration example
• Styles, such as:
– Cascade styles (like in CSS)
– Reuse the styles in multiple widgets
– Local styles for simple changes
– Themes to give a default appearance
– Transitions (animations) on state change
• Micropython support
• Rich demo examples and documents
• Supported by GUI Guider, free UI design tool of NXP
For more details, see the LVGL page.
LVGL version used in this application note is 8.0.2.
AN13730 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2022. All rights reserved.
Application note Rev. 0 — 9 September 2022
3 / 28
NXP Semiconductors
AN13730
How to Develop LVGL GUI Demo on Memory-constrained MCU with GUI Guider
4 GUI Guider overview
GUI Guider is a user-friendly graphical user interface development tool from NXP that
enables the rapid development of high-quality displays with the open-source LVGL
graphics library. The drag-and-drop editor of GUI Guider makes it easy to utilize the many
features of LVGL, such as, widgets, animations, and styles to create a GUI with minimal
or no coding at all.
With the click of a button, you can run your application in a simulated environment or
export it to a target project. Generated code from GUI Guider can easily be added to an
MCUXpresso IDE, IAR Embedded Workbench, or Keil uVision project. It accelerats the
development process and allows you to seamlessly add an embedded user interface to
your application.
GUI Guider is free to use with general purpose and crossover MCUs of NXP. It includes
built-in project templates for several supported platforms.
For more details, refer to GUI Guider.
GUI Guider version used in this application note is 1.3.1.
5 E-bike demo overview
The E-Bike demo is a GUI application with three screens which are named as Overview,
Ride 1 and Ride 2 respectively, as shown in Figure 2, Figure 3, and Figure 4. At the
bottom of these screens, three buttons with labels <, >, and ^ are used to switch the
current screen to the previous, next, and home screen respectively. Overview is the first
screen displayed after the system reboot, so it is referred to the home screen from here
on.
Figure 1 shows the hardware platform. It is specially customized for the E-Bike demo.
Figure 1. Hardware platform
The Home button is used to switch back to the home screen from another active screen.
The Down button is used to switch to the next screen, and the Up button is used to
switch to the previous screen.
For example, assuming that the current active screen is Ride 1,
• if the Down button is pressed, it switches to the Ride 2 screen.
• if the Home button or Up button is pressed, it switches to the home screen.
AN13730 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2022. All rights reserved.
Application note Rev. 0 — 9 September 2022
4 / 28
NXP Semiconductors
AN13730
How to Develop LVGL GUI Demo on Memory-constrained MCU with GUI Guider
Figure 2. Overview (home) screen
Figure 3. Ride 1 screen
AN13730 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2022. All rights reserved.
Application note Rev. 0 — 9 September 2022
5 / 28
剩余27页未读,继续阅读
资源评论
clibing
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功