ST STM32CubeH7 Скачать руководство пользователя страница 39

UM2222 Rev 2

39/76

UM2222 Functional description of STM32H743I-EVAL,  STM32H747I-EVAL and STM32H747I-DIS-

75

Functional description of STM32H743I-EVAL, 

 

STM32H747I-EVAL and STM32H747I-DISCO 

 

demonstration modules

8.1 STemWin

8.1.1 Audio 

player

Overview

The audio player module provides a complete audio solution based on the 
STM32H7 Series, and delivers a high-quality music experience. It supports playing music in 
WAV format but may be extended to support other compressed formats such as MP3 and 
WMA audio formats. 

Features

Audio format: WAV format without compression with 8 k to 96 k sampling

Embedded equalizer and loudness control

Performance: MCU Load < 5 %

Audio files stored in SD card or USB storage

Only 8-Kbyte RAM required for audio processing

Note:

MP3 format supported only by STM32H747 EVAL and Discovery boards.

Architecture

Figure 23

 shows the different audio player parts and their connections and interactions with 

the external components.    

Содержание STM32CubeH7

Страница 1: ...s and widgets memory management real time operating system The STM32CubeH7 demonstration platform is built around the powerful STemWin graphical library and the FreeRTOS real time operating system and...

Страница 2: ...torage units 17 3 9 Adding binary demonstration 19 3 10 Demonstration repository 21 3 11 Kernel components 22 3 12 Kernel core files 22 3 13 Hardware settings 23 4 How to create a new module 24 4 1 Cr...

Страница 3: ...ration modules 39 8 1 STemWin 39 8 1 1 Audio player 39 8 1 2 Video player 44 8 1 3 Rocket game 47 8 1 4 Clock and weather 48 8 1 5 Graphic effect 49 8 1 6 Dual core module 50 8 1 7 System information...

Страница 4: ...ule only H743I EVAL 63 8 3 8 Charts demonstration 63 8 3 9 Climate cabinet 64 8 3 10 Brick game 64 8 3 11 Fitness tracker 65 8 3 12 Paper cutter 65 8 3 13 Washing machine 66 9 Functional description o...

Страница 5: ...e 4 Jumpers for demonstration boards 23 Table 5 LCD frame buffer locations 28 Table 6 Modules footprint 36 Table 7 RAM requirements for some JPEG resolutions 36 Table 8 MemoSTemWin components memory r...

Страница 6: ...dio player module process 40 Figure 25 Audio player module startup 41 Figure 26 Connectivity of audio player module hardware 42 Figure 27 Video player module architecture 44 Figure 28 Video player mod...

Страница 7: ...ics accelerator module 62 Figure 60 Embedded wizard Waveform generator module 62 Figure 61 Embedded wizard Screen saver module 63 Figure 62 Charts demonstration 63 Figure 63 Climate cabinet 64 Figure...

Страница 8: ...series such as STM32CubeH7 for the STM32H7 Series which include STM32Cube hardware abstraction layer HAL ensuring maximized portability across the portfolio of STM32 32 bit Arm a Cortex based microcon...

Страница 9: ...able in a standalone application The kernel manages the full set of modules It provides access to all common resources and facilitates the addition of new modules as shown in Figure 2 Each module prov...

Страница 10: ...APIs and services allowing the user modules to benefit from all the hardware and firmware resources The kernel provides the tasks and services listed below Hardware and modules initialization BSP init...

Страница 11: ...g the HAL system clocks and then the hardware resources needed by the middleware components Touch screen SDRAM Quad SPI Flash memory Backup SRAM RTC Once the low level resources are initialized the ke...

Страница 12: ...OS through the CMSIS OS wrapping layer GUI thread this task initializes the demonstration main menu and then handles the graphical background task when requested by the STemWin Software timer managing...

Страница 13: ...on the screen to launch the main menu of the three demonstrations In the case of the STM32H747I DISC1 Discovery board provided without LCD screen board the demonstration software ends with blanking t...

Страница 14: ...ized and launched by the GUI thread Before the initialization of the menu the following actions are performed Draw the background image Restore general settings from backup memory Setup the main deskt...

