background image

DocID026161 Rev 4

53/111

UM1743Demonstration functional description  (STM324x9I-EVAL, STM324xG-EVAL,  STM32F429I-

110

8.1.1 CPU 

usage

The CPU usage utility provides a graphical representation of the CPU usage evolution 
(

Figure 40

) during the demonstration run time starting for the first time it was launched. Note 

that once launched the CPU usage utilities keep running in background and can be restored 
in any time.

Figure 40. CPU usage

8.1.2 Kernel 

log

The kernel log utility gathers all the kernel and module messages and saves them into a 
dedicated internal buffer. The Log messages can be visualized at any time during the 
demonstration run time, as shown in 

Figure 41

.

Figure 41. Example of Log messages

Summary of Contents for STM32CubeF4

Page 1: ...ponents and widgets memory management Real Time operating system The STM32CubeF4 demonstration platform is built around the powerful graphical library STemWin and the FreeRTOS real time operating syst...

Page 2: ...ement 17 3 7 Modules manager 20 3 8 Direct open feature 22 3 9 Backup and settings configuration 23 3 10 Storage units 24 3 11 Clock and date 28 3 12 Memory management 29 3 13 Demonstration repository...

Page 3: ...Footprint 48 7 1 Kernel footprint 48 7 2 Module footprint 48 7 3 STemWin features resources 49 7 3 1 JPEG decoder 49 7 3 2 GUI components 49 8 Demonstration functional description STM324x9I EVAL STM32...

Page 4: ...corder 89 9 1 4 VNC server 92 9 1 5 Game 97 9 1 6 Garden control 97 9 1 7 Home Alarm 97 9 1 8 System information 98 10 Demonstration functional description STM32F412GDISCO 99 10 1 Modules 99 10 1 1 Au...

Page 5: ...ements 50 Table 14 Widget memory requirements 50 Table 15 Available settings 56 Table 16 Data structure for audio 61 Table 17 Audio module controls 63 Table 18 Video module controls 65 Table 19 Batch...

Page 6: ...e execution for STM32446E EVAL demonstration 23 Figure 20 Available storage units 24 Figure 21 Software architecture 26 Figure 22 Detection of storage units 27 Figure 23 Detection of storage units for...

Page 7: ...loudness frame 79 Figure 70 Background mode 79 Figure 71 Hardware connectivity 80 Figure 72 Video player module architecture 82 Figure 73 Video player module performance 83 Figure 74 Start video playe...

Page 8: ...architecture 102 Figure 104 Audio recorder module startup 103 Figure 105 Video recorder module architecture 104 Figure 106 Video recorder module startup 105 Figure 107 Analog clock module startup 106...

Page 9: ...cal software configuration tool that allows to generate C initialization code using graphical wizards A comprehensive embedded software platform delivered per series such as STM32CubeF4 for STM32F4 se...

Page 10: ...ately in a standalone application The full set of modules is managed by the Kernel which provides access to all common resources and facilitates the addition of new modules as shown in Figure 2 Each m...

Page 11: ...the hardware and firmware resources and provide the following tasks and services Hardware and modules initialization BSP initialization LEDs SDRAM Touch screen CRC SRAM RTC QSPI and audio GUI initiali...

Page 12: ...can be used in all demonstration platforms according to the availability and to the integrated modules Once the low level resources are initialized the kernel performs the STemWin GUI library initial...

Page 13: ...rofessional graphical stack library enabling Graphical User Interfaces GUI building up with any STM32 any LCD and any LCD controller taking benefit from STM32 hardware accelerations whenever possible...

Page 14: ...Kernel description UM1743 14 111 DocID026161 Rev 4 Figure 5 Startup window for STM32446E EVAL STM32F479I EVAL STM32F469I DISCO and STM32F412G DISCO demonstrations Figure 6 Main desktop window 06 9...

Page 15: ...111 UM1743 Kernel description 110 Figure 7 Main desktop window for STM32446E EVAL demonstration Figure 8 Main desktop window for STM32479I EVAL demonstration Figure 9 Main desktop window for STM32469I...

Page 16: ...d on STemWin graphical library ST animated icon view ST slider skin 3 5 1 ST animated icon view A new icon view widget is delivered with STM32F4 demonstration based on STemWin graphical library The ne...

Page 17: ...d Draw the background image Create the status bar not applicable for STM32F479I EVAL STM32F469I DISCO and STM32F412G DISCO demonstrations Restore general settings from backup memory Setup the main des...

Page 18: ...Kernel description UM1743 18 111 DocID026161 Rev 4 Figure 13 Status bar Figure 14 Status bar for STM32446E EVAL demonstration 06 9...

Page 19: ...re 16 Icon view widget for STM32446E EVAL demonstration A module is launched on simple click on the associated icon by calling to the startup function in the module structure this is done when a WM_NO...

Page 20: ...as the storage Unit the graphical widgets and the system menu Each module should provide the following functionalities and proprieties 1 Icon and graphical component structure 2 Method to startup the...

Page 21: ...demonstration A module is a set of function and data structures that are defined in a data structure that provides all the information and pointers to specific methods and functions to the kernel Thi...

Page 22: ...sion note that this functionality is not used in STM32F479I EVAL STM32F469I DISCO and STM32F412G DISCO demonstrations 3 8 Direct open feature The direct open feature allows launching a media module di...

Page 23: ...dules settings in two different methods 1 Using the RTC backup register 32 bits data width in this method the data to be saved should be a 32 bits data and could be defined as a bitfield structure exa...

Page 24: ...re initialized during the platform startup and thus they are available to all the modules during the STM32CubeF4 demonstration run time These two units are accessible through the standard I O operatio...

Page 25: ...pendent features Table 2 File system interface APIs Function Description f_mount Register Unregister a work area f_open Open Create a file f_close Close a file f_read Read file f_write Write file f_ls...

Page 26: ...n high speed and the microSD BSP drivers the software architecture is shown in Figure 21 Figure 21 Software architecture The FatFS is mounted upon the USB Host mass storage class and the SD BSP driver...

Page 27: ...e detection is handled internally by the kernel and the status bar shows the icons of the available media as shown in Figure 22 and in Figure 23 Figure 22 Detection of storage units Figure 23 Detectio...

Page 28: ...ing the time and date displayed in the status bar of the main desktop Time and date could be changed through the system module as shown in Figure 24 and in Figure 25 Table 3 APIs from the RTC module F...

Page 29: ...E EVAL demonstration Note The clock and the date are not shown in STM32F479I EVAL and STM32F469I DISCO demonstrations 3 12 Memory management A huge amount of system RAM is allocated to the GUI interna...

Page 30: ...tus after each memory allocation or deallocation operations For the STM32CubeF4 demonstration the memory heap is located in the CCM data RAM Figure 26 Memory heap for STM32CubeF4 demonstration The mem...

Page 31: ...SPI configured in memory mapped mode to the STM32 address space and seen by the system as if it were an internal memory This mode provides a direct interface to access data from external SPI memory an...

Page 32: ...re divided into five groups described as follows 1 Core contains the kernel files 2 Modules contains the system and user modules including the graphical aspect and the modules functionalities 3 Binary...

Page 33: ...System FatFS FATFS File system FreeRTOS FreeRTOS Real Time Operating System STemWin STemWin Graphical Library USBD_Library USB Device Library Mass Storage Class USBH_Library USB Host Library Mass Stor...

Page 34: ...stration boards STM32F412G DISCO Table 7 Jumpers for different demonstration boards Board Jumper Position description STM324x9I EVAL JP16 Not fitted used for USB device module JP4 JP5 2 3 used for Aud...

Page 35: ...r VNC server demonstration JP2 Fitted Power on MCU JP17 JP18 2 3 used for Audio recorder demonstration JP11 Fitted disables the NOR Flash write protection STM32F469I DISCO JP5 Fitted Power on MCU STM3...

Page 36: ...e 29 that allows easily and quickly creating the module frame window and all its components in few steps For more information about the GUI Builder refer to the emwin User and reference guide UM03001...

Page 37: ...one Below an example of a custom callback for the Play button On the code portion above the _OnPaint_play routine contains just the new button drawing command Note that the new callback should be ass...

Page 38: ...s also possible here to restore the backup parameters if any that will be used during the dialog procedure WM_NOTIFY_PARENT describes the dialog procedure for example define the behavior of each butto...

Page 39: ...le of how to open a file using the adequate module from the file browser Figure 31 Direct open from file browser In the STM32CubeF4 demonstration there are three modules linked to the file browser con...

Page 40: ...buffering on performance Virtual screens If the display area is greater than the physical size of the LCD NUM_VSCREENS should be set to a value greater than 1 Note that virtual screens and multi buffe...

Page 41: ...dedicated routines is included in the demonstration package and regrouped into k_calibration c file Figure 33 Figure 33 k_calibration c location To do this after the startup screen is displayed the u...

Page 42: ...r STM32F479I EVAL and STM32F469 DISCO demonstrations 5 4 BSP customization 5 4 1 SDRAM configuration The SDRAM capacity is 1 Mbyte x 32 bits x 4 banks The BSP SDRAM driver offers a set of functions to...

Page 43: ...me before its stocking in the selected storage unit 5 4 2 Touch screen configuration The touch screen is controlled by the BSP TS driver that uses the BSP IO driver in case of STM32429 EVAL STM32446E...

Page 44: ...n customization and configuration UM1743 44 111 DocID026161 Rev 4 Figure 36 Touch screen initialization The touch screen is initialized in k_BspInit following the used screen resolution as shown in th...

Page 45: ...s refreshed by the display controller approximately 60 times per second After each period there is a vertical synchronization signal known as VSYNC signal The best moment to make the back buffer the n...

Page 46: ...n makes sure that in each case where multiple colors or index values need to be converted the DMA2D is used b Drawing of index based bitmaps when drawing index based bitmaps STemWin first loads the pa...

Page 47: ...foreground buffer used for fading memory devices GUI_SetFuncMixColorsBulk pFunc h General alpha blending The following function replaces the function which is used internally for alpha blending operat...

Page 48: ...tprint Table 10 shows the code memory data memory and the constant memory used for each kernel file 7 2 Module footprint Table 11 shows the code memory data memory and the constant memory used for eac...

Page 49: ...ons memory requirements of various modules are listed as well as the memory requirements of example applications Table 13 shows the memory requirements of the main components of STemWin These values d...

Page 50: ...ay configuration additional memory is required for each additional layer because each requires its own driver Core 5 2 Kbytes 80 bytes Memory requirements of a typical application without using additi...

Page 51: ...bytes 16 bytes 1 TEXT 1 0 Kbytes 16 bytes 1 CALENDAR 0 6 Kbytes 32 bytes 1 1 The listed memory requirements of the widgets contain the basic routines required for creating and drawing the widget Depen...

Page 52: ...d date and a system utilities button to allow getting system information like running task CPU usage and kernel log The icon view widget contains the icons associated to added modules User can launch...

Page 53: ...run time starting for the first time it was launched Note that once launched the CPU usage utilities keep running in background and can be restored in any time Figure 40 CPU usage 8 1 2 Kernel log The...

Page 54: ...s system information general settings and clock settings to set the global demonstration settings The system module retrieves demonstration information from internal kernel settings data structures an...

Page 55: ...DocID026161 Rev 4 55 111 UM1743Demonstration functional description STM324x9I EVAL STM324xG EVAL STM32F429I 110 Figure 43 Demonstration global information Figure 44 Demonstration general settings...

Page 56: ...re 45 Clock setting Table 15 Available settings Configuration item Description Enable sprites Checking this box allows the sprites to move on the background desktop Enable background mode Not used res...

Page 57: ...e The file list structure is built during the media connection and updated after a connection status change of one of the used media Figure 46 File browser Functional description The file browser is m...

Page 58: ...he associated application with this extension is launched and the file is opened automatically Figure 48 b Delete file selecting a file for deletion will display a confirmation message box to confirm...

Page 59: ...ration is based on the Reversi game It is a strategy board game for two players played on an 8 8 board The goal of the game is to have the majority of disks turned to display your color when the last...

Page 60: ...the start speed benchmark button is pressed After few seconds the result is displayed in red below the CPU Usage graphical window and result is logged in the right list box with date and time stamp F...

Page 61: ...scription of each of them Table 16 Data structure for audio Structure Description WAV_InfoTypedef Contains the wave file information extracted from wave file header AUDIOPLAYER_ProcessTypdef Contains...

Page 62: ...u direct open feature Figure 53 Audio player module startup When the audio player is started the following actions are executed The graphical components are initialized The audio frame The control but...

Page 63: ...PLAYER_STOP Previous button Point to the previous wave file Stops audio playing Starts playing the previous wave file if play button is pressed Next button Point to the next wave file Stops audio play...

Page 64: ...n movie API It supports playing movie in emf format Architecture Figure 54 shows the different video player modules and their connections and interactions with the external components Figure 54 Video...

Page 65: ...ontrol button Table 18 Video module controls Button Preview Description Play button Checks if the video size is not supported Supported video size 0 xSize 1024 and 0 ySize 768 Changes the video player...

Page 66: ...rts playing the next video file if play button is pressed Add file to playlist Opens file browser window and choose emf file from available storage unit to be added to playlist Add folder Opens file b...

Page 67: ...tion functional description STM324x9I EVAL STM324xG EVAL STM32F429I 110 Figure 56 EMF generation environment b Create an emf file from JPEG file using JPEG2Movie tool available in STemWin package see...

Page 68: ...file generation For more information about how to use the emf generation batches refer to the STemWin User and Reference Guide UM3001 Table 19 Batch files description File Explanation Prep bat Sets so...

Page 69: ...e complete path required to call FFmpeg exe JPEG2MOVIE Access variable for the JPEG2MOVIE tool Should contain the complete path required to call JPEG2Movie exe DEFAULT_SIZE Default movie resolution to...

Page 70: ...file folder It will have the same name as the source file with a size postfix and emf extension X_SIZE x Y_SIZE bat These files are small but useful helpers if several movie resolutions are required...

Page 71: ...on in the main desktop as in Figure 60 Figure 60 USBD module startup Table 22 Data structure for USBD module Structure Description USBDSettingsTypeDef sd_mounted connection status Table 23 USBD module...

Page 72: ...addition to brightness and contrast which are adjustable several effects can be applied to the output image black and white negative antique etc Note that all these effects can be applied in runtime...

Page 73: ...he Camera icon as indicated in Figure 62 Figure 62 Camera module startup When the camera module is started the following actions are executed The graphical components are initialized Memory is allocat...

Page 74: ...r can be changed on the fly there is no need to restart the module Architecture Figure 63 shows the different image viewer parts and their respective connections and interactions with the external com...

Page 75: ...by touching the Image viewer icon Figure 64 Or by using the file browser contextual menu direct open feature When the image viewer is started the following actions are executed The graphical componen...

Page 76: ...eshes the image frame Updates the selection in the playlist Start slideshow Closes the current image Opens the next image Refreshes the image frame Creates the slideshow timer Next Closes the current...

Page 77: ...essed formats such as MP3 and WMA audio formats Features Audio Format WAV format without compression with 8k to 96 k sampling Embeds an equalizer and loudness control Performance MCU Load 5 Audio file...

Page 78: ...n the startup step all the audio player states the speaker and the volume value are initialized when the Play button in the audio player interface is pressed to start the process start audio player mo...

Page 79: ...description STM32F479I EVAL and STM32F469I DISCO 110 Figure 68 Adding audio files to the playlist Figure 69 Equalizer and loudness frame Figure 70 Background mode 06 9 FWLYDWH EDFNJURXQG PRGH LV GLVSO...

Page 80: ...P_AUDIO_OUT_Play function in BSP audio driver Replaces play button by pause button Pause Suspends the audio task Pauses the audio file stream Replaces pause button by play button Stop Close the wave f...

Page 81: ...wave file to be added to playlist Add folder Open file browser window and choose entire folder to be added to playlist Repeat At the end of file If repeat all is selected next wave file is selected a...

Page 82: ...up to 15 fps Video files stored in USB Disk flash USB High Speed Use of the 2 LCD layers Playback control Video display 64 Kbytes of RAM required for JPEG decoding Architecture and performance Figure...

Page 83: ...the video player is started the icon shown in Figure 74 is displayed Add video file to playlist by touching Add to playlist icon as in Figure 75 Play video file by touching Play video icon If there is...

Page 84: ...Demonstration functional description STM32F479I EVAL and STM32F469I DISCO UM1743 84 111 DocID026161 Rev 4 Figure 75 Adding files to the playlist Figure 76 Warning popup Figure 77 Video is playing 06 9...

Page 85: ...e unit Replaces play button by pause button Pause Pauses the video file stream Changes the video player state to VIDEO_PAUSE Replaces pause button by play button Next Points to the next video file Sto...

Page 86: ...f any MPEG file format into a folder of single JPEG files for each frame see Figure 79 The free FFmpeg available at ffmpeg website can be used 2 Create an emf file from JPEG file using JPEG2Movie tool...

Page 87: ...alled by the MakeMovie bat To be able to use the batch files it is required to adapt this file at first This file sets variables used by the file MakeMovie bat listed in Table 29 Table 28 Batch file d...

Page 88: ...d as parameter s for FFmpeg exe User can Table 29 Variable description Variable Description OUTPUT Destination folder for the JPEG files Will be cleared automatically when starting the conversion with...

Page 89: ...audio frames in WAV format save them in the storage unit and play them later Features Audio Format WAV format without compression with 16k sampling stereo Performance MCU Load 5 Recorded files stored...

Page 90: ...in Figure 83 Press on the Record icon to start recording see Figure 84 Click on Stop icon to save the recorded data in USB disk or Click cancel to discard them Figure 85 Click on Play to listen to th...

Page 91: ...ty Table 31 Audio module controls Button Preview Description Play Reads the recorded wave file from storage unit Replaces Discard start button by play button Pause Suspends the audio task Pauses the a...

Page 92: ...on the TCP IP LwIP stacks socket IP address assigned by DHCP Secured mode supported DES encryption Performance MCU load 4 standalone Background mode support Architecture Figure 88 shows the different...

Page 93: ...Functional description Click on the VNC Server icon Figure 89 Enable or disable secure mode Figure 90 Start the VNC server Figure 91 Check that VNC Connection is established and IP Address assigned F...

Page 94: ...stration functional description STM32F479I EVAL and STM32F469I DISCO UM1743 94 111 DocID026161 Rev 4 Figure 90 Enable Disable secure mode Figure 91 Start VNC server Figure 92 IP address assigned 06 9...

Page 95: ...Demonstration functional description STM32F479I EVAL and STM32F469I DISCO 110 Figure 93 Run VNC Client Figure 94 Background mode 06 9 06 06 9 FWLYDWH EDFNJURXQG PRGH LV GLVSOD HG LQ WKH PDLQ PHQX DQG...

Page 96: ...dware connectivity Figure 95 Hardware connectivity Table 32 VNC server module controls Button Preview Description Background Activates background and any other module can be started Stop Stops the VNC...

Page 97: ...user to start a new game when the ongoing one is over 9 1 6 Garden control Overview Control a garden watering system behavior made with 2 independent circuits one for a series of sprinklers and anothe...

Page 98: ...c picture simulated as home camera as indicated in Figure 99 Figure 99 Watching a room Note Static pictures are used instead of camera streaming 9 1 8 System information Overview The system informatio...

Page 99: ...ts playing music in WAV format but may be extended to support other compressed formats such as MP3 and WMA Features Audio format WAV format without compression with 8 k to 96 k sampling Audio files st...

Page 100: ...module from the main desktop menu as shown in Figure 102 Figure 102 Audio player module startup Table 33 Audio player module controls Button Preview Description Play Reads the wave file from storage...

Page 101: ...1 Rev 4 101 111 UM1743 Demonstration functional description STM32F412GDISCO 110 Volume down Decreases the volume Exit Closes the module Table 33 Audio player module controls continued Button Preview D...

Page 102: ...atures Audio Format WAV format without compression with 16 k sampling stereo Recorded files stored in SD Card Embeds quick audio player Only 8 Kbytes of RAM required for audio processing The MP3 forma...

Page 103: ...le startup Table 34 Audio recorder module controls Button Preview Description Record Starts recording audio Replaces record button by pause button Play Reads the recorded wave file from the storage un...

Page 104: ...olution based on the STM32F4xxx and the STemWin movie APIs It supports the AVI format Features Video Format AVI Performance frame rate up to 13 fps Video files stored in SD Card Architecture Figure 10...

Page 105: ...STM32F412GDISCO 110 Functional description Start video recorder module by touching the audio recorder icon as indicated in Figure 106 When the video player is started the first AVI file stored in the...

Page 106: ...enables to show and adjust the analog time by changing the RTC configuration Functional description 1 Start analog clock module by touching the analog clock icon Figure 107 Figure 107 Analog clock mod...

Page 107: ...e Micro SD memory Architecture Figure 109 shows the different video player modules and their connections and interactions with the external components Figure 109 USBD module architecture Functional de...

Page 108: ...6 System information Overview The system information module shows key information such as used board part number the current CPU clock and demonstration revision Functional description The system info...

Page 109: ...for STM32446E EVAL demonstration Figure 23 Detection of storage units for STM32446E EVAL demonstration Figure 26 Memory heap for STM32CubeF4 demonstration footnote 1 in Section 4 5 Module s direct op...

Page 110: ...12G DISCO demonstrations Figure 28 STM32Cube demonstration boards Section 3 12 Memory management Section 3 16 Hardware settings Table 7 Jumpers for different demonstration boards Table 8 LCD frame buf...

Page 111: ...chasers 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...

Reviews: