Arm arm926el-s based 32-bit microprocessor (57 pages)
Summary of Contents for Nuvoton M032
Page 1
The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton. Nuvoton is providing this document only for reference purposes of NuMicro microcontroller based system design. Nuvoton assumes no responsibility for errors or omissions.
GUI for any application that operates with a graphical display. Nuvoton provides emWin GUI library for free with the M032 series microcontroller (MCU) supporting up to 320x240 (16 bpp) resolution. The emWin platform can be implemented on HMI for industrial, machines, appliances, etc.
M032 emWin 2.5 Library (ThirdParty\emWin\Lib) NUemWin_CM0_Keil.lib emWin library Keil for M032 series MCU. libNUemWin_CM0_GNU.a emWin library GNU for M032 series MCU. NUemWin_CM0_IAR.a emWin library IAR for M032 series MCU. 2.6 Tools (ThirdParty\emWin\Tool) BmpCvtNuvoton.exe The Bitmap Converter is designed for converting common image file formats like BMP, PNG or GIF into the desired emWin bitmap format.
M032 emWin 3 emWin Sample Code There are two emWin sample codes in the M032 BSP SampleCode\NuMaker directory: emWin_GUIDemo: utilizes the emWin library to demonstrate widgets feature; emWin_SimpleDemo: utilizes the emWin library to demonstrate interactive feature. 3.1 Project Structure The following uses emWin_SimpleDemo as a sample to explain the emWin project structure in BSP.
M032 emWin 3.2 System Initialization The system initialization code is located in main function, including peripheral clock preparation, multi-function pin configuration, and UART debug port setting. Also, a 1000Hz timer is configured to keep track of time elapsed. int main(void) // Init System, IP clock and multi-function I/O _SYS_Init();...
M032 emWin while (1) GUI_Delay(1000); 3.4 Build emWin Project To build the emWin project in Keil MDK, click the rebuild icon as shown below or press F7 function key. 3.5 Download and Run Press Ctrl + F5 to download the application and start a debug session or click start/stop debug session icon as shown below.
M032 emWin 3.6 Touch Screen To support resistive touch screen, use ADC to convert the voltage of X axis and Y axis, and then use the open source tslib to map the ADC conversion result into the coordination. The conversion result can be affected by power noise, mechanical misalignment, etc. To overcome this issue, the tslib supports calibration function, and the calibration parameter is stored ether in APROM.
M032 emWin 4 emWin GUIBuilder 4.1 Create Widget Segger provides a Windows tool GUIBuilder to create application with drag and drop interface. The tool is located under the ThirdParty\emWin\Tool\ directory. This tool can generate a file named FramewinDLG.c for the widget of target application. Please refer to chapter 20 of UM03001_emWin5.pdf for the usage of GUIBuilder.
Page 13
M032 emWin sprintf(sBuf,"%d ", value); hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); EDIT_SetText(hItem, sBuf); // USER START (Optionally insert additional code for further widget initialization) // USER END break; case WM_NOTIFY_PARENT: = WM_GetId(pMsg->hWinSrc); NCode = pMsg->Data.v; switch(Id) case ID_BUTTON_0: // Notifications sent by '+ 1'...
M032 emWin 5 Change Display Panel 5.1 emWin Display Configuration emWin declares its display panel resolution in LCDConf.c under the ThirdParty\emWin\Config\ directory. The resolution is different from the touch panel resolution defined in the TouchPanel.h. This is because the panel is a portrait display and data is swapped before output for a landscape view by LCD driver IC.
M032 emWin 6 Supporting Resources Segger provides an emWin supporting forum. Questions regarding emWin usage are discussed at: https://forum.segger.com/index.php/Board/12-emWin-related/. The M032 system related issues can be posted in Nuvoton’s HMI/GUI forum at: http://forum.nuvoton.com/viewforum.php?f=31. Oct. 03, 2019 Page 15 of 17...
Page 16
M032 emWin Revision History Date Revision Description 2019.10.03 1.00 Initially issued. Oct. 03, 2019 Page 16 of 17 Rev 1.00...
Page 17
M032 emWin Important Notice Nuvoton Products are neither intended nor warranted for usage in systems or equipment, any malfunction or failure of which may cause loss of human life, bodily injury or severe property damage. Such applications are deemed, “Insecure Usage”.
Need help?
Do you have a question about the M032 and is the answer not in the manual?
Questions and answers