Hello! Welcome to Embedic!
This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Solutions > Industrial Electronics > Code table solution based on ST STM32 Cortex-M4 (STM32F4 or L4)

Code table solution based on ST STM32 Cortex-M4 (STM32F4 or L4)

The easiest way to implement a graphical interface on a single-chip computer system is to use a serial screen. However, in the application of a limited-size handheld computer, the serial screen is a bit bulky, and the board often cannot meet the needs, and the cost of custom-made serial screens is too high. This requires the use of a GUI framework to complete the graphical interface. The GUI frameworks in the MCU field include: ucgui (STemWin/emwin), TouchGFX, GuiLite, LittlevGL, etc.

The easiest way to implement a graphical interface on a single-chip computer system is to use a serial screen. However, in the application of a limited-size handheld computer, the serial screen is a bit bulky, and the board often cannot meet the needs, and the cost of custom-made serial screens is too high. This requires the use of a GUI framework to complete the graphical interface. The GUI frameworks in the MCU field include: ucgui (STemWin/emwin), TouchGFX, GuiLite, LittlevGL, etc.

Emwin provides more low-level functions (such as: drawing lines, drawing circles), and you can’t drag controls. The resulting interface is closer to the product of the pixel era. In the development of emwin, if you want to display the picture, you need to convert the picture to bmp format, then use BmpCvt to convert to an array, and finally use emwin's function to call this array, which is more troublesome.

TouchGFX can solve these problems well, but it can only be used on STM32 microcontrollers. This is because TouchGFX is a wholly-owned subsidiary of ST, and currently TouchGFX is only authorized to be used on ST chips.

On July 10, 2018, global semiconductor leader STMicroelectronics (ST) announced the acquisition of Draupner Graphics, the developer and supplier of TouchGFX software, marking a new chapter in TouchGFX. ST's acquisition of TouchGFX aims to provide highly advanced GUI solutions for embedded applications to expand the STM32 ecosystem. For both parties, it is undoubtedly a win-win result. This article will show you the powerful charm of TouchGFX and the advantages and convenience of STM32 as a GUI design platform through a mature application.

If a worker wants to do his job well, he must first sharpen his tools.

First, give the download address of the development tool:

TouchGFX:

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/touchgfxdesigner.html

STM32CubeIDE:

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-ides/stm32cubeide.html

STM32CubeProgrammer:

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stm32cubeprog.html

STM32CubeMX:

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html

Secondly, introduce related tools and their functions:

TouchGFX:

TouchGFX is an advanced free graphics software framework optimized for STM32 microcontrollers. Utilizing the graphics capabilities and architecture of STM32, TouchGFX accelerates the human-machine interface revolution of things by creating stunning graphical user interfaces similar to smartphones.

The TouchGFX framework includes TouchGFX Designer (TouchGFXDesigner), an easy-to-use, drag-and-drop-based graphics building PC tool, and a powerful and optimized graphics core TouchGFX engine. TouchGFX combines a WYSIWYG simulator and automatic code generation to make GUI development easy. It covers all steps from early design sketches to exclusive final products, through rapid iteration of the finished prototype.

TouchGFX Designer is a standalone software tool that allows simple and fast graphical evaluation and proof of concept. The TouchGFX framework, including the TouchGFX designer, is distributed in the STM32Cube MCU package. It is fully compatible with STM32CubeMX initialization and code generation tools, and can seamlessly develop graphics and main applications in a unified project environment.

STM32CubeIDE:

STM32CubeIDE is a multi-operating system integrated development tool, which is part of the STM32Cube software ecosystem.

STM32 CuBeIDE is an advanced C/C++ development platform with the peripheral configuration, code generation, code compilation and debugging functions of STM32 microcontrollers and microprocessors. It is developed based on the Eclipse®/CDT framework and GCC tool chain, and GDB is used for debugging. It allows the integration of hundreds of existing plug-ins, which complete the functions of Eclipse® IDE.

STM32CubeIDE integrates the STM32 configuration and project creation functions of STM32CubeMX, provides an all-in-one tool experience, and saves installation and development time. After selecting an empty STM32 MCU or MPU, or selecting a single board or an instance from a pre-assembled microcontroller or microprocessor, create a project and generate initialization code. During the development process, users can return to the initialization and configuration of peripheral devices or middleware at any time, and regenerate the initialization code without affecting the user code.