Страница 15: ...k with ID_ICONVIEW_MENU 3 6 Module manager The kernel manages the modules It is responsible of initializing relative hardware and GUI resources common resources such as a storage unit graphical widget...

Страница 16: ...ule is a set of function and data structures which are defined in a global data structure and provide all the information and pointers to specific methods and functions to the kernel This later checks...

Страница 17: ...e STM32Cube demonstration kernel offers a storage unit that is usable to retrieve audio bitmaps and video media The storage unit is initialized during the platform startup and thus it is available to...

Страница 18: ...a work area f_open Open create a file f_close Close a file f_read Read a file f_write Write a file f_lseek Move read write pointer expand file size f_truncate Truncate file size f_sync Flush cached da...

Страница 19: ...ific demonstration address From the specific demonstration the user can go back to the main demonstration by doing a hardware reset The specific demonstration must provide a control button named Menu...

Страница 20: ...kup SRAM and a reset is performed During the next start the startup screen is bypassed and the main demonstration menu is directly shown Signature and base address define SPECIFC_DEMO_ADDRESS 0x081000...

Страница 21: ...e sources are divided into groups described as follows Core contains the kernel files GUI contains the module core manager the graphical aspect and the windowing management of the modules It contains...

Страница 22: ...FatFS FatFS file system FreeRTOS FreeRTOS real time operating system STemWin STemWin graphical library Table 3 Kernel core files list Function Description main c Main program file stm32h7xx_it c Inte...

Страница 23: ...ation boards Board Jumper Position description STM32H743I EVAL and STM32H747I EVAL JP3 Status not fitted The Bootloader_BOOT is managed by pin 6 of connector CN7 RS232 DSR signal when JP1 is closed Th...

Страница 24: ...to completely design the module appearance using drag and drop commands and then to generate a source code file to be included totally or partially into the application The file generated is composed...

Страница 25: ...ns just the new button drawing command Obviously the new callback must be associated to the graphical element in our case the Play button when it is created like below Figure 14 Graphics customization...

Страница 26: ...their respective initial values It is also possible to restore the backup parameters if any to be used during the dialog procedure WM_NOTIFY_PARENT describes the dialog procedure for example the defin...

Страница 27: ...an 1 it means that n frame buffers are used for drawing operation see section Error Reference source not found for the impact of multiple buffering on performance Virtual screens If the display area i...

Страница 28: ...RAM initialization The SDRAM external memory must be initialized before the GUI initialization to allow the SDRAM to be used as LCD layers frame buffer Table 5 LCD frame buffer locations Layer Address...

Страница 29: ...5 3 2 Touchscreen configuration The touchscreen is controlled by the BSP TS driver which uses the exc7200 component in case of the STM32H743I EVAL board and the ft6x06 component for the STM32H747I EV...

Страница 30: ...Demonstration customization and configuration UM2222 30 76 UM2222 Rev 2 The touch screen is initialized in k_BspInit following the used screen resolution as shown in the code below...

Страница 31: ...d to STM32F7 Series thanks to the hardware JPEG decoding and the support of hardware conversion from YCbCr to RGB using Chrom ART Accelerator 06Y 9 0 0 WKHUQHW 0 6 00 0 86 6 86 6 RUWH 0 3 57 6 00 0 0...

Страница 32: ...a back buffer After that all drawing operations take effect only on this back buffer After the drawing operation has been completed the back buffer becomes the front buffer Making the back buffer the...

Страница 33: ...layers and multiple displays are handled in the same way using the same API routines and are simply referred to as multiple layers even if the particular embedded system uses multiple displays Figure...

Страница 34: ...call can draw these bitmaps The following function is used to set up such a function LCD_SetDevFunc LayerIndex LCD_DEVFUNC_DRAWBMP_16BPP pFunc Filling operations Setting up the function for filling op...

Страница 35: ...g the STM32F7 Series the conversion from YCbCr to RGB is performed by software Using the STM32H7 Series the YCbCr to RGB conversion is accelerated by the Chrom ART allowing to reach 100 fps with 640x4...

