欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    AN4323 原版完整文件.docx

    • 资源ID:96321485       资源大小:295.67KB        全文页数:31页
    • 资源格式: DOCX        下载积分:20金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要20金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    AN4323 原版完整文件.docx

    AN4323Application noteGetting started with STemWin LibraryIntroductionA partnership with Segger Microcontroller GmbH & Co. KG enables STMicroelectronics to provide STemWin Library, a product based on Seggers graphic library emWin.STemWin Library is a professional graphical stack library enabling the building up of Graphical User Interfaces (GUIs) with any STM32, any LCD/TFT display and any LCD/TFT controller, taking advantage of STM32 hardware accelerations whenever possible.STemWin Library is a comprehensive solution coming with rich features such as JPG, GIF and PNG decoding, many widgets (checkboxes, buttons) and a VNC server allowing to display remotely a local display, but also professional tools such as GUIBuilder to create dialog boxes by drag and drop, a font converter, etc.Table 1 lists the microcontrollers concerned by this application note.Table 1. Applicable productsTypeProduct categoriesMicrocontrollersSTM32F0xx series STM32F1xx series STM32F2xx series STM32F3xx seriesSTM32F4xx series STM32L1xx seriesJuly 2013DocID024959 Rev 11/31ContentsAN4323Contents2/31DocID024959 Rev 11 Library and package presentation61.1 Licensing information61.2 Library description61.3 Package organization81.4 Delivered binaries82 Supported EVAL boards and examples103 How to use STemWin Library step by step133.1 Configuration133.1.1 GUIConf_stm32xxx_eval.c133.1.2 LCDConf_stm32xxx_eval.c133.1.3 GUI_X.c or GUI_X_OS.c143.2 GUI initialization143.3 Core functions153.3.1 Image file display153.3.2 Bidirectional text153.3.3 Alpha blending153.3.4 Sprites and cursors153.4 Memory devices163.5 Antialiasing173.6 Window Manager173.7 Widget library183.8 VNC server183.8.1 Requirements193.8.2 Process description203.9 Fonts213.10 GUIBuilder243.10.1 Basic usage of the GUIBuilder253.10.2 Creation routine253.10.3 User-defined code253.10.4 Callback routine254 Performance and footprint264.1 LCD driver performance264.2 STemWin footprint275 FAQs (Frequently Asked Questions)296 Revision history30DocID024959 Rev 13/31List of tablesAN4323List of tablesTable 1.Applicable products1Table 2.Supported LCD controllers7Table 3.Supported EVAL boards and examples10Table 4.Font API23Table 5.Speed test list26Table 6.Speed test for the STM324xG-EVAL + FlexColor driver26Table 7.Module footprint27Table 8.Widget footprint28Table 9.FAQs29Table 10.Document revision history304/31DocID024959 Rev 1AN4323List of figuresList of figuresFigure 1.STemWin layers6Figure 2.Project tree8Figure 3.Structure of the STemWin Library examples10Figure 4.Alpha blending effect15Figure 5.Animated sprites16Figure 6.Cursors16Figure 7.Scaling and rotation effect using memdev17Figure 8.Shape antialiasing17Figure 9.Widget examples18Figure 10.VNC server usage19Figure 11.VNC client20Figure 12.The GUIBuilder application24DocID024959 Rev 15/31Library and package presentationAN43231 Library and package presentationThe STemWin Library package includes a set of firmware libraries and software tools used to build advanced and professional GUI-based applications.1.1 Licensing information· STemWin Library GUI files are provided in object format and licensed under MCD-ST Image Software License Agreement V2 (the “License”); you may not use this package except in compliance with the License. You may obtain a copy of the License at: · STemWin Library configuration and header files are provided in source format and licensed under MCD-ST Liberty Software License Agreement V2 (the “License”); you may not use this package except in compliance with the License. You may obtain a copy of the License at: Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.1.2 Library descriptionFigure 1 shows how STemWin is structured internally and how it can be implemented in a complete project.Figure 1. STemWin layers1. The CRC module (in RCC peripheral clock enable register) should be enabled before using the library.6/31DocID024959 Rev 1AN4323Library and package presentationSTemWin Library includes two optimized drivers:· Direct linear access (LIN) driver for the STM32F429 TFT-LCD controller with the DMA2D ChromART graphical acceleration engine,· FlexColor (indirect access) driver for serial and parallel bus external LCD controllers available on all STM32 EVAL boards.Refer to Table 2 for a list of all supported display controllers.Note:It is still possible to support any other LCD type just by implementing its own “custom” driver.In addition to the main application, the user has to set and customize two essential interface files:· LCD configuration file (LCDConf_stm32xxx_eval.c) LCD Display initialization and configuration LCD Display driver link and customizing Additional hardware capability management· GUI configuration file (GUIConf_stm32xxx_eval.c) Module selection (memory device, window manager) GUI memory and heap managementTable 2. Supported LCD controllersDriverSupported LCD controllersSupported bits/pixelsGUIDRV_LinThis driver supports every display controller with linear addressable video memory with a direct (full bus) interface. This means that the video RAM is directly addressable by the address lines of the CPU.The driver contains no controller-specific code. So it can also be used for solutions without display controller which require a driver which only manages the video RAM.16, 18Epson S1D19122FocalTech FT1509Himax HX8301, HX8340, HX8347, HX8352, HX8353, HX8325AHitachi HD66772Ilitek ILI9220, ILI9221, ILI9320, ILI9325, ILI9328, ILI9335,ILI9338, ILI9340, ILI9341, ILI9342, ILI9481GUIDRV_FlexColorLG Electronics LGDP4531, LGDP4551Novatek NT391221, 2, 4, 8,16, 24, 32OriseTech SPFD5408, SPFD54124C, SPFD5414DRenesas R61505, R61516, R61526, R61580Samsung S6D0117, S6E63D6Sitronix ST7628, ST7637, ST7687, ST7712, ST7735Solomon SSD1355, SSD1961, SSD1963, SSD2119Syncoam SEPS525DocID024959 Rev 17/31Library and package presentationAN43231.3 Package organizationFigure 2 shows the project tree.Standard and advanced librariesSTemWin Library:Config: global config file + templates GUIConf and LCDConf filesDocumentation: emWin User & Reference Guide Inc: header files of the STemWin components Lib: binary format libraries compiled for CM3 and CM4 cores (with and without OS support)OS: library interface with RTOSSoftware: PC applicationExamples implemented on all supported boardsSTM32_EVAL: standard evaluation boards hardware driverThird_Party: third-party drivers such as:- LwIP drivers- FreeRTOS driversMSv32145V1Binaries folder: contains all projects in .hex formatFigure 2. Project tree1.4 Delivered binariesSTemWin Library is distributed by ST as an object code library locked to STM32 products. The library is compiled for CM3 and CM4 cores, both with and without OS support.Note that the library is compiler-dependent (EWARM, MDK-ARM, TrueSTUDIO).8/31DocID024959 Rev 1AN4323Library and package presentationTo summarize, the folder “LibrariesSTemWinLibrary520dLib” contains twelve binaries:· STemWin520d_CM3_IAR.a· STemWin520d_CM3_Keil.a· STemWin520d_CM3_GCC.a· STemWin520d_CM3_OS_IAR.a· STemWin520d_CM3_OS_Keil.a· STemWin520d_CM3_OS_GCC.a· STemWin520d_CM4_IAR.a· STemWin520d_CM4_Keil.a· STemWin520d_CM4_GCC.a· STemWin520d_CM4_OS_IAR.a· STemWin520d_CM4_OS_Keil.a· STemWin520d_CM4_OS_GCC.aDocID024959 Rev 19/31Supported EVAL boards and examplesAN43232 Supported EVAL boards and examplesTable 3 lists the supported EVAL boards and examples.Table 3. Supported EVAL boards and examplesSTM32 Series/EVAL boardLCD interfaceLCD driverSTM32F1STM3210B-EVALSPIFlexColorSTM3210C-EVALSPISTM3210E-EVALFSMCSTM32100B-EVALSPISTM32100E-EVALFSMCSTM32F2STM322xG-EVALFSMCSTM32F3STM32303C-EVALSPISTM32373C-EVALSPISTM32F4STM324xG-EVALFSMCSTM32L1STM32L152-EVALSPISTM32L152D-EVALFSMCAs illustrated in Figure 3, each project contains two sub-projects:· RTOS-based example· Standalone exampleFigure 3. Structure of the STemWin Library examplesThe Config folder contains the two interface files described in Section 1.2:· GUIConf_stm32xxx_eval.c/.h· LCDConf_stm32xxx_eval.c/.h10/31DocID024959 Rev 1AN4323Supported EVAL boards and examplesIn the RTOS example, the Config directory also contains the Free RTOS configuration file (FreeRTOSConfig.h).The main application source code is located in the Demo folder. It consists of a generic demonstration composed of several sub-modules such as:· Radial menu (selects an icon from a radial menu using STemWin motion support)· List view (shows some features of the LISTVEW widget)· Bitmap (shows different bitmaps with and without compression)· Antialiased text (outputs anti-aliased text on various backgrounds)· Tree view (shows a hierarchical view of the files in a directory and some moving sprites)· Icon view (demonstrates the use of the ICONVIEW widget)All these modules cannot be fully supported on all EVAL boards: each example will contain more or less modules depending on the memory available on the board.The user can choose which module to activate in file GUIDEMO.h located under Demo. A portion of code (module selection) from the GUIDEMO.h file is shown below./*Configuration of modules to be used*/#ifndef#defineSHOW_GUIDEMO_BITMAPSHOW_GUIDEMO_BITMAP(1)#endif#ifndef #defineSHOW_GUIDEMO_COLORBAR SHOW_GUIDEMO_COLORBAR(0)#endif#ifndef #defineSHOW_GUIDEMO_CURSOR SHOW_GUIDEMO_CURSOR(1)#endif#ifndef #defineSHOW_GUIDEMO_GRAPH SHOW_GUIDEMO_GRAPH(1)#endif#ifndef #defineSHOW_GUIDEMO_LISTVIEW SHOW_GUIDEMO_LISTVIEW(1)#endifDocID024959 Rev 111/31Supported EVAL boards and examplesAN4323#ifndef#defineSHOW_GUIDEMO_SPEEDSHOW_GUIDEMO_SPEED(1)#endif#ifndef #defineSHOW_GUIDEMO_TREEVIEW SHOW_GUIDEMO_TREEVIEW(0)#endif#ifndef #defineSHOW_GUIDEMO_ICONVIEW SHOW_GUIDEMO_ICONVIEW(1)#endif#ifndef #defineSHOW_GUIDEMO_RADIALMENU SHOW_GUIDEMO_RADIALMENU(1)#endif#ifndef #defineSHOW_GUIDEMO_VSCREEN SHOW_GUIDEMO_VSCREEN(0)#endif#ifndef #defineSHOW_GUIDEMO_AUTOMOTIVE SHOW_GUIDEMO_AUTOMOTIVE(0)#endifNote that the VNC module (described in detail in Section 3.8) is activated by default with the following configurations:· STM324xG-EVAL + FreeRTOS· STM322xG-EVAL + FreeRTOSThe User directory includes the system-related files, the main program and, in some examples (where the VNC feature is supported), the network connection configuration files.12/31DocID024959 Rev 1AN4323How to use STemWin Library step by step3 How to use STemWin Library step by stepThis section provides an overview of the main features of STemWin Library, as well as the main settings and configuration steps. For further details, refer to the Seggers emWin User Manual.3.1 ConfigurationThe configuration is basically divided into two parts: GUI configuration and LCD configuration.· The GUI configuration covers the configuration of default colors and fonts and of available memory.· The LCD configuration is more hardware-dependent and enables the user to define the physical size of the display, the display driver and the color conversion routines to be used.When a new LCD controller needs to be supported, two essential files must be created, in addition to the already existing OS configuration file: GUIConf_stm32xxx_eval.c and LCDConf_stm32xxx_eval.c.3.1.1 GUIConf_stm32xxx_eval.cIn this file, the user should implement the GUI_X_Config() function which is the very first routine called during the initialization process. Its main task is to set up the available memory for the GUI and to then assign it to the dynamic memory management system.This operation is done via the GUI_ALLOC_AssignMemory() function: it passes a pointer to a memory block and its size (in bytes) to the memory manager.Note:The memory must be accessible and must be 8-, 16- and 32-bit wide. Memory access is checked during initialization.3.1.2 LCDConf_stm32xxx_eval.cThe main function here is LCD_X_Config(), called immediately after GUI_X_Config() has been executed. LCD_X_Config() allows creating and configuring a display driver for each layer by calling:· GUI_DEVICE_CreateAndLink(), which creates the driver device and links it to the device chain;· LCD_SetSizeEx() and LCD_SetVSizeEx(), to set the display size configuration;· Other driver-specific configuration routines such as: GUIDRV_FlexColor_Config(), in association with the usage of the FlexColor driver; LCD_SetVRAMAddrEx(), required in case of linear addressable memory.As mentioned in Section 1.2, STemWin Library comes with two optimized drivers, GUIDRV_Lin and GUIDRV_FlexColor, which cover all the LCDs embedded in ST EVAL- boards.DocID024959 Rev 113/31How to use STemWin Library step by stepAN4323For more details about usage of these drivers, please visit Seggers website: In general, when a new LCD type needs to be supported, the user should check if the same LCD controller is already supported, then he just has to update the already existing LCDConf_stm32xxx_eval.c.Another function, LCD_X_DisplayDriver(), is ca

    注意事项

    本文(AN4323 原版完整文件.docx)为本站会员(暗伤)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开