ST STM32303C-EVAL User Manual
ST STM32303C-EVAL User Manual

ST STM32303C-EVAL User Manual

Demonstration firmware
Hide thumbs Also See for STM32303C-EVAL:
Table of Contents

Advertisement

Quick Links

Introduction
This user manual describes the demonstration firmware running on the STM32303C-EVAL
evaluation board, which can be used to evaluate the capabilities of the STM32F30x/31x
microcontroller and on-board peripherals.
This demo contains many applications that can be easily reused, such as dual interface (I2C
and RF) EEPROM application (ESL and DataLogger), infrared RC5 and SIRC receiver and
transmitter, RTC calendar, file system FAT implementation on SD Card, wave player using
STM32 I2S peripheral, temperature sensor interfacing and TFT LCD.
The STM32303C-EVAL demonstration firmware is provided with the demonstration
programmed in the internal Flash memory, and all the files needed by the demonstration are
programmed in the MicroSD card. The demonstration is executed at each reset (board
power-up, external reset, etc.).
In case the STM32303C-EVAL board was not factory-programmed, or the demonstration
application was erased, or the STM32303C-EVAL board configuration needs to be modified,
the Bootloader, IAP or STM32 STLink Utility can be used to program this file. For more
details, refer to
STM32303C-EVAL demonstration
Note:
Before you execute the demonstration, make sure that all EVAL board jumpers are well
configured. For more details, refer to
configuration.
This demonstration firmware and other firmware packages are available for download from
the STMicroelectronics website: www.st.com.
Table 1.
Evaluation tools
November 2012
STM32303C-EVAL demonstration firmware
Section 3: STM32303C-EVAL demonstration package
Applicable products and tools
Type
STM32303C-EVAL
Doc ID 023892 Rev 1
programming.
Chapter 1.9.12: STM32303C-EVAL board jumper
Applicable products and tools
UM1590
User manual
and
Section 4:
www.st.com
1/65

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32303C-EVAL and is the answer not in the manual?

Questions and answers