Страница 36: ...decompression uses approximately 33 Kbytes of RAM for decompression independently of the image size and an amount of bytes depends on the image size The RAM requirement can be calculated as follows A...

Страница 37: ...ry requirements of basic application when using the Windows manager Memory devices 4 7 7 K Additional memory requirements of basic application when using memory devices Antialiasing 4 5 2 LCD_XSIZE Ad...

Страница 38: ...2 SCROLLBAR 1 14 SLIDER 1 16 TEXT 1 16 CALENDAR 1 32 1 The listed memory requirements of the widgets contain the basic routines required for creating and drawing the widget Depending on the specific w...

Страница 39: ...perience It supports playing music in WAV format but may be extended to support other compressed formats such as MP3 and WMA audio formats Features Audio format WAV format without compression with 8 k...

Страница 40: ...states the speaker and the volume value are initialized only when the play button in the audio player interface is pressed to start the process Figure 25 shows the audio player module startup from th...

Страница 41: ...UM2222 Rev 2 41 76 UM2222 Functional description of STM32H743I EVAL STM32H747I EVAL and STM32H747I DIS 75 Figure 25 Audio player module startup...

Страница 42: ...Functional description of STM32H743I EVAL STM32H747I EVAL and STM32H747I DISCO 42 76 UM2222 Rev 2 Hardware connectivity Figure 26 Connectivity of audio player module hardware...

Страница 43: ...stream Replace pause button by play button Stop Close the wave file from storage unit Suspend the audio task Stop audio playing Change the audio player state to AUDIOPLAYER_STOP Previous Point to the...

Страница 44: ...s Video files stored in SD card Use of the two LCD layers playback control and video display 64 Kbyte RAM required for JPEG decoding Figure 27 shows the different video player modules and their connec...

Страница 45: ...e startup Note After 5 seconds without touching the screen the video controls buttons Play Next Previous and Exit disappear 06Y 9 RQWUROV DWD DFTXLVLWLRQ 9LGHR SOD HU 0XOWL EXIIHULQJ QR IOLFNHULQJ 7ZR...

Страница 46: ...ing audio stream Replace play pause button by pause play button Previous Point to the previous AVI file Stop video playing Start playing the previous AVI file Next Point to the previous AVI file Stop...

Страница 47: ...ntrol the rocket by moving it on the screen The player has to collect the maximum number of coins to get the best score Functional description 1 Start the rocket game by touching the game icon see Fig...

Страница 48: ...erview The clock and weather module allows the time and date display and adjustment by changing the real time configuration RTC Note Only graphical aspect of the weather functionality is integrated 1...

Страница 49: ...date 4 Press Menu button to return to the main window of the module 8 1 5 Graphic effect Overview The graphic effect module demonstrates the computing capabilities of the platform to render a real ti...

Страница 50: ...platforms dual core capability while decoding four video files and rendering fractal bitmap Checking the check box offloads the fractal rendering on the second core CM4 This should decrease the CM7 c...

Страница 51: ...ayer module Overview The audio player module provides a complete audio solution based on the STM32H7 Series and delivers a high quality music experience It supports playing music in WAV format but may...

Страница 52: ...cube is visible in the center of the screen Figure 42 Graphics effect module 2 Moving the left slider changes the transparency and moving the right slider changes the scale 3 Swiping the cube results...

Страница 53: ...module Figure 44 The three video player menus video player left directory middle and playlist right 8 2 4 Time and calendar module Overview The time and calendar lets the user change the time and dat...

Страница 54: ...fter choosing a clock face the user can set the time and confirm it by pressing next 4 The last setting is the date which is set by pressing done If the icon in the top left corner the Time and calend...

Страница 55: ...ol module 2 In the light and security menus the user is able to turn the two settings ON OFF for single rooms and in the blinds menu the user is able to adjust how much the blinds are open Figure 48 M...

Страница 56: ...2H747I EVAL and STM32H747I DISCO 56 76 UM2222 Rev 2 8 2 6 Light effect module The light effect module shows the calculation capabilities of the STM32H7 microcontroller via an advanced controlled light...