STM32CubeIDE includes build and stack analyzers, which provide users with useful information about project status and memory requirements.

STM32CubeIDE also includes standard and advanced debugging features, including views of CPU core registers, memory and peripheral registers, as well as real-time variable monitoring, serial line viewer interface or fault analyzer.

main feature

 

 

Service integration from STM32CubeMX:

STM32 single chip microcomputer, microprocessor, development platform and example program selection

Pin, clock, peripherals and middleware configuration

Project creation and initialization code generation

Software and middleware are completed by the enhanced STM32Cube expansion package

Based on Eclipse®/CDT, supports Eclipse® add-ons, GNU C/C++ for ARM® tool chain and GDB debugger

Other advanced debugging features include:

CPU core, peripheral registers and memory view

Real-time variable monitoring view

System analysis and real-time tracking (SWV)

CPU failure analysis tool

Support ST-LINK (STMicroelectronics) and J-LINK (SEGGER) debugging probes

Import projects from Atolonic®TrueSTUDIO® and AC6 System Workbench for STM32 (SW4SM32)

Multi-operating system support: only 64-bit versions of Windows®, Linux® and macOS®

STM32CubeProgrammer:

STM32CubeProgrammer (STM32CubeProgrammer, STM32CubeProgrammer) is a multi-operating system software tool for programming STM32 products.

It provides an easy-to-use and efficient environment for reading, writing, and verifying device memory through debugging interfaces (JTAG and SWD) and bootloader interfaces (UART, USB DFU, I2C, SPI, and CAN).

STM32CubeProgrammer provides multiple functions to program STM32 internal memory (such as Flash, RAM and OTP) and external memory.

STM32CubeProgrammer also allows option programming and uploading, programming content verification and programming automation through script programming.

STM32CubeProgrammer provides GUI (graphical user interface) and CLI (command line interface) versions.

STM32CubeMX:

STM32CubeMX is a graphical tool that allows very simple configuration of STM32 microcontrollers and microprocessors. It can also generate parts for Arm®Cortex®-M cores or Arm®Cortex®-a cores through a step-by-step process Linux® device tree.

The first step involves choosing: a stmicroelectronics STM32 microcontroller, microprocessor, or development platform that matches the required peripherals, or an example that runs on a specific development platform.

For microprocessors, the second step allows configuring GPIO and clock settings for the entire system, and interactively assigning peripherals to Arm®Cortex®-M or Cortex®A world. Specific utilities (such as DDR configuration and adjustment) make it easy to get started with STM32 microprocessors. For the Cortex®-M core, the configuration includes additional steps exactly similar to those described for the microcontroller.

For microcontrollers and microprocessors Arm®Cortex®-M, the second step includes configuring each required embedded software, thanks to the pinout conflict resolution program, clock tree setting assistant, power calculator, and configuring peripherals Utilities for devices (such as GPIO or USART) and middleware stacks (such as USB or TCP/IP).

The software stack and the software stack can be extended to the stm32 extension package. Stmicroelectronics or stmicroelectronics' partner software packages can be downloaded directly from the dedicated package manager provided in STM32CubeMX, while other software packages can be installed from a local drive.

In addition, a unique utility STM32PackCreator in the delivery of STM32CubeMX will help developers build their own enhanced STM32Cube expansion packs.

Eventually, the user will initiate a generation that matches the selected configuration options. This step provides the initialization C code of Arm®Cortex®-M, which can be used in multiple development environments, or provide part of the Linux® device tree for Arm®Cortex®-a. STM32CubeMX is delivered in STM32Cube.

main feature:

Intuitive selection of STM32 microcontrollers and microprocessors

Rich and easy-to-use graphical user interface, allowing configuration:

Pin output with automatic conflict resolution

Dynamic verification of Arm®Cortex®-M core peripherals and middleware function modes and parameter constraints

Clock tree with dynamic configuration verification

Power sequence with estimated consumption results

Generate IAR-compliant initialization C code project™, Keil® and STM32CubeIDE (GCC compiler) for Arm®Cortex®-M core

Generate partial Linux® device tree for Arm®Cortex®-a core (STM32 microprocessor)

Develop enhanced STM32Cube expansion package with STM32PackCreator

Integrate the STM32Cube expansion package into the project

