User Manual for STMicroelectronics models including: AEK-LCD-DT028V1, UM3236, UM3236 LVGL Libraries for LCD Displays, LVGL Libraries for LCD Displays, Libraries for LCD Displays, LCD Displays
4 ott 2023 — The aim of this user manual is to show how to create an LCD GUI easily, using AutoDevKit. Note: For more details about LVGL, refer to the official ...
File Info : application/pdf, 23 Pages, 1.97MB
DocumentDocumentUM3236 User manual Getting started with LVGL libraries for LCD displays Introduction In the modern context of the automotive industry, it is common to develop more and more complex GUIs even for small LCD displays. To meet this need, a new component, AEK-LCD-LVGL, has been created and added to the AutoDevKit ecosystem. This new component imports the LVGL graphics library, and it is used with the AEK-LCD-DT028V1 component to develop complex GUIs faster. The LVGL (light and versatile graphics library) is a free, open-source graphics library, written in C language, providing tools to create GUIs with easy-to-use graphics, nice visual effects, and low memory occupation. LVGL is very powerful as it contains predefined elements, such as buttons, charts, lists, sliders, and images. Creating graphics with animations, anti-aliasing, opacity, and smooth scrolling is simplified with LVGL. The library is compatible with many types of input devices, such as touchpads, mouses, keyboards, and encoders. The aim of this user manual is to show how to create an LCD GUI easily, using AutoDevKit. Note: For more details about LVGL, refer to the official documentation. The source code is available for download from GitHub. UM3236 - Rev 1 - October 2023 For further information contact your local STMicroelectronics sales office. www.st.com UM3236 AEK-LVGL architecture 1 AEK-LVGL architecture The AEK-LCD-LVGL component has been implemented to extend basic graphics provided by the AEK-LCDDT028V1 LCD touch-screen component. Figure 1. AEK-LCD-LVGL architecture The above image shows the LVGL software architecture integrated into AutoDevKit. The software architecture is characterized by: · An LVGL library: it implements advanced graphical functions based on the AEK-LCD-DT028V1 basic graphic library: aek_ili9341_drawPixel: it prints pixels on the AEK-LCD-DT028V1 LCD; aek_lcd_get_touchFeedback:it it detects touch on the AEK-LCD-DT028V1 LCD touch screen; aek_lcd_read_touchPos: it gets the coordinates of the touched point; aek_lcd_set_touchFeedback: it flags that the touch action is completed. · A basic graphic library: it implements basic graphic functions and calls low-level driver primitives. · A low-level driver: it implements MCU peripherals. In this case, the SPI protocol is used. · An AEK-LCD-DT028V1: LCD evaluation board. UM3236 - Rev 1 page 2/23 UM3236 LVGL basics 2 LVGL basics The LVGL library interacts with the AEK-LCD-DT028V1 component through two drivers DispDriver and IndevDriver, as shown in the image below. Figure 2. LVGL drivers The DispDriver is in charge of preparing the buffer image and passing it to the lower layer to display it on the LCD. It uses the following lv_disp_drv_t typed structure: · draw_buf: it points to a memory buffer structure in which the LVGL draws. · hor_res: horizontal resolution of the display in pixels. · ver_res: vertical resolution of the display in pixels. · flush_cb: it points to the function used to print the memory buffer to the LCD display. · monitor_cb: it monitors the number of pixels and the time required to display data. On the other side, IndevDriver retrieves the LCD touch information coming from the lower layer. It uses the following lv_indev_drv_t typed structure: · type: this field contains the type of the input device. Predefined available macros include: LV_INDEV_TYPE_POINTER (used in our case) LV_INDEV_TYPE_KEYPAD LV_INDEV_TYPE_ENCODER LV_INDEV_TYPE_BUTTON · read_cb: it points to the function used to retrieve touch information. flush_cb and read_cb: are called periodically based, respectively, on the user-defined screen refresh period and touch refresh input. The LVGL library manages refresh times through an internal clock. Two basic LVGL functions are used for time management: · lv_tick_inc(uint32_t x): the aim of this function is to synchronize the LVGL time with the physical time of the MCU. The tick update has to be set between 1 to 10 milliseconds according to LVGL specification. In our case, we set it to 5 milliseconds. · lv_timer_handler(void): it updates the internal LVGL objects based on the elapsed time. The physical time is monitored through the programmable interrupt timer (PIT) peripheral of the MCU. UM3236 - Rev 1 page 3/23 3 3.1 3.1.1 UM3236 Interface between LVGL and the AEK-LCD-DT028V1 component Interface between LVGL and the AEK-LCD-DT028V1 component The interface between AEK-LCD-LVGL and the AEK-LCD-DT028V1 component is implemented by a file named lcd_lvgl.c located under the "aek_lcd_lvgl_component_rla" folder. This file contains functions to: · initialize the LVGL library, · manage LVGL internal timer, · interface the LVGL library with the basic graphic library implemented by the AEK-LCD-DT028V1 component. The five key functions are explained in the following paragraphs. Display Init The aek_lcd_lvgl_display_init function intialize the two LVGL key structures, DispDriver and IndevDriver. DispDriver The key goal of the DispDriver structure is to hold the drawing buffer for the LVGL. The DispDriver draw_buf field points at the memory buffer structure able to contain up to two different memory buffers. The draw_buf field is initialized with the lv_disp_draw_buf_init() function. Figure 3. draw_buf initialization Note: In the above code, the DISP_HOR_RES and DISP_VER_RES parameters represent the LCD dimension. The buffer size must be customized according to the system available memory. The official LVGL guide recommends choosing the size of the drawing buffers of at least 1/10 of the screen size. If a second optional buffer is used, LVGL can tap into one buffer while the data of the other buffer is sent to be displayed in background. Figure 4. draw_buf initialization The other parameters of the structure are the screen dimensions, the two functions, flush and monitor_cb, that we will analyze later. Once filled, the structure has to be registered with the dedicated lv_disp_drv_register() function to set an active display. UM3236 - Rev 1 page 4/23 3.1.2 IndevDriver The IndevDriver is initialized as follows: Figure 5. draw_buf initialization UM3236 Flush The key defined fields are the type of device used and the function to manage it. Also in this case, the initialized structure needs to be registered to make the device become active. 3.2 Flush The flush function uses the AEK-LCD-DT028V1 component basic graphic library to draw, on the LCD, the image present in the memory buffer initialized according to the previous paragraph. Figure 6. Flush function The flush function skeleton has been provided by the LVGL function and customized for the LCD screen driver in use (i.e., aek_ili9341_drawPixel pixel drawing). The input parameters are: · drv: the pointer to the DispDriver · area: buffer that contains the specific area that needs to be updated · color_p: buffer that contains the colors to be printed. UM3236 - Rev 1 page 5/23 UM3236 monitor_cb 3.3 monitor_cb The monitor_cb function is defined in the official LVGL guide and does not require customizations. Figure 7. monitor_cb function 3.4 my_input_read The my_input_read function is in charge of managing the input coming from the LCD screen at high level. The function skeleton is defined by the LVGL library. The input parameters are: · drv: pointer to the initialized input driver · data: contains the pixel-converted x,y coordinate of touched points The image below shows the implementation of the my_input_read function: Figure 8. my_input_read function UM3236 - Rev 1 page 6/23 3.5 Note: UM3236 Refresh screen Refresh screen The aek_lcd_lvgl_refresh_screen function updates the LVGL internal timers. This function has to be correctly placed in the application code to fulfill the LVGL time constraints. Figure 9. aek_lcd_lvgl_refresh_screen function UM3236 - Rev 1 page 7/23 4 4.1 4.2 4.2.1 UM3236 AutoDevKit ecosystem AutoDevKit ecosystem The application development that uses the AEK-LCD-LVGL takes full advantage of the AutoDevKit ecosystem, whose basic components are: · AutoDevKit Studio IDE installable from www.st.com/autodevkitsw · SPC5-UDESTK debugging software for Windows or OpenOCD debugger · AEK-LCD-LVGL drive AutoDevKit Studio AutoDevKit Studio (STSW-AUTODEVKIT) is an integrated development environment (IDE) based on Eclipse designed to assist the development of embedded applications based on SPC5 Power Architecture 32-bit microcontrollers. The package includes an application wizard to initiate projects with all the relevant components and key elements required to generate the final application source code. AutoDevKit Studio also features: · the possibility of integrating other software products from the standard Eclipse marketplace · free license GCC GNU C Compiler component · support for industry-standard compilers · support for multi-core microcontrollers · PinMap editor to facilitate MCU pin configuration · integrated hardware and software components, component compatibility checking, and MCU and peripheral configuration tools · the possibility of creating new system solutions from existing ones by adding or removing compatible function boards · new code can be generated immediately for any compatible MCU · high-level application APIs to control each functional component, including the ones for the AEK-LCD- LVGL component. For more information, refer to UM2623 (in particular, Section 6 and Section 7) or watch the video tutorials. AEK_LCD_LVGL component The AEK-LVGL drivers are provided with the STSW-AUTODEVKIT (from version 2.0.0 on) installation to facilitate the programming phase. Update your AutoDevKit installation to get the latest version. Once properly installed, select the component named AEK_LVGL Component RLA. AEK_LCD_LVGL component configuration To configure the component, follow the procedure below. Step 1. Set the Refr_Period time. This is the refresh screen period (the recommended value is 30). Step 2. Set the Read_Period time. This the minimum time between two following touch detections (the recommended value is 30). Step 3. Tick the Draw Complex box to enable advanced widget like shadows, gradients, rounded corners, circles, arcs, skew lines, and image transformations. Step 4. Select the fonts that you want to use. Consider that each font requires extra flash memory for the generated application code. UM3236 - Rev 1 page 8/23 UM3236 AEK_LCD_LVGL component Figure 10. AEK_LVGL Component RLA configuration UM3236 - Rev 1 page 9/23 UM3236 How to create an AutoDevKit project with the AEK-LCD-LVGL component based on SPC58EC 5 How to create an AutoDevKit project with the AEK-LCD-LVGL component based on SPC58EC The steps are: Step 1. Note: Create a new AutoDevKit Studio application for the SPC58EC series microcontroller and add the following components: SPC58ECxx Init Package Component RLA SPC58ECxx Low Level Drivers Component RLA Add these components at the beginning, otherwise the remaining components are not visible. Step 2. Add the following additional components: Step 2a. AutoDevKit Init Package Component Step 2b. SPC58ECxx Platform Component RLA Step 2c. AEK-LCD-DT028V1 Component RLA (see UM2939 for configuration) Step 2d. AEK-LCD-LVGL Component RLA Figure 11. Adding components Step 3. Click the [Allocation] button in the AEK-LCD-LVGL configuration window. This operation delegates the AEK-LCD-LVGL configuration to AutoDevKit. UM3236 - Rev 1 page 10/23 UM3236 How to create an AutoDevKit project with the AEK-LCD-LVGL component based on SPC58EC Step 4. The allocation has enabled the PIT timer peripheral. You can verify it in the Low-Level Driver component. Figure 12. PIT enablement (1 of 2) Figure 13. PIT enablement (2 of 2) Step 5. Step 6. Generate and build the application using the appropriate icons in AutoDevKit Studio. The project folder is then populated with new files, including main.c. The component folder is populated then with AEKLCD-DT028V1 and AEK-LCD-LVGL drivers. Open the main.c file and include AEK-LCD-DT028V1.h and AEK_LCD_LVGL.h files. Figure 14. main.c file UM3236 - Rev 1 page 11/23 UM3236 How to create an AutoDevKit project with the AEK-LCD-LVGL component based on SPC58EC Step 7. In the main.c file, after the irqIsrEnable() function, insert the following mandatory functions: Figure 15. Mandatory functions to insert in the main.c file Step 8. In the main.c, copy and paste an example from the LVGL library taken from the official guide and insert it in the main(). Figure 16. Example from the LVGL library to insert in the main.c file Step 9. Save, generate, and compile the application. Step 10. Open the boardview editor provided by AutoDevKit This provides a graphical point-to-point guide on how to wire the boards. Step 11. Connect the AEK-LCD-DT028V1 to a USB port on your PC using a mini-USB to USB cable. Step 12. Launch SPC5-UDESTK-SW and open the debug.wsx file in the AEK-LCD-LVGL Application /UDE folder. Step 13. Run and debug your code. UM3236 - Rev 1 page 12/23 6 Note: UM3236 Available demos for AEK-LVGL Available demos for AEK-LVGL There are several demos provided with the AEK-LCD-LVGL component: · SPC582Bxx_RLA AEK_LCD_LVGL Test Application · SPC58ECxx_RLA AEK-LCD_LVGL Test Application · dual screen AVAS demo - SPC58ECxx_RLA_MainEcuForIntegratAVASControl - Test Application More demos might become available with new AutoDevKit releases. UM3236 - Rev 1 page 13/23 UM3236 Advanced application example - dual screen AVAS demo 7 Advanced application example - dual screen AVAS demo An advanced application has been implemented using LVGL. This application draws a car gauge for engine rpms in a display and manages the related gauge animations. The implemented AVAS application is based on the AEK-AUD-C1D9031 board and simulates the car engine sound at low speeds to warn pedestrians of an electric vehicle approaching. In the demo, we simulate the acceleration and deceleration (i.e., an increase/decrease of rpms) of a car engine and its volume through a control panel implemented on the LCD screen of the AEK-LCD-DT028V1. Figure 17. AEKD-STEREOAVAS kit 7.1 7.1.1 We have extended the demo by adding a second AEK-LCD-DT028V1 LCD and using the LVGL library to create a speedometer to gauge the engine rpm values. LVGL widgets used To develop the dual screen AVAS demo, we have used the following LVGL widgets: · An image used as a tachometer background · An arc used as a tachometer indicator · An animation that updates the arc value according to the engine rpm An LVGL image widget To use an image with the LVGL library, convert it into a C array by using a free online converter. UM3236 - Rev 1 page 14/23 Figure 18. LVGL image widget UM3236 LVGL widgets used Note: When converting the image remember to tick the box of the Big-Endian format. In the dual screen AVAS demo, the C array representing the tachometer image has been named Gauge. The image widget has been customized as follows: Figure 19. Tachometer background image Where: · lv_img_declare: is used to declare an image called Gauge. · lv_img_create: is used to create an image object and attach it to the current screen. · lv_img_set_src: this is the image obtained from the LVGL converter previously shown (it is recommended to use the jpg format). · lv_obj_align: is used to align the image to the center with a given offset. · lv_obj_set_size: is used to set the image size. UM3236 - Rev 1 page 15/23 Note: 7.1.2 UM3236 LVGL widgets used For more details about how to manage an image with the LVGL library, refer to the official documentation. An LVGL arc widget A multicolored arc has been created to show the engine instantaneous rpms. The multicolored arc consists of two contiguous colors, red and blue, respectively. Figure 20. AVAS tachometer The following code shows how to create an arc: Figure 21. AVAS tachometer Where: · lv_arc_create: creates an arc object. · lv_arc_set_rotation: sets the arc rotation. · lv_arc_set_bg_angles: sets the maximum and minimum arc value in degrees. · lv_arc_set_value: sets the arc initial value at zero. · lv_obj_set_size: sets the arc dimensions. · lv_obj_remove_style: removes the arc final pointer. UM3236 - Rev 1 page 16/23 Note: 7.1.3 UM3236 LVGL widgets used · lv_obj_clear_flag: sets the arc as not clickable. · lv_obj_align: aligns the arc to the center with a specified offset. For more details about the arc, refer to LVGL documentation. Widget associated animation A specific arc animation function is created and passed to the LVGL engine to display rpm changes. The function code is the following: Figure 22. arc_animation function Note: Where: · arc: is the pointer to the current arc widget · delay: is the delay time before the animation starts · start: is the initial arc position · end: is the final arc position · speed: is the animation speed in unit/secs. For more details about the used animation functions, refer to LVGL documentation. Considering that the complete arc consists of two contiguous arches, we had to manage the animation function properly. For this purpose, let us analyze two different scenarios: 1. Case: the animation involves one arc In this simple case, we assign a single animation to the arc. Figure 23. Arc animation - one arc UM3236 - Rev 1 page 17/23 UM3236 LVGL widgets used 2. Case: the animation involves two arches In this case, the animation of the second arc starts at the end of the animation of the first one. Figure 24. Arc animation - two arches A specific LVGL function (lv_anim_speed_to_time) computes the animation time. This execution time is used to compute the delay of the second arc animation. Figure 25. Delay of the second arc UM3236 - Rev 1 page 18/23 UM3236 Dual core implementation 7.2 Dual core implementation In the dual screen AVAS demo, display and audio playback tasks are concurrently executed in a real-time embedded system. To overcome a possible loss of system responsiveness, we have decided to use two different cores: one dedicated to the display and one to the audio playback. The AEK-MCU-C4MLIT1 board hosts an SPC58EC80E5 microcontroller with a dual core processor, the best fit for the above described case. In detail: · Core 2: It is the first to start, it initializes the library and then execute the application code. · Core 0: It calls the aek_lcd_lvgl_refresh_screen() function within the main loop, in order to update continuously the display and read the touch input. Figure 26. SPC58EC80E5 microcontroller core initialization Note: The PIT functions and the aek_lcd_lvgl_refresh_screen() must be placed in the same core. UM3236 - Rev 1 page 19/23 Revision history Date 04-Oct-2023 Table 1. Document revision history Revision 1 Initial release. Changes UM3236 UM3236 - Rev 1 page 20/23 UM3236 Contents Contents 1 AEK-LVGL architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 2 LVGL basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 3 Interface between LVGL and the AEK-LCD-DT028V1 component. . . . . . . . . . . . . . . . . . . . 4 3.1 Display Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1.1 DispDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1.2 IndevDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Flush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 monitor_cb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4 my_input_read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.5 Refresh screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4 AutoDevKit ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 4.1 AutoDevKit Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.2 AEK_LCD_LVGL component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.2.1 AEK_LCD_LVGL component configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 5 How to create an AutoDevKit project with the AEK-LCD-LVGL component based on SPC58EC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 6 Available demos for AEK-LVGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 7 Advanced application example - dual screen AVAS demo. . . . . . . . . . . . . . . . . . . . . . . . . .14 7.1 LVGL widgets used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.1.1 An LVGL image widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.1.2 An LVGL arc widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.1.3 Widget associated animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.2 Dual core implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 UM3236 - Rev 1 page 21/23 UM3236 List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. AEK-LCD-LVGL architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 LVGL drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 draw_buf initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 draw_buf initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 draw_buf initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Flush function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 monitor_cb function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 my_input_read function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 aek_lcd_lvgl_refresh_screen function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 AEK_LVGL Component RLA configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Adding components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 PIT enablement (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 PIT enablement (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 main.c file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Mandatory functions to insert in the main.c file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Example from the LVGL library to insert in the main.c file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 AEKD-STEREOAVAS kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 LVGL image widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Tachometer background image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 AVAS tachometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 AVAS tachometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 arc_animation function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Arc animation - one arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Arc animation - two arches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Delay of the second arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 SPC58EC80E5 microcontroller core initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 UM3236 - Rev 1 page 22/23 UM3236 IMPORTANT NOTICE READ CAREFULLY STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST's terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers' products. No license, express or implied, to any intellectual property right is granted by ST herein. Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product. ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces information previously supplied in any prior versions of this document. © 2023 STMicroelectronics All rights reserved UM3236 - Rev 1 page 23/23