Summary of Contents for ST STM32303C-EVAL

  • Page 1 In case the STM32303C-EVAL board was not factory-programmed, or the demonstration application was erased, or the STM32303C-EVAL board configuration needs to be modified, the Bootloader, IAP or STM32 STLink Utility can be used to program this file. For more...
  • Page 2: Table Of Contents

    Embedded ST-LINK ........
  • Page 3 About submenu ......... . . 60 STM32303C-EVAL demonstration package ..... 61 STM32303C-EVAL demonstration programming .
  • Page 4 List of tables UM1590 List of tables Table 1. Applicable products and tools ..........1 Table 2.
  • Page 5 ST logo ........
  • Page 6 List of figures UM1590 Figure 49. Stop mode entered exit EXTI ..........42 Figure 50.
  • Page 7: Functional Description Of The Evaluation Board

    MS31374V1 Power control The evaluation board can be powered from an external 5 V supply, from the USB connector or from the ST-Link connector. All other required voltages are provided by on-board voltage regulators. Doc ID 023892 Rev 1 7/65...
  • Page 8: Clocking

    An ST-LINK is integrated on the board as an embedded in-circuit debugger and programmer for the STM32F30x/31x MCU. Display devices 1.7.1 A TFT color LCD module is mounted on the STM32303C-EVAL board. It is interfaced through the embedded SPI peripheral. 1.7.2 LEDs Four general-purpose LEDs are available.
  • Page 9: Interfaces

    ● IrDA transceiver U10 is connected to USART1 of the board STM32F30x/31x. Miscellaneous peripherals 1.9.1 Joystick The STM32303C-EVAL evaluation board features a four-direction joystick with a selection button at the center named SEL. 1.9.2 Push-buttons The following push-buttons are available: ●...
  • Page 10: Brightness Led

    STM32F30x/31x through PC8 and measured result of HS1101LF is connected with PB0. 1.9.10 Temperature sensor The STM32303C-EVAL evaluation board includes a temperature sensor connected to the I2C2 peripheral. 1.9.11 Touchsensing buttons The STM32303C-EVAL evaluation board supports two touchsensing buttons based on either RC charging or charge transfer technology.
  • Page 11: Running The Demonstration

    UM1590 Running the demonstration Running the demonstration Menu Figure 2 shows the menu architecture of the STM32303C demonstration. The main menu is shown on the left-hand side. The UP, DOWN, RIGHT and LEFT joystick directions allow the user to navigate between items in the main menu and the submenus. To enter a submenu, press the SEL push-button.
  • Page 12: Figure 2. Structure Of The Demonstration Menus

    Running the demonstration UM1590 Figure 2. Structure of the demonstration menus Adjust Time Show Return StopWatch Adjust Organizer Date Show Return LapTimer Adjust Alarm Show Return ImageViewer Image Viewer Return WavePlayer Audio Return IR Transmitter Return Connectivity Main menu Mass Storage IR Receiver Return Return...
  • Page 13: Demonstration Startup

    UM1590 Running the demonstration 2.1.1 Demonstration startup After a board reset, at demonstration startup, the system checks if a MicroSD memory card is already present in connector CN16. If no card is detected, the demonstration does not start and the message shown in Figure 3 is displayed on the LCD screen.
  • Page 14: Figure 5. St Logo

    Running the demonstration UM1590 However, if the icons are correctly loaded in the MicroSD Card memory, the welcome screen is displayed and the ST logo appears on the LCD (see Figure Figure 5. ST logo Then, after one second, an STM32F3 presentation slide is displayed on the LCD screen.
  • Page 15: Figure 8. Main Menu

    UM1590 Running the demonstration parameters in the organizer menu. To set the time/date, use the joystick UP/DOWN and SEL push-buttons, please refer to Section 2.4.1: Organizer. If the time configuration has already been done, then the number of elapsed days (higher than 1 day) from the last time the demonstration board was powered up appears on the LCD screen.
  • Page 16: Navigation

    Running the demonstration UM1590 2.1.2 Navigation The demonstration menu is based on circular navigation, submenu selection, item selection and back navigation as described in Figure Figure 10. Navigating in the demonstration menus Right Right Right Item 1 Item 2 Item 3 Item 4 Left Left...
  • Page 17: Clock Sources

    UM1590 Running the demonstration Clock sources 2.2.1 Clock control The STM32F30x/31x internal clocks are derived from the HSE (clocked by the external 8 MHz crystal). In this demonstration application, the various system clocks are configured as follows: ● System clock is set to 72 MHz: the PLL is used as the system clock source: 72 MHz. ●...
  • Page 18: Clock Failure

    Running the demonstration UM1590 2.2.2 Clock failure At any demonstration level, if no clock is present on OSC_IN (broken or disconnected crystal), the message shown in Figure 12 is displayed on the LCD screen. Figure 12. No HSE clock detected If the 8 MHz crystal is not reconnected in the next few seconds, the MCU enters Standby mode.
  • Page 19: Stm32F30X/31X Resources

    UM1590 Running the demonstration STM32F30x/31x resources 2.3.1 Peripherals All used peripherals are described in Table Table 2. STM32F30x/31x demonstration peripherals Used peripherals Application COMP Applications(HBLed_LDR) Applications (HBLed_LDR) Wave player Menu navigation + joystick + push-button + low power mode+ wave EXTI player + applications GPIO...
  • Page 20: Interrupts

    Running the demonstration UM1590 2.3.2 Interrupts Table 3 shows all the enabled interrupts. Table 3. STM32F30x/31x demonstration interrupts Interrupts Priority Used for Priority: 3 MicroSD Card detection, Menu EXTI9_5 navigation Subpriority: 0 Priority: 3 EXTI15_10 Menu navigation Subpriority: 0 Priority: 0 I2C2 Error SMBus Alert interrupt Subpriority: 0...
  • Page 21: Internal Memory Size

    2.3.5 External memory organization The STM32303C-EVAL demonstration is based on an embedded free FAT file system, FatFs. The file system is needed to read all media information from the on-board MicroSD card memory. The MicroSD card memory is organized in three subdirectories: ●...
  • Page 22: Figure 15. Microsd Card Organization

    Running the demonstration UM1590 Figure 15. MicroSD card organization Note: The user can add his/her 16-bit bitmap images (320x240) and wave files in the USER folder. At any demonstration level, if the MicroSD card is removed, the demonstration stops and the message shown in Figure 16 is displayed on the LCD screen.
  • Page 23: Demonstration Applications

    UM1590 Running the demonstration Demonstration applications The following section provides a detailed description of each part of the demonstration. Note: In the demonstration, the core runs at HCLK = 72 MHz. Four LEDs, LD1, LD2, LD3 and LD4, flash throughout the demonstration at a frequency depending on the core clock.
  • Page 24: Figure 19. Time Adjust Submenu

    Running the demonstration UM1590 The user can optionally choose to set the time, year, month and day. Press any key (except for SEL) to ignore the prompt and abort the configuration sequence. Press on SEL and follow the setting sequence to set the time and date. Time submenu This submenu is divided into two items that allow the user to display or set the current time.
  • Page 25: Figure 20. Time Show Submenu

    UM1590 Running the demonstration Figure 20. Time Show submenu To exit the Time Show submenu, press the SEL push-button. To exit the Time submenu, select the Return line and press the SEL push-button. Date submenu This submenu is divided into two items that allow the user to display or set the current date. ●...
  • Page 26: Figure 21. Setting The Year

    Running the demonstration UM1590 Figure 21. Setting the year Figure 22. Setting the month 26/65 Doc ID 023892 Rev 1...
  • Page 27: Figure 23. Setting The Day Of The Month

    Stopwatch submenu This application simulates a precise chronometer with provision for 5 record times. For this application an interactive human interface is developed using STM32303C-EVAL LCD and push-buttons to allow user to use the stop-watch with real time display. Doc ID 023892 Rev 1...
  • Page 28: Figure 25. Stopwatch Submenu

    (subseconds, seconds or minutes) of time. For this application an interactive human interface is developed using the STM32303C-EVAL LCD and push-buttons to allow the user to use the lap timer with real time display. After startup, the Hourglass is filled and the default timer duration is set to one minute.
  • Page 29: Figure 26. Lap Timer Submenu

    UM1590 Running the demonstration Figure 26. Lap timer submenu Applications The user can control the Hourglass features using the Joystick SEL, RIGHT, UP and DOWN buttons: Press the joystick UP/DOWN button to adjust the timer (the UP and DOWN buttons are used only when the timer is reset).
  • Page 30: Figure 27. Setting The Alarm Activation Time

    Running the demonstration UM1590 Figure 27. Setting the alarm activation time ● Alarm Show: this item displays the current alarm time. If the time and date have not been configured before, a message shown in Figure 29 is displayed. Pressing SEL takes you back to the Alarm submenu.
  • Page 31: Image Viewer Submenu

    UM1590 Running the demonstration Figure 29. Message displayed if time and date need setting 2.4.2 Image Viewer submenu The Image Viewer submenu is used to demonstrate the LCD control performance using the embedded SPI interface. The application is a successive display of stored images. This application reads all bitmap pictures from the USER directory (see Section 4.1: Programming the media files...
  • Page 32: Audio Features

    Audio features Wave player submenu The STM32303C-EVAL evaluation board supports stereo audio play using the audio Codec CS42L52 connected to I2S port and controlled by I2C2 interface. In this demo, an audio wave file stored under the USER folder in the MicroSD card is opened using the FATFS file system and transferred to the internal SRAM block by block (512 bytes) using the SPI interface.
  • Page 33: Figure 32. Wave Player Submenu

    UM1590 Running the demonstration Figure 32. Wave player submenu When Wave Player is selected, the wave player file names are displayed in a list box as shown in Figure 33 Figure 33. Wave player interface Using the UP, DOWN and SEL push-buttons, you can select the wave file to be played. Once the play command is prompted (SEL push-button), the submenu shown in Figure 34.
  • Page 34: Figure 34. Wave Player Playing Submenu

    Running the demonstration UM1590 Figure 34. Wave player playing submenu At this application level, pressing: ● The SEL push-button pauses the audio stream ● The DOWN push-button decrements the audio stream ● The UP push-button increments the audio stream ● The KEY button exits the wave player submenu When the audio stream is paused, the menu in Figure 35...
  • Page 35: Connectivity Submenu

    Running the demonstration 2.4.4 Connectivity submenu IR Transmitter On the STM32303C-EVAL an IR LED is driven by PB9 through transistors T4 and T5. When the IR Transmitter submenu is selected, the message shown in Figure 36 displayed. Figure 36. IR transmitter menu...
  • Page 36: Figure 38. Ir Receiver Menu

    Running the demonstration UM1590 Press the joystick DOWN button to switch between device type and command. Press the joystick LEFT button to go to the previously defined device/command. Press the joystick RIGHT button to go to the next defined device/command. Press the joystick SEL button to send the selected device command code.
  • Page 37: Figure 39. Ir Receiver Application Menu

    When an IR frame is sent using a remote control or using the IR transmitter application running on another STM32303C-EVAL board, this IR frame is decoded using the IR receiver and if the protocol is compatible to the selected IR protocol the device and the command is...
  • Page 38: Thermometer

    I C protocol including system management bus (SMBus) mode. STTS751 I C temperature sensor is mounted on the STM32303C-EVAL board and used to capture the external temperature (-40°C to +125°C). When the Thermometer submenu is selected, the message shown in...
  • Page 39: Figure 43. Thermometer Submenu Selected

    UM1590 Running the demonstration Figure 43. Thermometer submenu selected Once the Temperature submenu has been selected by pressing the SEL push-button, the temperature value is displayed in Celsius and Fahrenheit as shown in Figure Press KEY to return to the Thermometer submenu. Figure 44.
  • Page 40: Figure 45. Warning Temperature Display 1

    Figure 46. Warning temperature display 2 The user can configure the HIGH and LOW using dedicated define values in the code. By default, the STM32303C-EVAL demonstration sets them to the value defined in the thermometer.c file: #define TEMPERATURE_LOW 0x14 /* 20°C */ #define TEMPERATURE_HIGH 0x28 /* 40°C */...
  • Page 41: Low-Power Modes

    UM1590 Running the demonstration Figure 47. Temperature sensor error 2.4.6 Low-power modes The STM32F30x/31x microcontroller provides different operating modes in which the power consumption is reduced. The purpose of this menu is to show the behavior of the microcontroller in different low-power modes. Stop and Standby modes are taken as examples.
  • Page 42: Figure 49. Stop Mode Entered Exit Exti

    Running the demonstration UM1590 Figure 49. Stop mode entered exit EXTI The MCU remains in the Stop mode until the KEY push-button is pressed and the message shown in Figure 50 is displayed on the LCD screen. Once the KEY push-button has been pressed, the MCU exits the Stop mode. The system clock is then set to 72 MHz and the application resumes execution.
  • Page 43: Figure 51. Rtc Alarm Causes The Mcu To Exit Stop Mode

    UM1590 Running the demonstration Figure 51. RTC Alarm causes the MCU to exit Stop mode ● In the second case, the RTC Alarm wakes up the MCU from Stop mode after the programmed time has elapsed. When selecting this submenu, the user has to set the alarm to the time when the MCU is to exit Stop mode.
  • Page 44: Figure 53. Rtc Alarm Wakeup Configured

    Running the demonstration UM1590 Figure 53. RTC Alarm wakeup configured After the programmed time has elapsed, the system exits Stop mode. The system clock is then set to 72 MHz and the application resumes execution. The message shown in Figure 54 is displayed on the LCD screen.
  • Page 45: Figure 55. Time And Date Configuration Prompt

    UM1590 Running the demonstration Figure 55. Time and date configuration prompt Time and Date are not configured, please go to the Organizer menu and set time and Date parameters. Press joystick to continue ... Standby mode menu This menu allows the user to put the STM32F30x/31x in Standby mode. The software runs the specific instruction sequence needed by the STM32F30x/31x to enter Standby mode.
  • Page 46: Figure 57. Mcu In Standby Mode

    Running the demonstration UM1590 Figure 57. MCU in Standby mode The MCU remains in Standby mode until the SEL push-button is pressed. Once the Wakeup push-button has been pressed, the MCU exits Standby mode and the system reset signal is generated.
  • Page 47: Figure 59. Setting The Wakeup Time

    UM1590 Running the demonstration Figure 59. Setting the wakeup time Once the alarm has been configured, The LEDs stop blinking and the system enters Standby mode. The message shown in Figure 60 is then displayed on the LCD. Figure 60. RTC Alarm wakeup configured After the programmed timing has elapsed, the system exits Standby mode and a system reset signal is generated.
  • Page 48: Rf Eeprom

    C peripherals that can be connected to any device supporting the I C protocol. An RF EEPROM daughter board can be connected to STM32303C-EVAL via the I C interface. Figure 62. RF EEPROM daughter board The M24LR64-R device is a dual-interface, electrically erasable programmable memory (EEPROM).
  • Page 49: Figure 63. M24Lr64-R Block Diagram

    UM1590 Running the demonstration Figure 63. M24LR64-R block diagram EEPROM Latch Logic RF V Power management Contact V MS31375V1 Note: For more details on the M24LR64 EEPROM, please refer to the datasheet. Select the RF EEPROM menu by pressing SEL from the main menu, two RF EEPROM applications can be selected as shown in Figure Figure 64.
  • Page 50: Figure 65. Esl Application

    Running the demonstration UM1590 Figure 65. ESL application The name and a RF EERPOM brief description of the product Product price Logo (French/E) Price trend arrow Note: Two images Note: Two images stored in μSD card stored in μSD card MS31112V2 All this information (product name, price, logo, price trend...) are programmed in the M24LR64 dual interface EEPROM via the RF interface and can be updated any time using...
  • Page 51: Figure 66. Esl Setting Menu

    UM1590 Running the demonstration Figure 66. ESL setting menu RF EERPOM Using this PC software application, several parameters can be set to configure the ESL device and update the LCD display: Logo: Check the French (PROMO) or English (DISCOUNT) to indicate that a special price is proposed.
  • Page 52: Table 5. M24Lr64 Memory Organization (Esl Application)

    Running the demonstration UM1590 Table 5. M24LR64 memory organization (ESL application) RF block address bits [31:24] bits [23:16] bits [15:8] bits [7:0] 0x0000 Arrow Icon Contains 0xXYYYYYYY X = number of digits in price (max 7) 0x0001 YYYYYYY = price value including decimal separator (.) coded in hexadecimal. For instance 0x512A99FF means 5 digits and price is 12.99 0x0002 0x0003...
  • Page 53: Figure 68. Datalogger Submenu

    UM1590 Running the demonstration Figure 68. DataLogger submenu An on-board demonstration firmware stored in the STM32F30x/31x memory consist to select, control the temperature acquisition through a RFID reader connected by a USB cable to a PC. For more details about this application please refer to the application note AN3109 “Developing your M24LR64-R DataLogger application for temperature acquisition“.
  • Page 54: High Brightness Led And Ldr Application

    Running the demonstration UM1590 When the application starts, the data is stored in the dual interface EEPROM and the temperature data is displayed in a real time as a graph on the TFT-LCD display on the evaluation board and also on the PC software interface. Figure 70.
  • Page 55: Humidity Measurement Application

    UM1590 Running the demonstration Figure 71. Brightness level 2.4.9 Humidity measurement application Before humidity measurements can be performed, a 2-step calibration is required: 1. In the first step, the capacitance offset error is evaluated and saved in backup registers, this phase is performed with JP19 installed in 2-3 (REF) position. The message shown in Figure 72 is displayed.
  • Page 56: Figure 73. Humidity Calibration 2

    Running the demonstration UM1590 Figure 73. Humidity calibration 2 The humidity measure is displayed on the TFT-LCD. The figure below shows an example of the message displayed by humdity measure subdemonstration on the TFT- LCD. Figure 74. Humidity measurement 1. To run the calibration phase again, power-off the evaluation board and set the jumper JP16 in VDD position.
  • Page 57: Help

    Running the demonstration 2.4.10 Help This submenu provides help for configuring the jumpers on the STM32303C-EVAL evaluation board and navigating between the menus and submenus available in the demonstration firmware. Select the Help menu by pressing SEL from the main menu. The message shown in Figure 75 is then displayed on the LCD screen.
  • Page 58: Figure 77. Navigation Menu 2

    Running the demonstration UM1590 Figure 77. Navigation menu 2 Once the joystick push-button has been pressed again, the MCU exits the navigation submenu and the message shown in Figure 75 is displayed on the LCD screen. ● If the Jumpers config submenu is selected, the message shown in Figure 78 displayed.
  • Page 59: Figure 79. Jumper Configuration Menu 2

    UM1590 Running the demonstration Figure 79. Jumper configuration menu 2 Figure 80. Jumper configuration menu 3 Doc ID 023892 Rev 1 59/65...
  • Page 60: About Submenu

    About submenu is selected, the message shown in Figure 82 is displayed on the LCD screen. Figure 82. About submenu Pressing KEY then displays a message showing the STM32303C-EVAL demonstration version on the LCD screen. 60/65 Doc ID 023892 Rev 1...
  • Page 61: Stm32303C-Eval Demonstration Package

    UM1590 STM32303C-EVAL demonstration package STM32303C-EVAL demonstration package The STM32303C-EVAL demonstration is supplied in a single zip file. The extraction of the zip file generates a single folder, STM32303C-EVAL_FW_VX.Y.Z, which contains the subfolders shown in Figure 83 and described below. Figure 83. STM303C-EVAL demonstration package directory tree The content of the following 3 directories “Libraries”, “Project”, and “utilities”...
  • Page 62 “TASKING”: contains preconfigured projects for the TASKING toolchain – “inc”: contains the demonstration header files – “src”: contains the demonstration source files “Utilities” directory ● “STM32303C-EVAL”: contains the LCD, and other STM32303C-EVAL board-related drivers 62/65 Doc ID 023892 Rev 1...
  • Page 63: Stm32303C-Eval Demonstration Programming

    STM32303C-EVAL demonstration programming Programming the media files The STM32303C-EVAL board comes with a MicroSD card memory pre-programmed with the Audio and Image resources used by the demonstration. However, you can load your own image (*.bmp) and audio (*.wav) files in the USER directory, providing that these file formats are supported by the demonstration.
  • Page 64: Revision History

    Revision history UM1590 Revision history Table 6. Document revision history Date Revision Changes 27-Nov-2012 Initial release. 64/65 Doc ID 023892 Rev 1...
  • Page 65 No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.

Table of Contents