ST STM32303C-EVAL User manual

November 2012 Doc ID 023892 Rev 1 1/65
UM1590
User manual
STM32303C-EVAL demonstration firmware
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 Section 3: STM32303C-EVAL demonstration package and Section 4:
STM32303C-EVAL demonstration programming.
Note: Before you execute the demonstration, make sure that all EVAL board jumpers are well
configured. For more details, refer to Chapter 1.9.12: STM32303C-EVAL board jumper
configuration.
This demonstration firmware and other firmware packages are available for download from
the STMicroelectronics website: www.st.com.
Table 1. Applicable products and tools
Type Applicable products and tools
Evaluation tools STM32303C-EVAL
www.st.com

Contents UM1590
2/65 Doc ID 023892 Rev 1
Contents
1 Functional description of the evaluation board . . . . . . . . . . . . . . . . . . . 7
1.1 Power control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Reset control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Debug JTAG interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Serial wire debugger interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Embedded ST-LINK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7 Display devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7.1 LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7.2 LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7.3 LDR (Light Dependent Resistor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.8 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.8.1 RS232, RS485 and IrDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9 Miscellaneous peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.1 Joystick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.2 Push-buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.3 Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.4 Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.5 MicroSD card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.6 RF EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.7 IR LED and IR receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9.8 Brightness LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.9.9 Humidity sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.9.10 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.9.11 Touchsensing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.9.12 STM32303C-EVAL board jumper configuration . . . . . . . . . . . . . . . . . . . 10
2 Running the demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 Demonstration startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.2 Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Clock sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 Clock control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

UM1590 Contents
Doc ID 023892 Rev 1 3/65
2.2.2 Clock failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 STM32F30x/31x resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.1 Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.2 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.3 External interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.4 Internal memory size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.5 External memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4 Demonstration applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.4.1 Organizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.4.2 Image Viewer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.4.3 Audio features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4.4 Connectivity submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.4.5 Thermometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.4.6 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.4.7 RF EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.4.8 High brightness LED and LDR application . . . . . . . . . . . . . . . . . . . . . . 54
2.4.9 Humidity measurement application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.4.10 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4.11 About submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3 STM32303C-EVAL demonstration package . . . . . . . . . . . . . . . . . . . . . 61
4 STM32303C-EVAL demonstration programming . . . . . . . . . . . . . . . . . 63
4.1 Programming the media files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2 Programming the demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2.1 Using Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2.2 Using IAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2.3 Using preconfigured projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

List of tables UM1590
4/65 Doc ID 023892 Rev 1
List of tables
Table 1. Applicable products and tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Table 2. STM32F30x/31x demonstration peripherals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 3. STM32F30x/31x demonstration interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 4. STM32F30x/31x demonstration external interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 5. M24LR64 memory organization (ESL application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 6. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

UM1590 List of figures
Doc ID 023892 Rev 1 5/65
List of figures
Figure 1. Evaluation board overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 2. Structure of the demonstration menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 3. MicroSD card check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 4. Warning message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 5. ST logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 6. STM32F3 presentation slide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 7. Time and date configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 8. Main menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 9. Corresponding submenus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 10. Navigating in the demonstration menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 11. Clock tree diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 12. No HSE clock detected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 13. Standby mode entered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 14. Internal Flash memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 15. MicroSD card organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 16. MicroSD card removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 17. Organizer menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 18. Setting the time and date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 19. Time Adjust submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 20. Time Show submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 21. Setting the year. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 22. Setting the month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 23. Setting the day of the month. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 24. Exiting the Date Show submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 25. StopWatch submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 26. Lap timer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 27. Setting the alarm activation time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 28. Alarm Show submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 29. Message displayed if time and date need setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 30. Image Viewer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 31. STM32 Image Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 32. Wave player submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 33. Wave player interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 34. Wave player playing submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 35. Pause submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 36. IR transmitter menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 37. IR transmitter command menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 38. IR receiver menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 39. IR receiver application menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 40. IR receiver command menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 41. USB mass storage menu 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 42. USB mass storage menu 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 43. Thermometer submenu selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 44. Temperature display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 45. Warning temperature display 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 46. Warning temperature display 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 47. Temperature sensor error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 48. Exiting Stop mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

List of figures UM1590
6/65 Doc ID 023892 Rev 1
Figure 49. Stop mode entered exit EXTI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 50. MCU in the Stop mode Exit EXTI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 51. RTC Alarm causes the MCU to exit Stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 52. Setting the wakeup time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 53. RTC Alarm wakeup configured. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 54. RTC Alarm wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 55. Time and date configuration prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 56. Entering Standby mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 57. MCU in Standby mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 58. RTC Alarm causes the MCU to exit the Standby mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 59. Setting the wakeup time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 60. RTC Alarm wakeup configured. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 61. Time and date configuration prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 62. RF EEPROM daughter board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 63. M24LR64-R block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 64. RF EEPROM menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 65. ESL application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 66. ESL setting menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 67. Communication block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 68. DataLogger submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 69. DataLogger dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 70. DataLogger curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Figure 71. Brightness level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 72. Humidity calibration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 73. Humidity calibration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Figure 74. Humidity measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Figure 75. Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 76. Navigation menu 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 77. Navigation menu 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 78. Jumper configuration menu 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 79. Jumper configuration menu 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Figure 80. Jumper configuration menu 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Figure 81. Jumper configuration menu 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 82. About submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 83. STM303C-EVAL demonstration package directory tree. . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 84. MicroSD Card directory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

UM1590 Functional description of the evaluation board
Doc ID 023892 Rev 1 7/65
1 Functional description of the evaluation board
The STM32303C-EVAL evaluation board provides a development and demonstration
platform. It is designed to allow the user to try out the major functions of the
STM32F30x/31x microcontroller.
Figure 1 summarizes the main functional blocks of the evaluation board.
Figure 1. Evaluation board overview
1.1 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.
MS31374V1
ComparatorPotentiometer
IR LED &
IR receiver
IRTIM
PWM
CAN
CAN driver
& connector
USB
connector USB FS
Humidity
Sensor
High current
LEDs
Touch Sensing
buttons
Key button
Photo-R
LEDs
Joystick
PWM
PWM
TIM
Comparator
TS controller
Comparator
GPIO
Motor Control
connector 1
Motor Control
connector 2
Voltage
translator
RS232
transceiver RS232/RS485
connector
RS485
transceiver
IrDA
transceiver
USART1
STM32F303VCT6
Embedded ST-
LINK/V2
USB TypeB
connector
JTAG & Trace
connector
Voltage
translator
MicroSD card
Dot Matrix LCD
EEPROM
Audio
Amplifier
EEPROM
Temperature
Sensor
RF EEPROM
connector
Extension connector
for GPIOs
3.3V regulator
2.0V to 3.6V
adjustable regulator
Microphone
I2C
DAC
I2S
SPI2
JTAG

Functional description of the evaluation board UM1590
8/65 Doc ID 023892 Rev 1
1.2 Clocking
Two clock sources are available on the STM32303C-EVAL evaluation board:
●32 KHz crystal for embedded RTC
●8 MHz crystal for the STM32F30x/31x main clock system
1.3 Reset control
The reset can be generated by hardware or software:
●Reset button: activates the RESET input when pressed
●JTAG reset
1.4 Debug JTAG interface
Software debug is done via the standard ARM®JTAG connection: 20-pin IDC (insulation
displacement connector) for connection to the standard ARM host interface.
1.5 Serial wire debugger interface
The Serial Wire Debug Port (SWD-DP) provides a 2-pin (clock + data) interface to the AHP-
AP port.
1.6 Embedded ST-LINK
An ST-LINK is integrated on the board as an embedded in-circuit debugger and programmer
for the STM32F30x/31x MCU.
1.7 Display devices
1.7.1 LCD
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. They are used as a display.
1.7.3 LDR (Light Dependent Resistor)
The VDDA supply is divided by a resistor bridge of LDR VT9ON1 and 8.2 KΩresistor and
connected to PA0.

UM1590 Functional description of the evaluation board
Doc ID 023892 Rev 1 9/65
1.8 Interfaces
1.8.1 RS232, RS485 and IrDA
RS232, RS485 and IrDA communications are performed through the following connectors:
●RS232 and RS485: a D-type 9-pin coonector (CN8)
●IrDA transceiver U10 is connected to USART1 of the board STM32F30x/31x.
1.9 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:
●KEY
1.9.3 Potentiometer
A successive approximation ADC channel (ADC12) is connected to an on-board variable
resistor. The variable resistor provides a voltage in the range of 0 V to 3.3 V.
1.9.4 Audio
The STM32303C-EVAL evaluation board supports stereo audio play, using an audio
DAC CS42L52 connected to I2S2 port of STM32F30x/31x microcontroller.
1.9.5 MicroSD card
The STM32303C-EVAL evaluation board features a MicroSD card connector connected to
the SPI peripheral.
1.9.6 RF EEPROM
RF EEPROM daughter board implemented on the module is the M24LR64-R. The daughter
board can be connected on CN1 to the STM32F30x/31x via the I2C bus.
The I2C address of the RF EEPROM is 0b1010E2E1E0. The E0-E2 values are determined
by the RF EEPROM daughter board.
1.9.7 IR LED and IR receiver
The IR receiver TSOP34836 is connected to PA9 on the STM32F30x/31x. The IR LED is
driven by PB9 through transistors T4 and T5 on the board.

Functional description of the evaluation board UM1590
10/65 Doc ID 023892 Rev 1
1.9.8 Brightness LED
The board features an amber high brightnes LED and its power control circuits.
The brightness can be adjusted by a PWM signal issued by the STM32F30x/31x through
PE13.
The LED supply current can be monitored by the STM32F30x/31x through PD14.
1.9.9 Humidity sensor
The board embeds a humidity sensor HS1101LF. The charge control signal is connected to
timer in 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. The charge transfer technology is enabled
by default.
1.9.12 STM32303C-EVAL board jumper configuration
For the demonstration to run correctly on the board, configure the following STM32303C-
EVAL board jumpers as follows:
●JP1: fitted
●JP5: fitted in position 1<->2
●JP6: fitted in position 1<->2
●JP11: fitted
●JP12: fitted
●JP15: fitted in position 2<->3
●JP16: fitted in position 2<->3
●JP17: fitted in position 1<->2
Note: Set JP16 in BAT position to save time even if the evaluation board is powered off.

UM1590 Running the demonstration
Doc ID 023892 Rev 1 11/65
2 Running the demonstration
2.1 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. The action of pressing the SEL push-button is performed by
vertically pressing the top of the joystick, as opposed to moving it horizontally UP, DOWN,
RIGHT or LEFT.
To exit a submenu, select the Return menu and press SEL.

Running the demonstration UM1590
12/65 Doc ID 023892 Rev 1
Figure 2. Structure of the demonstration menus
MS31109V2
Time
StopWatch
Date
LapTimer
Alarm
WavePlayer
Return
Return
ImageViewer
Return
IR Transmitter
Mass Storage
IR Receiver
Return
Thermometer
Return
STOP
STANDBY
Return
ESL
Data Logger (T)
Return
Brightness
Humidity Measure
Return
Menu Navigation
Jumpers Config
About
Return
Adjust
Show
Return
Adjust
Show
Return
Adjust
Show
Return
Organizer
Main menu
STM32F3 Welcome
message
Image Viewer
Connectivity
Audio
Thermometer
Low power modes
RF EEPROM
Applications
Help
About
Exit: Wakeup Pin
Exit: RTC Alarm
Return
Exit: EXTI
Exit: RTC Alarm
Return
SIR
RC5
Return
SIR
RC5
Return

UM1590 Running the demonstration
Doc ID 023892 Rev 1 13/65
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.
Figure 3. MicroSD card check
The demonstration continues only if a MicroSD card is inserted.
Then, the demonstration graphic icons and bitmap files are checked in the icroSD card (see
Section 2.3.5: External memory organization). All the icons have to be correctly
programmed in the MicroSD card for the demonstration to start. If an icon is missing, the
demonstration does not start and the message shown in Figure 4 is displayed on the LCD
screen.
Figure 4. Warning message

Running the demonstration UM1590
14/65 Doc ID 023892 Rev 1
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 5).
Figure 5. ST logo
Then, after one second, an STM32F3 presentation slide is displayed on the LCD screen.
Figure 6. STM32F3 presentation slide
When the board is powered up for the first time, the user is prompted to set the time, year,
month and day. The user may choose to ignore it by pressing any key except for the SEL
push-button to abort the configuration sequence. To set the time and date, the user must
press SEL and follow the setting sequence.
The message shown in Figure 7 appears on the LCD screen.
Figure 7. Time and date configuration
Note: If the user chooses to configure the time and date, the Time Adjust and Date Adjust menus
are displayed. Otherwise, the main menu is displayed and the user can set the time

UM1590 Running the demonstration
Doc ID 023892 Rev 1 15/65
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. It is soon followed by the current date.
Once the time/date have been set, the main menu appears. The main menu is displayed in
the form of a set of icons. It shows all the submenus in the same screen. You can navigate
using the UP, DOWN, RIGHT and LEFT joystick directions to select the required submenu.
To enter a submenu, press the SEL joystick push-button, and the new submenu
corresponding to the selected icon is displayed.
Figure 8. Main menu
1. The icons shown in Figure 8 are taken from http://commons.wikimedia.org/wiki/Crystal_Clear.
Once a submenu has been selected, the name of the application is listed at the top of the
display and all the corresponding submenus are listed below as shown in Figure 9.
Figure 9. Corresponding submenus

Running the demonstration UM1590
16/65 Doc ID 023892 Rev 1
2.1.2 Navigation
The demonstration menu is based on circular navigation, submenu selection, item selection
and back navigation as described in Figure 10.
Figure 10. Navigating in the demonstration menus
You can navigate using the joystick push-buttons located on the evaluation board: RIGHT,
LEFT, SEL, UP and DOWN.
●The UP, DOWN, RIGHT and LEFT push-buttons are used to perform circular navigation
in the main menu and the current menu items.
●The SEL push-button selects the current item.
●The UP and DOWN push-buttons are used for vertical navigation in the submenus.
●To return to the upper menu, go to the Return line and press SEL.
MS31373V1
Item 1 Item 2 Item 4
Item 5 Item 6 Item 8
Item 9 Item 10 Item 12
Left
Right
Up
Up
Left
Right
Left
Right
Left
Right
Left
Right
Left
Right
Up
Up
Down
Up
Down
Up
Down
Up
Down
Up
Down
Up
Down
Left
Right
Left
Down
DownDown
Left
Right Right
Item 3
Item 3.1
Item 3.2
Item 3.n
Return
….
Item 3.1.1
Item 3.1.2
Item 3.1.n
Return
….
Select
Select
Select
Select
Item 3
Item 7
Item 11
Left
Right
Left
Right
Left
Right

UM1590 Running the demonstration
Doc ID 023892 Rev 1 17/65
2.2 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.
●HCLK frequency is set to 72 MHz.
●Timer clock (TIMCLK) is set to 72 MHz.
●PCLK1 is set to 36 MHz.
●PCLK2 is set to 72 MHz.
Only the RTC is clocked by a 32 kHz external oscillator.
Figure 11 illustrates the clock tree organization for this demo.
Figure 11. Clock tree diagram
MS31110V2
RTC
LSE
32768Hz
APB1 prescaler
/2
APB2 prescaler
/1
72MHz
36MHz
AHB prescaler
/1
PLL multiplicator
x9
HSE RC
8MHz
HCLK 72 MHz to AHB bus,
core, memory and DMA
SYSCLK
72MHz

Running the demonstration UM1590
18/65 Doc ID 023892 Rev 1
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. If the 8 MHz crystal is reconnected within a few seconds, a system reset is
generated.
Note: The clock security system (CSS) feeds the MCU with the HSI OSC used as an emergency
clock if no clock is detected.
When a timeout occurs, the MCU enters Standby mode and the message shown in
Figure 13 is displayed on the LCD screen.
Figure 13. Standby mode entered
1. The demonstration does not restart as long as the 8 MHz crystal is not present.
2. Connecting the 8 MHz crystal oscillator after reset may not restart the demonstration correctly. The crystal
oscillator must be connected before starting the demo.

UM1590 Running the demonstration
Doc ID 023892 Rev 1 19/65
2.3 STM32F30x/31x resources
2.3.1 Peripherals
All used peripherals are described in Ta bl e 2 .
Table 2. STM32F30x/31x demonstration peripherals
Used peripherals Application
COMP Applications(HBLed_LDR)
DAC Applications (HBLed_LDR)
DMA Wave player
EXTI Menu navigation + joystick + push-button + low power mode+ wave
player + applications
GPIO All applications + LEDs
I2C2 Temperature sensor (STTS751), dual interface EEPROM
I2S Wave player
NVIC All applications using interrupts
PWR Low power modes
RCC All applications + demonstration kernel
RTC Calendar (calendar, stop-watch, lap timer, alarm)
SPI3 MicroSD + Color LCD
SysTick Generate 10 ms time base
TIM1 Applications(HBLed_LDR), IR receiver
TIM2 LED toggling
TIM4 Applications(Humidity_Measure)
TIM16 and TIM17 IR transmitter
USB Mass Storage

Running the demonstration UM1590
20/65 Doc ID 023892 Rev 1
2.3.2 Interrupts
Tabl e 3 shows all the enabled interrupts.
2.3.3 External interrupts
Tabl e 4 shows all the external interrupts used by the demonstration.
Table 3. STM32F30x/31x demonstration interrupts
Interrupts Priority Used for
EXTI9_5 Priority: 3
Subpriority: 0
MicroSD Card detection, Menu
navigation
EXTI15_10 Priority: 3
Subpriority: 0 Menu navigation
I2C2 Error Priority: 0
Subpriority: 0 SMBus Alert interrupt
NMI Priority: -2 CSS interrupt
RTC Priority: 1
Subpriority: 1
Calendar, date update, and
Alarm generation
SysTick Priority: 3
Subpriority: 3 System timing
Ta m p e r Priority: 0
Subpriority: 0 Tamper generation
TIM1 Priority: 1
Subpriority: 1
Applications(HBLed_LDR), IR
receiver interrupt
TIM2 Priority: 3
Subpriority: 3 LED toggling interrupt
TIM3 Priority: 0
Subpriority: 0 IR receiver
TIM4 Priority: 1
Subpriority: 0
Applications
(Humidity_Measure)
TIM16 Priority: 0
Subpriority: 0 IR Transmitter
USB Priority: 0
Subpriority: 0 Mass storage
Other manuals for STM32303C-EVAL
1
Table of contents
Other ST Motherboard manuals

ST
ST SPC58XXMB User manual

ST
ST STEVAL-ISW001V1 User manual

ST
ST AN3954 Installation and operating instructions

ST
ST NUCLEO-F207ZG User manual

ST
ST STM8L1526-EVAL User manual

ST
ST STM32L476ZG User manual

ST
ST STEVAL-ILH007V1 User manual

ST
ST eMotion STEVAL-MKI109V1 User manual

ST
ST UM2163 User manual

ST
ST STEVAL-ISC005V1 Administrator Guide

ST
ST 32L100CDISCOVERY User manual

ST
ST STM3210E-EVAL User manual

ST
ST AEK-SNS-2TOFM1 User manual

ST
ST STEVAL-IHM010V1 User manual

ST
ST NUCLEO-WL55JC STM32WL User manual

ST
ST X-NUCLEO-IKS01A1 User manual

ST
ST X-NUCLEO-CCA02M1 User manual

ST
ST STM32100E-EVAL User manual

ST
ST STM32100B-EVAL User manual

ST
ST STM32 NUCLEO-F042K6 User manual