Home
STM32303C-EVAL demonstration firmware
Contents
1. Figure 17 illustrates the clock tree organization for this demo Figure 11 Clock tree diagram i HCLK 72 MHz to AHB bus core memory and DMA SYSCLK PLL multiplicator ane AHB prescaler APB2 prescaler 72MHz x9 A H APB1 prescaler SIME I2 T LLI co YM o IN N N MS31110V2 Doc ID 023892 Rev 1 17 65 Running the demonstration UM1590 2 2 2 Note 18 65 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 No HSE Clock Standby mode ina few 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 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 Standby few seconds MCU in Standby Mot To exit press Wakeup 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 Doc ID 023892 Rev 1 ky UM1590
2. Stop mode menu This menu allows the user to put the STM32F30x 31x in Stop mode The firmware performs the specific instruction sequence needed to enter Stop mode In this application the STM32F30x 31x can exit Stop mode in two ways as shown in Figure 48 Figure 48 Exiting Stop mode STOP Mode Ex1t EXTI Exit RTC Alarm Heturn e Inthe first case The EXTI KEY button is used to make the MCU exit Stop mode Once the Stop mode submenu has been selected the four LEDs continue blinking until the SEL push button is pressed and the system enters Stop mode When the MCU is in Stop mode the message shown in Figure 49 is displayed on the LCD AY Doc ID 023892 Rev 1 41 65 Running the demonstration UM1590 Figure 49 Stop mode entered exit EXTI MEU n tOr 7 Mc ide lo oxit press Key push button 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 Figure 50 MCU in the Stop mode Exit EXTI stop Mode Wakeup by key Button Press joystick to continue Note If an RTC Alarm is generated while the MCU is in Stop mode and the message shown in Figure 49 is displayed which means that the KEY push button needs to be pressed to exit Stop mode the RTC Alarm causes the MCU to exit S
3. contains the LCD and other STM32303C EVAL board related drivers 62 65 Doc ID 023892 Rev 1 ky UM1590 4 4 1 4 2 4 2 1 4 2 2 4 2 3 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 For more details please refer to Section 2 4 2 Image Viewer submenu and Section 2 4 3 Audio features Figure 84 MicroSD Card directory organization ap STM32303C F CG STFLES gt Demo mandatory fis O user MS31114V2 The default content of the media files STFILES and USER directories can be retrieved from the Binary Media folder So if you want to reprogram the MicroSD card you can copy the content of the Binary Media folder to your own MicroSD card memory Programming the demo You can program the demonstration using three methods Using Bootloader To program the demonstration binary image in the internal Flash memory you have to use the stm32303C EVAL FW 1 0 0 bin file located under Project STM32303C EVAL Binary with embedded Bootloader For more details please refer to Bootloader application note AN2606 STM32 microcontroller system memory boo
4. cr UM1590 YI User manual Note 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 12S 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 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
5. 2 3 2 3 1 i Running the demonstration STM32F30x 31x resources Peripherals All used peripherals are described in Table 2 Table 2 STM32F30x 31x demonstration peripherals player applications Temperature sensor STTS751 dual interface EEPROM Applications HBLed LDR IR receiver Doc ID 023892 Rev 1 19 65 Running the demonstration UM1590 2 3 2 2 3 3 20 65 Interrupts Table 3 shows all the enabled interrupts Table 3 STM32F30x 31x demonstration interrupts a DT sata EXTI9 5 Punt 3 MicroSD Card detection Menu Subpriority O navigation Priority 3 EXT115 10 M igati Subpriority O Priority O l2C2 Error Dou SMBus Alert interrupt w 7 0 Lew 1 Calendar date update and RTC s Subpriority 1 Alarm generation Priority 3 NN SysTick System timin Tamper TOTEM Tamper generation P Subpriority 0 per g TIM Priority 1 Applications HBLed LDR Subpriority 1 receiver interrupt Priority 3 T TIM2 LED toggling interrupt Priority O TIM3 uud IR receiver Subpriority O TIMA Priority 1 Applications Subpriority O Humidity Measure Priority O TIM16 b IR Transmitter Subpriority O Priority O USB P Mass storage Subpriority O External interrupts Table 4 shows all the external interrupts used by the demonstration Doc ID 023892 Rev 1 UM1590 2 3 4 2 3 5 Caution i Running the demonstration Table 4 STM32F30x 31x demonstration external interrupts Key But
6. EVAL evaluation board e 32 KHz crystal for embedded RTC e 8 MHz crystal for the STM32F30x 31x main clock system Reset control The reset can be generated by hardware or software e Reset button activates the RESET input when pressed e JTAG reset 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 Serial wire debugger interface The Serial Wire Debug Port SWD DP provides a 2 pin clock data interface to the AHP AP port Embedded ST LINK An ST LINK is integrated on the board as an embedded in circuit debugger and programmer for the STM32F30x 81x MCU Display devices LCD A TFT color LCD module is mounted on the STM32303C EVAL board It is interfaced through the embedded SPI peripheral LEDs Four general purpose LEDs are available They are used as a display LDR Light Dependent Resistor The VppA supply is divided by a resistor bridge of LDR VI9ON1 and 8 2 KQ resistor and connected to PAO Doc ID 023892 Rev 1 ky UM1590 1 8 1 8 1 1 9 1 9 1 1 9 2 1 9 3 1 9 4 1 9 5 1 9 6 1 9 7 Functional description of the evaluation board Interfaces RS232 RS485 and IrDA RS232 RS485 and IrDA communications are performed through the following connectors e HS232and RS485 a D type 9 pin coonector CN8 e IrDA transceiver U10 is connected to USART1 of the board
7. STMS2F30x 81x Miscellaneous peripherals Joystick The STM32303C EVAL evaluation board features a four direction joystick with a selection button at the center named SEL Push buttons The following push buttons are available e KEY Potentiometer A successive approximation ADC channel ADC 12 is connected to an on board variable resistor The variable resistor provides a voltage in the range of O V to 3 3 V Audio The STM32303C EVAL evaluation board supports stereo audio play using an audio DAC CS42L52 connected to I2S2 port of STM32F30x 81x microcontroller MicroSD card The STM32303C EVAL evaluation board features a MicroSD card connector connected to the SPI peripheral RF EEPROM HF 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 12C address of the RF EEPROM is 0b1010E2E1EO0 The EO E2 values are determined by the RF EEPROM daughter board IR LED and IR receiver The IR receiver TSOP34836 is connected to PAY on the STM32F30x 81x The IR LED is driven by PB9 through transistors T4 and T5 on the board Doc ID 023892 Rev 1 9 65 Functional description of the evaluation board UM1590 1 9 8 1 9 9 1 9 10 1 9 11 1 9 12 Note 10 65 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
8. button to start the timer 3 Press the joystick SEL button again to pause the timer 4 Press the joystick RIGHT button to reset the timer Alarm submenu Using this submenu the user can configure the alarm activation time When the alarm time value is reached all the LEDs LED1 to LED4 start flashing together and continue for 3 seconds This submenu is divided into two items that allow the user to display or set the current alarm e Alarm Adjust the alarm time activation is set in the same way as the time is set in the Time Adjust submenu The following messages are successively displayed on the LCD when the submenu shown in Figure 27 is selected When adjusting the alarm the current time is displayed AY Doc ID 023892 Rev 1 29 65 Running the demonstration UM1590 Figure 27 Setting the alarm activation time Hi MMs Ss e 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 The message shown in Figure 28 is displayed on the LCD when this submenu is selected Figure 28 Alarm Show submenu HHI MM Iss To exit the Alarm Show submenu press the SEL push button To exit the Alarm submenu select to the Return line and press the SEL push button Note In the Alarm Adjust and Alarm Show menus if the time and date have not yet been configured the message shown in Figure 29 i
9. 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 o ye Applicable products and tools Evaluation tools STM32303C EVAL November 2012 Doc ID 023892 Rev 1 1 65 www st com Contents UM1590 Contents 1 Functional description of the evaluation board 7 1 1 Power control 2 aaa 7 1 2 oe All AP ee ee ee ee ea 8 1 3 Preset COMWO Kazam gm ce heetoueycdented suseheuaseeaeeeeee se 8 1 4 Debug JTAG interface 0 eee 8 1 5 Serial wire debugger interface ccc eee 8 1 6 Embedded SI LINK 0 0 0 aa 8 1 7 Display devices 06 ee RR I hs 8 1 7 1 LOD 446 TPP PA TPP 8 1 7 2 LEDS T 8 1 7 3 LDR Light Dependent Resistor a 8 1 8 laks Ee AA APA 9 1 8 1 RS232 RS485 and IrDA 00 eh 9 1 9 Miscellaneous peripherals cee 9 1 9 1 Noi JRrCDL rrrm 9 1 9 2 PUSIDUHONS 32 626 deci rer a MS oder eic pA a a e cid ANA RR e 9 1 9 3 Potentiometer EMT 9 1 9 4 AdO D r 9 1 9 5 MIGOS DCA AA s e a d e a mee oe Sh pe ose babes Ee NER 9 1 9 6 RF EEPROM 3x dtd acm bso oe god Road ee a e RS Re adde RR eo 9 1 9 7 IR LED and IR receiver llle 9 1 9 8 Prone SEED s AN 9 991608 SEEE nets uae se eee KA 10 1 9 9 Humidity sensor 0 0 rs 10 1 9 10 Te
10. display1 anana 40 Warning temperature display 2 aa 40 Temperature sensor error a 41 EXIMNG SOP AA AA AA 41 Doc ID 023892 Rev 1 5 65 List of figures Figure 49 Figure 50 Figure 51 Figure 52 Figure 53 Figure 54 Figure 55 Figure 56 Figure 57 Figure 58 Figure 59 Figure 60 Figure 61 Figure 62 Figure 63 Figure 64 Figure 65 Figure 66 Figure 67 Figure 68 Figure 69 Figure 70 Figure 71 Figure 72 Figure 73 Figure 74 Figure 75 Figure 76 Figure 77 Figure 78 Figure 79 Figure 80 Figure 81 Figure 82 Figure 83 Figure 84 6 65 UM1590 Stop mode entered exit EXTI aaa 42 MCU in the Stop mode Exit EXTI 2 eee eee 42 RTC Alarm causes the MCU to exit Stop mode 0 0a 43 Setting the wakeup time nn 43 RTC Alarm wakeup configured nn 44 RTC Alarm wakeup 2 aaa 44 Time and date configuration prompt cee eee eee 45 Entering Standby mode d exse KA Ra ERE AREE RA GASA BE RUQ eden bene e ah do GA ex 45 MCU in Standby mode ues NAG KATE n RUE RERO Ry E ow 22 RHEE OEE E RE 46 RTC Alarm causes the MCU to exit the Standby mode 00000 aes 46 Setting the wakeup time 1 0 ee rn 47 RTC Alarm wakeup configured llli 47 Time and date configuration prompt aaaea cee ee eee ee 48 RF EEPROM daughter board 0 eee tenes 48 M24LR64 R block
11. in a list box as shown in Figure 33 Figure 33 Wave player interface WavePlayer ART OF 1 WAV RIDING WAV Check JP 18 In 1 2 pos To exit press KEY 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 is displayed Doc ID 023892 Rev 1 33 65 Running the demonstration UM1590 Note Figure 34 Wave player playing submenu ART OF 1 WAV 32000H7 16bits Stereo At this application level pressing The SEL push button pauses the audio stream e The DOWN push button decrements the audio stream The UP push button increments the audio stream e The KEY button exits the wave player submenu When the audio stream is paused the menu in Figure 35 is displayed Figure 35 Pause submenu ART OF 1 WAV 32000H7 16bits Stereo To resume playing press the SEL push button The menu shown in Figure 34 is then displayed When the audio stream is stopped the stream position is reset and the menu shown in Figure 33 is displayed The audio files provided with this package are based on a free music download from the www DanoSongs com website Doc ID 023892 Rev 1 ky 34 65 UM1590 2 4 4 Running the demonstration 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 i
12. submenu to change the default time 00 00 00 to the current time Once Time Adjust has been selected the first digit of the hour field can be changed Press the UP button to display the current value plus one Press the DOWN button to display the previous digit value After setting the digit value press SEL and the cursor automatically jumps to the next digit When all the time digits have been set the Time submenu appears Some digit values are limited to a range of values depending on the field hour minutes or seconds The following message with the default time or the current time is displayed on the LCD when this submenu is selected e Set JP16 in BAT position to save time even if the evaluation board is powered off Figure 19 Time Adjust submenu TIM 00 00 00 e Time Show this item displays the current time If time and date have not been configured before a message is displayed prompting the user to set the time and date or to exit to the upper submenu When this submenu is selected the message shown in Figure 20 appears on the LCD In the example the time has not been set yet 24 65 Doc ID 023892 Rev 1 ky 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 da
13. the MCU to exit the Standby mode Standby Mode Wakeup by RTC Alarm Press joystick to continue e Inthe second case the RTC Alarm wakes up the MCU from the Standby 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 the Standby mode Figure 59 shows how to set the wakeup time 46 65 Doc ID 023892 Rev 1 Ay UM1590 Note Running the demonstration Figure 59 Setting the wakeup time 00 00 00 CT 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 MCU in Standby Mode Wait for RTC Alarm O CECA eee After the programmed timing has elapsed the system exits Standby mode and a system reset signal is generated if the Time and Date have not been set the message shown in Figure 61 is displayed on the LCD screen Doc ID 023892 Rev 1 47 65 Running the demonstration 2 4 7 48 65 UM1590 Figure 61 Time and date configuration prompt Time and Date are not configured please go to the Calendar menu and set time and Date parameters Press joystick to continue RF EEPROM The STM32F30x 31x microcontroller has two embedded I C peripherals that can be connected to any device supporting the I C protocol An RF EEPROM daughter board can be connected to STM32
14. the following 3 directories Libraries Project and utilities is detailed below AY Doc ID 023892 Rev 1 61 65 STM32303C EVAL demonstration package UM1590 Libraries directory contains all the subdirectories and files that make up the core of the STM32F30x Standard Peripheral library V1 0 0 including e CMSIS CM4 CoreSupport contains the Cortex M4 files CM4 DeviceSupport ST STM32F30x contains the STM32F30x CMSIS layer files e 5 STM32F30x Stdperiph Driver ine subfolder contains the Standard Peripheral library header files src subfolder contains the Standard Peripheral library source files Project directory e STM32303C EVAL A Binary contains the binary image of the demonstration that can be used to program the binary image to the internal Flash memory using IAP plus the media files required to run the demonstration Binary Media EWARM contains preconfigured projects for the EWARM toolchain MDK ARM contains preconfigured projects for the MDK ARM toolchain RIDE contains preconfigured projects for the RIDE toolchain TrueSTUDIO contains preconfigured projects for the Atollic toolchain TASKING contains preconfigured projects for the TASKING toolchain inc contains the demonstration header files src contains the demonstration source files Utilities directory e STM32303C EVAL
15. through PE13 The LED supply current can be monitored by the STM32F30x 31x through PD14 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 PBO Temperature sensor The STM32303C EVAL evaluation board includes a temperature sensor connected to the I2C2 peripheral 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 STM32303C EVAL board jumper configuration For the demonstration to run correctly on the board configure the following STM32303C EVAL board jumpers as follows e JP1 fitted JP5 fitted in position 1 lt gt 2 JP6 fitted in position 1 lt gt 2 JP11 fitted JP12 fitted JP15 fitted in position 2 lt gt 3 JP16 fitted in position 2 lt gt 3 JP17 fitted in position 1 lt gt 2 Set JP16 in BAT position to save time even if the evaluation board is powered off Doc ID 023892 Rev 1 ky UM1590 Running the demonstration 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
16. 0512961 Pr LI Tm mangapa Re 5411 Bac kup After startup a default 00 00 00 000 chronometer counter is displayed on the LCD it correspond to Hours minutes seconds milliseconds The user can control the chronometer features using the joystick LEFT and RIGHT push buttons 1 Press the joystick LEFT button to start the counter 2 Press the joystick RIGHT button to save trials in the backup registers max 5 actions 3 Press the KEY button to exit 4 Press and hold the SEL button for 1 sec to reset all the backup registers Lap timer This application simulates a precise Hourglass it measure the passage of a short period 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 Using the UP and DOWN push buttons the user can change the timer duration the timer duration must be greater than 30 seconds and less than 2 minutes Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 26 Lap timer submenu LapTimer The user can control the Hourglass features using the Joystick SEL RIGHT UP and DOWN buttons 1 Press the joystick UP DOWN button to adjust the timer the UP and DOWN buttons are used only when the timer is reset 2 Press the joystick SEL
17. 303C EVAL via the IC interface Figure 62 RF EEPROM daughter board The M24LR64 R device is a dual interface electrically erasable programmable memory EEPROM It features an I C interface and can be operated from a Vcc power supply It is also a contactless memory powered by the received carrier electromagnetic wave The M24LR64 R is organized as 8192 x 8 bits in 2C mode and as 2048 x 32 bits in ISO 15693 and ISO 18000 3 mode 1 RF modes Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 63 M24LR64 R block diagram EEPROM i D o O O D Lo O Y 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 64 Figure 64 RF EEPROM menu RF EEPROM ogger Return ESL application The Electronic Shelf Labeling ESL application consists of reading the content of the RF EEPROM using I2C interface of the M24LR64 dual interface EEPROM and displaying the information on the LCD screen as shown in Figure 65 STi Doc ID 023892 Rev 1 49 65 Running the demonstration UM1590 Figure 65 ESL application The name and a brief description PEDE US of the product Ref amp B125 Logo French E Price trend arrow Note Two images Note Two images stored in uSD card stored in uSD card MS31112V2 All this information product
18. E SERA dO Rinat kirane E 24 Time Show submenu 22 eee eee eee eas 25 DELO NG Vedi RI 26 Setting the IIO s usu acd o Eoo what Rn eo dett oni qe o qe ee ee eee io d eS 26 Setting the day of th MONIN 4 a sa eurem CER adem GG Coe eR doc 27 Exiting the Date Show submenu 22 nanana 27 StopWateh SUDMENU a eden daw Sor EU bee Eds et REE do dd doge BANAAG NG ida 28 Lap timer SHUDETIeEU Ss acaew ies cae stn hee iE AA 29 Setting the alarm activation time llle 30 Alarm Show SUDMENUL 333 2 2 273 96b ice seque 6 Ged shoR SUR XH RUP dc ERU besa AUREOS deans de 30 Message displayed if time and date need setting AAA eee 31 Image Viewer submenu llle hh hh 31 STMS32 Image VIWE 24 paa aa ko tRr ERE EIE ba eed ouendees ed eee deesse qus vax 32 Wave player submenu 1 ee ehh hh rn 33 Wave player interface lille hh m nee 33 Wave player playing submenu ee ee eens 34 PAUSE SUDMENN 42400448 deir ee dG cue miqemscrededmdc eure E wea eee bas 34 IR transmitter menu ee eee eee ees 35 IR transmitter command Menu 2 a 35 IR receiver menu 1 ee ee ee eee 36 IR receiver application menu aaa 37 IR receiver command menu 1 aaa 37 USB mass storage menu 1 een 38 USB mass storage menu 2 lll ee hh rn 38 Thermometer submenu selected llle 39 Temperature display aaa rar 39 Warning temperature
19. RIGHT and LEFT push buttons perform circular navigation in the main menu current enu items SEL push button selects he current item UP and DOWN perform vertical navigation 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 e lf the Jumpers config submenu is selected the message shown in Figure 78 is displayed Figure 78 Jumper configuration menu 1 The needed jumpers Confiquration gt RIGHT and LEFT qo to the next previous slide Exit Pres amp Hold KEY Press RIGHT and LEFT to go to the next previous slide and UP to exit The following messages shown in Figure 79 Figure 80 and Figure 81 are displayed sequentially on the LCD screen 58 65 Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 79 Jumper configuration menu 2 The needed jumpers Configuration VDD Adjust JP15 fitted pos 3V3 VDD Analog JP 17 fitted pos 3V3 VDD VBAT JP16 fitted pos VDD To exit press KEY Figure 80 Jumper configuration menu 3 The needed jumpers Configuration 15751 and RF EE JP5 6 fitted pos I2C2 VDD MCU JP 12 fitted Audio or IR Check JP18 position To exit press KEY Doc ID 023892 Rev 1 59 65 Running the demonstration UM1590 2 4 11 60 65 Figure 81 Jumper configuration menu 4 The needed jumpers Configuration SMB Alert JP1 c
20. Y price value including decimal separator coded in hexadecimal For instance 0x512A99FF means 5 digits and price is 12 99 0x0002 Ox0003 Contains the ASCII codes of the string chain called ASCII TEXT LINE1 in M24LR64 ESL Ox0004 B IE demonstration software The maximum size of this text line is 20 characters Contains the ASCII codes of the string chain called ASCII TEXT LINE2 in M24LR64 ESL 0Ox0009 iu demonstration software The maximum size of this text line is 20 characters Ox000A Ox000B XXXX XX is the checksum of bytes from address 0x0000 to OxOOOB Ox000C YY Reserved ZZ Reserved DataLogger application 0x0001 This RF EEPROM application demonstrates a practical application of the M24LR64 It is able to record and store 64 Kbits of temperature data using the M24LR64 R Dual interface EEPROM l2C and RF The DataLogger microcontroller is an STM32F30x 31x It communicates with the M24LR64 R using its serial interface and controls an STTS751 digital temperature sensor Figure 67 Communication block diagram Master Slave T9751 temperature sensor STM32 microcontroller Slave M24LR64 dual interface EEPROM MS31113V2 a 52 65 Doc ID 023892 Rev 1 UM1590 Running the demonstration Figure 68 DataLogger submenu RF EEPROM ES s eLturn An on board demonstration firmware stored in the STM32F30x 31x memory consist to select control the temperature acquisition th
21. arator which can be used in combination with the DAC peripheral for different applications like detecting brightness level using the LDR sensor The high brightness LED light intensity is inversely proportional to the ambiant brightness level detected by the LDR When the high brightness LED and LDR submenu is selected the message shown in Figure 71 is displayed Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 71 Brightness level Brightness Level N di To exit press KEY 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 The user must press SEL and follow the next step Figure 72 Humidity calibration 1 Humidity Measure Calibration steps 1 Set JP19 to REF 2 Press SEL button Sel Button Apply 2 In the second step the humidity measurement accurancy can be improved by entering the actual humidity reference at calibration time if it is known After seeting the JP19 to HUM position select a reference humidity value using UP DOWN buttons as indicated on Figure 73 then press the SEL button Otherwise let the estimated humidity value unchanged and press the SEL button ky Doc ID 023892 Rev 1 55 65 Running the demons
22. ayed on the LCD screen Doc ID 023892 Rev 1 39 65 Running the demonstration UM1590 Figure 45 Warning temperature display 1 jerature Temp higher than 40C pmi 1 FARK AERAN F Check JP1 closed To exit press KEY If the temperature exceeds the low limit TEMPERATURE LOW Low Limit Temperature the SMBus alert interrupt is generated and the warning message shown in Figure 46 is displayed on the LCD screen Figure 46 Warning temperature display 2 erature STTS7 51 Temp lower than 20C AXN XXNX F Check JP1 closed To exit press KEY 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 Press KEY to return to the Thermometer submenu Note Any hardware problem with the temperature sensor is detected by a test In such case the message shown in Figure 47 is displayed 40 65 Doc ID 023892 Rev 1 AY UM1590 Running the demonstration Figure 47 Temperature sensor error NO TSENSOR Present Exit push key 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
23. ble Ex1t Push KEY Thermometer The STM32F30x 31x microcontroller has two embedded I C peripherals that can be connected to any device supporting the 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 Figure 43 is displayed on the LCD Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 43 Thermometer submenu selected Thermometer Temperature Return 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 44 Press KEY to return to the Thermometer submenu Figure 44 Temperature display STTS 51 DFP I F WF F XXX Check JP1 closed To exit press KEY The temperature variations can be monitored easily using the STM32 I2C SMBus feature This is managed by the SMBus Alert which generates a dedicated interrupt informing the system that the temperature is out of the selected range This can be very useful when a higher temperature needs an emergency action as is the case in critical systems motor control medical If the temperature exceeds the high limit TEMPERATURE HIGH High Limit Temperature the SMBus alert interrupt is generated and the warning message shown in Figure 45 is displ
24. detailed description of each part of the demonstration 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 Organizer The STM32F30X 31x features a real time clock RTC which is an independent BCD timer counter The RTC provides a time of day clock calendar two programmable alarm interrupts and a periodic programmable wakeup flag with interrupt capability This submenu is used to configure show the time and date run stop watch and lap timer subdemonstration and generate alarm Figure 17 shows the organizer menu Figure 17 Organizer menu Organizer Time Date Stop Watch LapTimer AlarmA Return In any submenu if the time and date parameters have not yet been configured the message shown in Figure 18 is displayed on the LCD screen Figure 18 Setting the time and date Time and Date Config select Press SEL Abort Press any Key DN Doc ID 023892 Rev 1 23 65 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 e Time Adjust after the evaluation board is powered up select this
25. diagram 1 1 6 ee ee eee ee 49 Br EEPROM MENU 5 a5 aa mh RIMA GOLD KATA NAG EX REESE RUNE RS ED EE CR 49 ESL apoheallollaz ouo uz ate chee mem EIE EU ERES MAA ee ee tease HA d owes 50 ESE IIUeNMIUMRERTITTCTITEDITTROOCOUIIOTIQUIITLOT od ee eee eee heen ne eae KA 51 Communication block diagram 1 2 cc eee nee 52 DataLogger SUDMENU 60 BRAND Ko Rude ASOd coke Een d OP e B rhon uni Ea ee ees 53 DataLogger dialog DOX 1 ee eee hh nr 53 DataLogger CUVE a ee ee ee ee R ded op t RC d kA 54 Eie cu sorrerara neren TIT ITEM 55 ullisienasclierusmMP P T rT r 55 HUMIGIT CAMOPAUON YS rers ard dci dod mGA od KG arcae das Rn arae KURT DAG DAP Ae eee 56 Humidity measurement 0 ccc eee eee eee teens 56 KANA AA AA PA PBA 57 wowiecueun i mM 57 Navigalion MENU tcc vr m 58 Jumper configuration menu 1 1 seem 58 Jumper configuration MENU 2 iade deceased de n OR Re deg 59 Jumper configuration menu 3 llle hh 59 Jumper configuration menu 4 llle hh 60 BDOUESUDRIODU s 53 scm i ob Eram Er dote EON RON Doe OR ie anak EE NG ABAD EO KG GA 60 STM303C EVAL demonstration package directory tree 61 MicroSD Card directory organization eaae 63 Doc ID 023892 Rev 1 UM1590 Functional description of the evaluation board 1 Functional description of the evaluation board The STM32303C EVAL evaluation board provides a development and dem
26. election or use of the ST products and services described herein 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 UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with p
27. gation as described in Figure 10 Figure 10 Navigating in the demonstration menus Item 10 KON EN Item 12 Down pe cu E Item 3 1 Item 3 2 N Item 3 n v Return MS31373V1 You can navigate using the joystick push buttons located on the evaluation board RIGHT LEFT SEL UP and DOWN e The UP DOWN RIGHT and LEFT push buttons are used to perform circular navigation in the main menu and the current menu items e The SEL push button selects the current item e The UP and DOWN push buttons are used for vertical navigation in the submenus e To return to the upper menu go to the Return line and press SEL a 16 65 Doc ID 023892 Rev 1 UM1590 Running the demonstration 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 PCLKT is set to 36 MHz PCLK2 is set to 72 MHz Only the RTC is clocked by a 32 kHz external oscillator
28. gure 21 Setting the year Month Week Nbr Mo Tu ME 7 2 10 14 E 1 LT 21 7 2 24 28 3 31 UP DOWN Set Year Figure 22 Setting the month Month Year Week Nbr Day Nbr Mo Tu n Fr E T 10 14 LT 21 j ad 20 29 31 UP DOWN Set Month 26 65 Doc ID 023892 Rev 1 ky UM1590 Figure 23 Setting the day of the month Month week Nbr Mo Tu El 8 15 16 22 23 29 30 10 1 7 24 d Running the demonstration Set Day SEL to exit e Date Show this item displays the current date If the time and date have not been configured before a message is displayed prompting the user to set the time and date or to exit to the upper submenu The message shown in Figure 24 is displayed on the LCD when the submenu is selected with the date already configured Figure 24 Exiting the Date Show submenu Mon t h To Exit Press SEL To exit this submenu press the SEL push button To exit the Date submenu select the Heturn line and press the SEL push button 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 27 65 Running the demonstration UM1590 28 65 Figure 25 StopWatch submenu STOPWATCH 001001011628 0 0 0 0 0 1 B L 0050040287421 OOIE 005005
29. he user can set the time Doc ID 023892 Rev 1 ky 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 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 APP Main Menu Name 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 Figure9 Corresponding submenus APP Main Menu Name APP Sub Menu1 Name APP Sub Menu2 Name Return Doc ID 023892 Rev 1 15 65 Running the demonstration UM1590 2 1 2 Navigation The demonstration menu is based on circular navigation submenu selection item selection and back navi
30. 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 Warning No loaded Bitmap files Demo can t be executed Please be sure that all files are correctly programmed in the MicroSD card then restart Demo Doc ID 023892 Rev 1 13 65 Running the demonstration UM1590 Note 14 65 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 ute augmented Then after one second an STM32F3 presentation slide is displayed on the LCD screen Figure 6 STM32F3 presentation slide STM32 Releasing your creativity 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 Time and Date Contig Select Press SEL Abort Press any Key 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 t
31. losed Humidity Measure Check JP19 position To exit press KEY 1 Set JP16 in BAT position to save time even if the evaluation board is powered off By default JP16 is set in position VDD Once the KEY push button has been pressed the MCU exits the Jumper configuration submenu and the message shown in Figure 75 is displayed on the LCD screen About submenu This submenu shows the version of the STM32F30x 31x demonstration firmware When the About submenu is selected the message shown in Figure 82 is displayed on the LCD Screen Figure 82 About submenu Heturn Pressing KEY then displays a message showing the STM32303C EVAL demonstration version on the LCD screen Doc ID 023892 Rev 1 ky UM1590 STM32303C EVAL demonstration package 3 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 JN STM32303C EVAL FW V1 0 0 di _htmresc a wid Libraries gt Lb CMSIS gt Ai STMs2 USB FS Device Driver 4 9 STM32F30x_StdPeriph_Driver i inc A src 4 p Project a J STM32303C EVAL 3 p Binary gt A Media EWARIM inc MADE ARIM RIDE ETC TASKING gt True5TUDIO 4 Utilities 4 jj STM32 EVAL d Common J STM32303C EVAL gt Jd Third Party The content of
32. mperature sensor llle 10 1 9 11 Touchsensing buttons llli 10 1 9 12 STM32303C EVAL board jumper configuration 10 2 Running the demonstration lee 11 2 1 MOD xax PAA e feu du PSOE Kies Pag Rd PR ES AS 11 2 1 1 Demonstration startup n aaa aaaea eee 13 2 1 2 NVON e rea Oner EEE eee A E E EE Ea EA 16 2 2 Clock SOUICES 0 a 17 2 2 1 CIOCKCORWOL waah pa ache esihe rik eh bea Seabee DEMI AHAS MAG i 17 2 65 Doc ID 023892 Rev 1 ky UM1590 Contents 2 2 2 Clock TAMING mte 18 2 3 STMS2F30x31xresources ee 19 2 3 1 PENPDEG c54 556 445554 on0ens Bode eer Hess Ss d Es me ed E 19 2 3 2 Interrupts d 20 2 3 3 External interrupts 23 5 xu tro ote oie Ree eee HANAP wees 20 2 3 4 Internal memory size lille 21 2 3 5 External memory organization llle 21 2 4 Demonstration applications llle 23 2 4 1 enc PPTTvvP M 23 2 4 2 Image Viewer submenu seen 31 2 4 3 Audio features aaa hrs 32 2 4 4 Connectivity submenu lees 35 2 4 5 Thermometer snoc3 7occ cence tevan eeeat eae eee eoeke es eho 38 2 4 6 Low power modes 1 ce eet eee 41 2 4 7 AP EEPROM 4 54 3 978 parce eed adr to oe de ede eR ano CO AGANG 48 2 4 8 High brightness LED and LDR ap
33. n Figure 36 is displayed Figure 36 IR transmitter menu IR Transmitter SIRC RC5 Return When you select a protocol from the list the corresponding submenu such as the one shown in Figure 37 is displayed Figure 37 IR transmitter command menu STRC Transmitter SWITCH You can control the IR transmitter features using the Joystick LEFT RIGHT DOWN UP and SEL buttons Doc ID 023892 Rev 1 35 65 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 4 Press the joystick SEL button to send the selected device command code Oo dec xt When the Key is pressed the IR transmitter demonstration is exited and the menu shown in Figure 36 is displayed IR receiver The IR receiver TSOP34836 is connected to PAY of STM32F30x 31x on the STM32303C EVAL board At the receiving end a receiver detects the light pulses which are processed to retrieve decode the information they contain When the IR Receiver submenu is selected the message shown in Figure 38 is displayed Figure 38 IR receiver menu IR Receiver SIRC RC5 Return When you select a protocol from the list the corresponding submenu such as the one shown in Figure 39 is displayed 36 65 Doc ID 023892 Rev 1 ky UM1590 Running the demonstra
34. name price logo price trend are programmed in the M24LR64 dual interface EEPROM via the RF interface and can be updated any time using the CR95HF demonstration board with the associated PC software M24LRxx_Application_Software 50 65 Doc ID 023892 Rev 1 ky UM1590 Note Running the demonstration Figure 66 ESL setting menu DUAL INTERFACE EEPROI ESL demo Configuration too French English Logo Dirientatien arrow ETTI Rel ag Ascii Text Lina L freduct Ascii Text Liga p Pet ABLES read ESL configuration transfer data to your ESL 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 Check the blank logo if no special price is applied Price trend arrow Check the up or down arrow to indicate if the price has been increased or decreased or the blank arrow if no indication is required Product price ASCII Text line 1 and Line2 Display the name and a brief description of the product For more details about this PC Software please refer to user manual UM0853 Using this PC software the M24LR64 dual interface EEPROM is organized as shown in Table 5 Doc ID 023892 Rev 1 51 65 Running the demonstration UM1590 Table 5 M24LR64 memory organization ESL application Contains OXXYYYYYYY X number of digits in price max 7 YYYYYY
35. onstration 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 Motor Control Motor Control connector 1 connector 2 Joystick RS232 transceiver RS232 RS485 connector Voltage RS485 translator transceiver LEDs U ep M I O Key button IrDA Comparator transceiver Embedded ST USB TypeB TS controller LINK V2 connector JTAG amp Trace connector Comparator W STM32F303VCT6 HI were SPI2 oltage Dot Matrix LCD translator EEPROM Photo R Touch Sensing buttons High current LEDs Humidity Sensor a lt USB connector Audio HA A j Amplifier CAN driver CAN p amp connector EEPROM 2 0V to 3 6V adjustable regulator IR LED amp IRTIM RF EEPROM IR receiver PWM connector 3 3V regulator Temperature Extension connector Comparator Sensor MS31374V1 1 1 Power control Potentiometer 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 i Functional description of the evaluation board UM1590 1 2 1 3 1 4 1 5 1 6 1 7 1 7 1 1 7 2 1 7 3 8 65 Clocking Two clock sources are available on the STM32303C
36. plication 54 2 4 9 Humidity measurement application llle 55 24 10 Help a 57 2 4 11 About submenu 2422 qp Rd an EE QE PESE EP ESeeEesruid etis 60 STM32303C EVAL demonstration package 61 STM32303C EVAL demonstration programming 63 4 1 Programming the media files llle 63 4 2 Programming the demo selle 63 4 2 1 USING BOONOAOEN 5 ario etre KAMA edo oae Roy KPA MEAN LED bana 63 4 2 2 Uli a AA AA AA AA AP 63 4 2 3 Using preconfigured projects eee 63 Revision history onuexosokr ERA ree awed ex e LGA KANG 64 Doc ID 023892 Rev 1 3 65 List of tables UM1590 List of tables Table 1 Applicable products and fOOIS 4 AAKALA ANG Seded X 3o AG dhe Veg acies ha as 1 Table 2 STM32F30x 31x demonstration peripherals lille 19 Table 3 STM32F30x 31x demonstration interrupts l l eee 20 Table 4 STM32F30x 31x demonstration external interrupts 00 21 Table 5 M24LR64 memory organization ESL application 0 0 0 0 cee eee 52 Table 6 Document revision history a 64 4 65 Doc ID 023892 Rev 1 Ay UM1590 List of figures List of figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Fig
37. r 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 In this application the STM32F30x 31x can be made to exit Standby mode in two ways as shown in Figure 56 Figure 56 Entering Standby mode standby Mode Exit Wakeup Pin Ex1t RIC Alarm Return e Inthe first case the Wakeup push button is used to wake up the MCU from Standby mode Once the Standby mode submenu has been selected the four LEDs continue blinking until the SEL push button is pressed and the system enters Standby mode When the MCU is in Standby mode the message shown in Figure 57 is displayed on the LCD AY Doc ID 023892 Rev 1 45 65 Running the demonstration UM1590 Figure 57 MCU in Standby mode MCU in Standby Mode To exit press Sel KC CC Cg 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 Note If an RTC Alarm is generated while the MCU is in Standby mode which means that the SEL push button needs to be pressed to exit Standby mode the RTC Alarm causes the MCU to exit Standby mode and a system reset signal is generated The message shown in Figure 58 Is displayed Figure 58 RTC Alarm causes
38. rom the MicroSD card is 4 images selected in alphabetic order Audio features Wave player submenu The STM32303C EVAL evaluation board supports stereo audio play using the audio Codec CS42L52 connected to 12S 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 The voice sampling period is read from the wave file header An audio amplifier is connected to the DAC interface to play the stored wave files This application reads all wave files from USER directory See Section 4 1 Programming the media files and only displays WAV files with the following format e Audio Format PCM an uncompressed wave data format in which each value represents the amplitude of the signal at the time of sampling e Sample rate may be 8000 11025 22050 or 44100 Hz e Bits Per Sample 16 bit Audio sample data values in the range 0 65535 e Number of channels 2 Stereo The maximum number of wave files that can be read from the MicroSD card is 25 files selected in alphabetic order After selecting Wave Player the submenu shown in Figure 32 is displayed Doc ID 023892 Rev 1 ky UM1590 Running the demonstration Figure 32 Wave player submenu Audio WavePlavyer Heturn When Wave Player is selected the wave player file names are displayed
39. rough 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 How to run the application 1 From the STM32F303C evaluation board side select the DataLogger submenu and then press SEL push button Figure 69 DataLogger dialog box DUAL INTERFACE EEPROM DataLogger demo DUAL INTERFACE EEPROM www st com 2 From the PC software side choose DataLogger application and then follow the steps described on the user manual UM0925 AY Doc ID 023892 Rev 1 53 65 Running the demonstration UM1590 2 4 8 54 65 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 DataLogger curve DataLogger Reference documents e M24LR64 R datasheet e M24LR64 R tool driver install guide user manual UM0863 e User manual UM0925 Using the M24LR64 R DataLogger reference design e Application note AN3057 How to manage M24LR64 R data transfers from the I C bus or an RF channel Application note AN3109 Communication peripheral FIFO emulation with DMA and DMA timeout in STM32F 10x microcontrollers High brightness LED and LDR application The STM32F303VC T6 microcontroller features an embedded comp
40. rovisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2012 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com AY Doc ID 023892 Rev 1 65 65
41. s displayed on the LCD screen 30 65 Doc ID 023892 Rev 1 ky UM1590 2 4 2 Running the demonstration Figure 29 Message displayed if time and date need setting Time not confiqured Press SEL 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 and displays only the BMP files having the following format e Bit depth 16 bits RGB e Size 240x320 Select Image Viewer to display the submenu shown in Figure 30 Figure 30 Image Viewer submenu Image Viewer Image Viewer Return When Image Viewer is selected a list box of images is displayed as shown in Figure 371 Using the UP DOWN and SEL push button the user can select and view any image from the list box Doc ID 023892 Rev 1 31 65 Running the demonstration UM1590 2 4 3 32 65 Figure 31 STM32 Image Viewer Yr When Image Viewer is selected the corresponding image is displayed and then the user can use HIGHT and LEFT push buttons to go to the next previous image stored in the USER folder on the MicroSD card If the KEY button is pressed the Image Viewer is stopped and the submenu shown in Figure 30 is displayed The supported image size is 240x320 The defined number of images that are read f
42. t mode Using IAP To program the binary image of the demonstration firmware in the internal Flash memory of the MCU you have to use the stm32303C EVAL FW V1 0 0 offset 0x3000 bin file located under Project STM32303C EVAL Binary with IAP over USART For more details please refer to application note AN4045 STM32F3xx in application programming using the USART Using preconfigured projects 1 Select the folder corresponding to your preferred toolchain MDK ARM EWARM RIDE TASKING or TrueSTUDIO 2 Open the STM32303C EVAL project and rebuild all sources Load the project image through your debugger 4 Restart the evaluation board press B1 reset button o Doc ID 023892 Rev 1 63 65 Revision history UM1590 5 Revision history Table 6 Document revision history BENE GNE NN 27 Nov 2012 Initial release 64 65 Doc ID 023892 Rev 1 ky UM1590 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice s
43. te Date Adjust select this item after each power up in order to set the current date If the time and date have not been configured before a message is displayed prompting the user to set the time and date or to exit to the upper submenu The user is requested to set the current date to be stored in the application memory The date is displayed as Year Month Week Nbr Day Nbr number of the day in the year with the selected day shown in the month There is no default date since the user has to set the date at least once Once the submenu has been selected the user starts by setting the year then the month and the day of the selected month The month and the year are selected using the UP or DOWN push button For the day the UP DOWN RIGHT and LEFT push buttons can be used Press the UP push button to display the current value plus one press the DOWN push button to display the previous value To confirm the selected month press the SEL push button The display then jumps to the year configuration The same procedure is applicable for the year configuration After configuring the day press the SEL push button to store the entered value and exit to the Date submenu The current date value is then shown and you can change the setting if required The messages shown in Figure 21 Figure 22 and Figure 23 are successively displayed on the LCD when this submenu is selected Doc ID 023892 Rev 1 25 65 Running the demonstration UM1590 Fi
44. 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 AY Doc ID 023892 Rev 1 11 65 Running the demonstration UM1590 Figure2 Structure of the demonstration menus Adjust StopWatch Adjust Adjust Show Li WavePlayer o 5 E IR Transmitter E Connectivity Mass Storage LU O SIR E ae 0 erem ext EXT Exit RTC Alarm STOP STANDBY Exit Wakeup Pin Return Exit RTC Alarm m S RF EEPROM Data Logger T Return Brightness Applications Humidity Measure Return Menu Navigation Help Jumpers Config Return About Return About MS31109V2 a 12 65 Doc ID 023892 Rev 1 UM1590 2 1 1 Running the demonstration 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 Figure3 MicroSD card check Please insert SDCard 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
45. tion Figure 39 IR receiver application menu SIRC Receiver Check JP18 in 2 3pos To exit press KEY 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 displayed on the LCD screen Figure 40 Figure 40 IR receiver command menu SIRC Receiver Channel UFP TV Check JP18 in 2 3pos To exit press KEY 1 For more details on the IR receiver implementation refer to application note AN3174 implementing IR remote protocols receiver with the STM32F 10xx microcontrollers This application note provides a full description of the IR decoding USB mass storage The STM32F30x 31x microcontroller features a USB Universal Serial Bus that provides a full speed interface to a USB host PC The USB Mass Storage demonstration is used to configure the USB interface for communication with the PC and to run the mass storage demonstration using a MicroSD card Doc ID 023892 Rev 1 37 65 Running the demonstration UM1590 2 4 5 38 65 Figure 41 USB mass storage menu 1 Mass storage Start Heturn If the SEL push button is pressed when Start is selected the message shown in Figure 42 appears on the LCD screen until the cable is plugged in Figure 42 USB mass storage menu 2 USB Mass storage Plug the USB ca
46. ton interrupt mode rising edge EXTI line 5 Joystick DOWN interrupt mode falling edge Joystick LEFT interrupt mode falling edge MicroSD Card detect interrupt mode rising edge EXTI line 6 KEY Button interrupt mode rising edge Joystick RIGHT interrupt mode falling edge EXTI line 7 Joystick UP interrupt mode falling edge EXTI line 13 Joystick SEL interrupt mode falling edge EXTI line 17 HTC Alarm interrupt mode rising edge Internal memory size Figure 14 Internal Flash memory organization Ox083FFFF STM32F303VCT6 Ox0800000 MS31111V2 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 e SIFILES this directory contains all the required demonstration media files icons User files located in this folder cannot be handled by the demo only default files are managed e USER this is a user folder The user can add his her own files here to be played inside the demonstration menus pictures and waves This folder is used only by the Image Viewer and Wave Player submenus For more details on the various files properties please refer to Section 2 4 2 Image Viewer submenu and Section 2 4 3 Audio features The STFILES directory and its internal files are mandatory for demonstration star
47. top mode The message shown in Figure 51 is then displayed 42 65 Doc ID 023892 Rev 1 AY UM1590 Running the demonstration Figure 51 RTC Alarm causes the MCU to exit Stop mode otop Mode Wakeup by RTC Alarm Press Joystick to continue e Inthe 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 Figure 52 shows how to set the wakeup time Figure 52 Setting the wakeup time 00 00 00 M5 Once the alarm has been configured the four LEDs stop blinking and the system enters Stop mode The message shown in Figure 53 is displayed on the LCD Doc ID 023892 Rev 1 43 65 Running the demonstration UM1590 Figure 53 RTC Alarm wakeup configured MCU in Stop Mode Wait for RTC Alarm KHET 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 Figure 54 RTC Alarm wakeup otop Mode Wakeup by RTC Alarm Press joystick to continue Note If the Time and Date have not been set the message shown in Figure 55 is displayed on the LCD screen aes DoDOmeRnw i A UM1590 Running the demonstration Figure 55 Time and date configuration prompt Time and Date are not configured please go to the Organize
48. tration UM1590 Figure 73 Humidity calibration 2 Humidity Measure Now set JP19 to HUM and select humidity value using UZD keys o0 So UPZ DOYY N to set slope Sel button Apply 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 Humidity Measure To exit press KEY 1 To run the calibration phase again power off the evaluation board and set the jumper JP16 in VDD position If jumper JP16 is fitted in BAT position the calibration phase is executed only once 56 65 Doc ID 023892 Rev 1 ky UM1590 2 4 10 Running the demonstration 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 Figure 75 Help menu Help Menu Navigation Jumpers Config Return If the Menu Navigation submenu is selected the message shown in Figure 76 is displayed Figure 76 Navigation menu 1 Joystick Buttons RIGHT When any joystick button is pressed the second navigation interface is displayed as shown in Figure 77 Doc ID 023892 Rev 1 57 65 Running the demonstration UM1590 Figure 77 Navigation menu 2 Up DOWN
49. tup FatFs is a generic FAT file system module for small embedded systems The FatFs is written in compliance with ANSI C and completely separated from the disk I O layer For more details refer to the following link htip elm chan org fsw ff 00index e htmi Doc ID 023892 Rev 1 21 65 Running the demonstration UM1590 Figure 15 MicroSD card organization STFILES a Alarm bmp gd ARROWD bmp aZ ARROWU bmp ZZ DISCOUNT bmp a Help bmp Zlconl bmp a Icon2 bmp a Icon3 bmp aZ Icon4 bmp aZ Icon5 bmp d Iconb bmp aZ Icon bmp 28 Icon8 bmp d Icon9 bmp 28 Icon11 bmp a Icon12 bmp aZ Image bmp a IR1 bmp JE IR2 bmp a LDR bmp a LDRI bmp a LDR2 bmp ai LOR3 bmp x LDRA bmp a LDR5 bmp a LDR6 bmp a LDR7 bmp I LDRS bmp a LDRS bmp a LDRIO bmp d Music bmp d Play bmp a PROMO bmp ax RFA bmp a RFLO bmp a 5TLogo bmp a STM32F3 bmp Ji USB bmp aZ Watch bmp a WHITE bmp LG USER a Image4 bmp aZ Image5 bmp a Imageb bmp aZ Image bmp Lj readme txt amp art of gard wav 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 Figure 16 MicroSD card removal Press JoyStick UP to Restart the demo 22 65 Doc ID 023892 Rev 1 UM1590 2 4 Note 2 4 1 Running the demonstration Demonstration applications The following section provides a
50. ure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Figure 28 Figure 29 Figure 30 Figure 31 Figure 32 Figure 33 Figure 34 Figure 35 Figure 36 Figure 37 Figure 38 Figure 39 Figure 40 Figure 41 Figure 42 Figure 43 Figure 44 Figure 45 Figure 46 Figure 47 Figure 48 SZA Evaluation board overview 0 cc ehh 7 Structure of the demonstration menus llle 12 MicroSD Card CNECK uu vga acude ana de 9 QR IRR KA DA Rho HA NAGA canoe M aod 13 Warning IMCSSAGC m 13 SIdJOUU ERA Baha TE GD MI BAUMANALTADAAADEMAT NAMAN ees OI TEN EES ISTE AG 14 STM32F3 presentation slide aa 14 Time and date configuration aaa 14 MANMeND 7 ac wees LUPA Ree oe PLANADO Curae KANG cate AN aoe ee oe PAGA 15 Corresponding submenus eee nett e eee 15 Navigating in the demonstration MENUS 2 eee 16 Clock tree dI OE BET uu cca nce eee Uden cH RO ERE de ec Oe 9 CC a LRT eee ee ears 17 No HSE clock detected a 18 Standby mode entered eee ee ee rne 18 Internal Flash memory organization nananana ee eee 21 MicroSD card OrganiZaliOn siue NAG vege 3 an ene adorn ews oe R3 DX Pani RO ss 22 MicroSD CakdKEMOVAl au m dada hee Ge Re WAL ard ide OE ee Se eS bA DENG 22 Organizer MENU 2206204 40872 9923 AA 23 Setting the time and date cc eee eee ees 23 Tifne AdIUSt SUDITIOTIU s s acusa mu aeq e E RO Ex RO R
Download Pdf Manuals
Related Search
Related Contents
Cables Unlimited SPK-ROCK2 loudspeaker INUCUIVRE ACID 0208 FT K9 User manual - HC Mingham 90147 Aldi PT RC1 Cover.FH11 Purchase Order/Receiving 2.0 RD10MD2 Handbuch Hand-Arm-Schwingungen 【37130】ドラえもん テレビパソコン INSTRUCTION MANUAL WT 280 Installation Copyright © All rights reserved.
Failed to retrieve file