As stand-alone software, run on Windows®, Linux® and macOS® (macOS® is a trademark of Apple Inc. registered in the United States and other countries) operating system and 64-bit Java runtime environment availability

Regarding the Cortex-M4 series, the demo examples made by ST's official development board are very cool. The following test video is for reference.

The following is a simple example to show the powerful charm of TouchGFX. With this, you can easily develop the GUI corresponding to the code table. Our customers do the same.

-1. Start interface, project and parameter configuration

-2. Template selection

-3. Template information

-4. Project configuration completed interface

 

-5. Design interface

-6. Window preview of controls and parameters

-7. Control loading and corresponding relationship

-8. Font control preview

-9. Font control parameter modification

-10. Picture window parameter configuration and modification

-11. Simulation run

-14. Code and debugging

The source code project file is in the TouchGFX project directory

After opening the effect, STM32CubeIDE is a composite version of STM32CubeMx+STM32TrueStudio, as shown in the screenshot below

Project window and source code:

So far, a simple example is introduced.

STM32CubeMx has been integrated in STM32CubeIDE, so I will not introduce it in detail.

The following STM32CubeProgrammer is a PC burning software, which can burn bin or Hex files to the target board separately, as shown in the screenshot below:

► Scenario application diagram

► Showcase photos

► Scheme block diagram

► GUI software development and debugging interface

► Code development and debugging

► Development environment supported by source code

► Core technical advantages

 Using STM32F469 discovery kit (32F469IDISCOVERY), users can develop

 Easy application on STM32F469 high-performance MCU with Arm®Cortex®-

 M4 core and Chrom-ART accelerator. Discovery kit supports extensive use

 Advanced graphics, audio, multi-sensor support, WVGA

 Color display, security, memory expansion and connection functions.

 Including embedded ST-LINK/V2-1 debugger/programmer. Dedicated add-ons

 The board can be connected through ARDUINO®Uno or expansion connector.

 It can be directly connected to this development board through TouchGFX to quickly develop GUI products.

► Solution specifications

Code table parameter specifications:

 GPS supports GPS/GPS+Beidou/GPS+GLONASS dual-star positioning

 Display 2.2-inch dedicated outdoor LCD color screen, resolution 240*320

 Operating temperature -10℃~50℃

 Product size 85*53.5*18.8mm

 Receiving antenna built-in antenna

 Altitude sensor barometric altimeter

 Temperature sensor support

 Waterproof grade IPX7

 The memory capacity is more than 3000 hours of riding data (depending on memory usage)

 Display data single screen can display up to 10 items of data, more than 80 optional data can be set freely

 Storage format fit

 The battery is non-removable lithium battery, which can be used continuously for 22 hours (without backlight, typical value). The GPS power saving mode is turned on and the backlight uses low brightness values ​​to effectively extend the use time.

 ANT+ support (heart rate, speed, cadence, power meter, etc.)

 MicroUSB charging interface, supporting data transmission

 Wireless interface Bluetooth 4.0BLE, WIFI 802.11 b/g/n

 Standard accessories iGS620 host*1, MicroUSB data cable*1, dedicated base*2, base pad*2, O-shaped rubber ring*4, instruction manual*1

 Optional accessories for speed, cadence, heart rate sensors, etc.

 

Corresponding development board specifications:

 STM32F469NIH6 microcontroller with 2 MB flash memory and 324 KB RAM, in BGA216 package

 Onboard ST-LINK/V2-1 SWD debugger, support USB re-enumeration function:

 Enable Mbed (mbed.org website)

 USB function: USB virtual COM port, mass storage, debugging port

 4-inch 800x480 pixel TFT color LCD with MIPI DSI interface and capacitive touch screen

 SAI audio DAC with stereo headphone output jack

 3 MEMS microphones

 MicroSD card connector

 I2C expansion connector

 4mx32 bit SDRAM

 128 Mbit quad SPI NOR flash memory

 Reset and wake button

 4-color user LED

 USB OTG FS with Micro AB interface

Three power options:

 Expansion header and Arduino™ UNO V3 connector

 Comprehensive free software, including various examples, part of the STM32Cube package

 Supported by a variety of integrated development environments, such as: STM32CubeIDE, Keil5, IAR, TrueStudio

Compare products

Compare Empty