Страница 57: ...en brightness When entering the module the user is presented with the Junction temperature and by swiping right the user is able to use a slider to adjust the screen brightness Figure 50 TouchGFX Exte...

Страница 58: ...e enabled or disabled by pressing the right button with the ST logo in the bottom 8 2 9 Knight hit zombie game The knight hit zombie game shows the graphic performance of the Chrom ART Accelerator and...

Страница 59: ...user can interact with the game board Figure 53 2048 Puzzle game module 2 To restart the game the user can select the button New Game 3 Simulating a game is done by pressing the Auto Play button and t...

Страница 60: ...ary file available under Demonstration binaries STM32CubeDemo_STM32H743 Eval_VX Y Z_FULL hex Figure 55 Embedded wizard demonstration 8 3 2 Video player module only H743I EVAL The video player module p...

Страница 61: ...aising filter Motion blur filter The CPU load metrics are displayed on the middle of top screen Figure 57 Embedded wizard Graphic effect module 8 3 4 TapTap plane module only H743I EVAL The TapTap pla...

Страница 62: ...r capabilities and how it offloads the CPU The five operations listed below are used Alpha8 blend Rectangle copy Bitmap copy Rectangle blend Bitmap blend Figure 59 Embedded wizard Graphics accelerator...

Страница 63: ...ule is used to display a rotating clock that provides the current time while it is spinning around the three axis x y and z The spinning operation uses intensive CPU calculation to highlight the CPU c...

Страница 64: ...64 76 UM2222 Rev 2 8 3 9 Climate cabinet Overview Graphic module showing a climate cabinet application Figure 63 Climate cabinet 8 3 10 Brick game Overview Control the paddle by touching and moving it...

Страница 65: ...43I EVAL STM32H747I EVAL and STM32H747I DIS 75 8 3 11 Fitness tracker Overview Graphic module showing a fitness tracker application Figure 65 Fitness tracker 8 3 12 Paper cutter Overview Graphic modul...

Страница 66: ...ctional description of STM32H743I EVAL STM32H747I EVAL and STM32H747I DISCO 66 76 UM2222 Rev 2 8 3 13 Washing machine Overview Graphic module showing Washing machine application Figure 67 Washing mach...

Страница 67: ...application provided in binary format System information display 9 1 Main graphical interface Overview The main graphical interface of the demonstration allows the user to select the application to la...

Страница 68: ...ce Cortex M7 and Cortex M4 scores based on this benchmark A simple touch on the screen starts the benchmark simultaneously on both Cortex M7 and Cortex M4 and displays the score on real STM32H745 devi...

Страница 69: ...ignals generator application 9 4 1 Overview This application is intended to demonstrate dual core and analog feature capabilities of the STM32H745 device Each core is configured to handle a specific a...

Страница 70: ...s The signal can be then injected into the Oscilloscope using an external wire connection from the DAC output pin to the ADC input pin The application provides an HMI on the board LCD display to chang...

Страница 71: ...ed by the ADC and sent by the Cortex M4 The communication between the PC application and the STM32H745I DISCO is ensured by the ST Link USB connector used as Virtual COM port Connect the STM32H745I DI...

Страница 72: ...gnal to be sampled by the oscilloscope connect external signal source to CN7 pin A2 The signal parameter must be as follow Amplitude from 0 to 3 3 V Frequency up to 1 MHz Figure 74 External signal to...

Страница 73: ...ISCO board side The user may select the type amplitude and frequency of the signal generator from the LCD by touching the corresponding buttons Figure 76 STM32H745I DISCO board screen If there is no u...

Страница 74: ...including the Cortex M7 and the internal FLASH and the LCD controller The D2 domain remains in run mode with Cortex M4 running from the local D2 RAM The signal generator output is switched off DAC is...

Страница 75: ...75 Revision history Table 12 Document revision history Date Revision Changes 8 Dec 2017 1 Initial version 12 Jun 2019 2 Updated Introduction Section 8 to add new supported boards and applications Add...

Страница 76: ...lection 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 b...

Отзывы: