UM0238 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 20
Technical content
Datasheet sections
- 1 Functional description
- 1.1 Power control
- 1.2 Clocking
- 1.3 Reset control
- 1.4 Development and debugging
- 1.5 Displays and input devices
- 1.5.1 LCD
- 1.5.2 LEDs
- 1.5.3 Joystick
- 1.6 Interfaces
- 1.6.1 CAN
- 1.6.2 Ethernet
- 1.6.3 RS232
- 1.6.4 Infrared data access (IrDA)
- 1.7 Motor control
- 1.8 Miscellaneous peripherals
- 1.8.2 Push-buttons
- 1.8.3 Audio
- 2 Running the demonstrations
- 2.1 Menu
- 2.1.1 Welcome screen
- 2.1.2 Navigation
- 2.2 Clock sources
- 2.2.1 Clock control
- 2.3 STR91x resources
- 2.3.1 Peripherals
- 2.3.2 Interrupts
- 2.4 Demo applications
- 2.4.1 Calendar
- 2.4.2 Wave player
- 2.4.3 USB mouse demo
STR91x demonstration software Introduction This document describes the demonstration software running on the STR910-EVAL evaluation board, which you can use to evalua te the capabilities of the microcontroller and the on-board peripherals. The demonstration software contains a main application divided into various smaller applications. The demonstration software is already stored in the embedded flash memory of the microcontroller and can also be downloaded from http:\\\\www.st.com\\mcu then programmed into the STR91x internal flash. Important note: For users with old STR9-eval boards having STR9 MCU with marking showing "ES_D" or a value less than 618: and FMI clock. This implies that pressing the Reset button will not restart the MCU (please refer to the STR9 errata sheet v2.0). In order to correct this problem, you should uncomment the following line of code in the main.c file. //SCU_FMICLKDivisorConfig(SCU_FMICLK_Div2);
STR91x demonstration software Contents
1 Functional description
functions of the STR91x microcontroller. Figure 1. Evaluation board overview
STR91x demonstration software Functional description
1.1 Power control
STR910-EVAL evaluation board is designed to be powered by a 5V DC power supply. Y ou can configure the evaluation board to use any of the following three power sources:
- 5V DC power adapter connected to the power supply jack (marked CN2, or PSU for Power Supply Unit on the silk screen).
- 5V DC power with 500mA limitation via the USB type-B connector (marked CN3, or USB on the silk screen).
- 5V DC power from the daughter board extension connectors (marked CN5 and CN6, DTB for Daughter Board on the silk-screen). For more details, please refer to the power supply section on the STR910-EVAL Evaluation Board user manual.
1.2 Clocking
Four clock sources are available on STR910-EVAL evaluation board for the microcontroller, USB, RTC and Ethernet PHY transceiver:
- X1- 25 MHz crystal for the STR91xF microcontroller
- X2- 32 kHz crystal for the embedded RTC
- X3- 25 MHz crystal for Ethernet PHY transceiver U15
- U12- 48 MHz oscillator for USB
1.3 Reset control
The reset signal of STR910-EVAL evaluation board is low active. The reset sources include:
- Power On Reset from STM1001 (U7)
- Reset button (PB2)
- Debugging tools via the CN9 or CN7 connector
- Daughter board via the CN6 connector
1.4 Development and debugging
The STR910-EVAL evaluation board supports connection to both In-Circuit Emulators (ICE) via a 20-pin standard JTAG interface (CN9) and Trace tools via a 38-pin Embedded Trace Macrocell (ETM) interface (CN7).
1.5 Displays and input devices
1.5.1 LCD
32x122 graphic LCD display connected to GPIOs.
Functional description STR91x demonstration software
1.5.2 LEDs
4 general purpose LEDs are available as display devices.
1.5.3 Joystick
4-direction joystick with selection key.
1.6 Interfaces
1.6.1 CAN
The STR910-EVAL evaluation board supports CAN2.0A/B compliant CAN bus communication based on a 3.3V CAN transceiver. Both High-speed mode and slope control mode are available and can be selected by setting a dedicated jumper.
1.6.2 Ethernet
The STR910-EVAL supports IEEE-802.3-2002 compliant Ethernet communication via the MII interface PHY transceiver (STE100P) with PHY address 10101b and an integrated RJ45 connector with embedded transformer.
1.6.3 RS232
The STR91x evaluation board (STR910-EVAL) provides three on-board RS232 serial ports. Two channels, UART1 and UART2, use one RS232 transceiver U14. UART0 uses the RS232 transceiver U13 with full modem control support. All these RS232 ports are terminated by three male DB9 connectors.
1.6.4 Infrared data access (IrDA)
An on-board IrDA transceiver is available on U9 and the UART1 channel can be configured to support IrDA communications.
STR91x demonstration software Functional description
1.7 Motor control
STR910-EVAL evaluation board supports inductor motor control via a 34-pin connector, which provides all required control and feedback signals to and from motor power-driving board.
1.8 Miscellaneous peripherals
1.8.1 10-bit analog to digital converter
- Varistor: ADC channel6 connected to an on-board variable resistor. The variable resistor provides a voltage in the range 0 to 3.3V.
1.8.2 Push-buttons
The following push-buttons are provided:
- KEY: user push-button
- TAMPER: push-button used to simulate a tamper event on the RTC
1.8.3 Audio
The STR910-EVAL evaluation board supports both audio (*.wav format) recording and playback.
2 Running the demonstrations
2.1 Menu
Figure 2. Demonstration menus structure push-button. To exit a sub-menu press the "UP/DOWN" joystick direction.
2.1.1 Welcome screen
STR91x demonstration software Running the demonstrations After two seconds, the following graphic is displayed on the LCD screen: Then press "SEL" to enter in the main menu and displays the first menu item "Help". If no SEL pressed the main menu is shown automatically after seven seconds. Note: When the board is powered up for the first time, you have to set the date and time in the "Calendar" menu. Welcome to the STR91x Demo vX.X To Skip Push SEL
2.1.2 Navigation
Figure 3. Navigating in the demonstration menus “DOWN” located on the evaluation board.
- “RIGHT” and “LEFT” push-buttons perform circular navigation in the current menu items
- “SEL ” push-button selects the current item
- “UP” and “DOWN” jumps to the higher level menu. When the demonstration menu is activated, the following message is displayed on the LCD: In this case, when "SEL" pressed the following graphics are shown on LCD screen continuously one by one every two seconds. item 1 item 2 item n ... 1st LEVEL 2 nd LEVEL ... LEFT SEL SEL SEL WELCOME SCREEN LEFT UP/DOWNUP/DOWN RIGHT RIGHT LEFTRIGHT item 2.1 item 2.2 item 2.n ... LEFTRIGHT LEFTRIGHT item 1.1 item 1.2 item 1.n ... LEFTRIGHT LEFTRIGHT ...SEL LEFT RIGHT Help Main menu
STR91x demonstration software Running the demonstrations To exit from this help menu press any joystick push-buttons. Enter To Sub-Menu SEL To Exit Sub-Menu SEL UP DOWN Scroll Sub-Menu SEL LEFT RIGHT
2.2 Clock sources
2.2.1 Clock control
The STR91x internal clocks are derived from an on-board 25 MHz crystal source.
- HCLK frequency is set to 96 MHz
- FMICLK frequency is set to 96 MHz
- PCLK is set to 48 MHz
- USB clock (CK_USB) is set to 48 MHz (internal clock) Only the RTC is clocked by a 32 kHz external oscillator.
Figure 4. Clock control
48 MHz USBCLK
2.3 STR91x resources
2.3.1 Peripherals
2.3.2 Interrupts
Table 1. STR91x demo peripherals Table 2. STR91x demo interrupts
Running the demonstrations STR91x demonstration software
2.4 Demo applications
The following section provides a detailed description of each part of the demonstration. Notes:
- In the demonstration, the core runs at HCLK = 96 MHz.
- Red LEDs: LD2, LD3, LD4 and LD5 are always blinking.
2.4.1 Calendar
The STR91x has an embedded Real Time Clock (RTC) which provides a set of continuously running counters that can be used, with suitable software, to implement a clock-calendar function. The counter values can be written to set the current time of the system. This sub-menu is used to configure some miscellaneous functions such as time, date and alarm. Time This sub-menu is divided in two items allowing the user to display or to adjust the current time.
- Time Adjust: After the evaluation board is powered up for the first time, the user has to select this sub-menu to change the default time (00:00:00) to the current time. Once "Time Adjust" is selected, the first digit of the hour field is ready to be changed. Pressing the "UP" button will display the current value plus one. Pressing the "DOWN" button will display the previous digit value. After choosing the digit value press "SEL", the cursor jumps automatically to the next digit. When all the time digits are set, the "Calendar" menu is shown. Some digit values are limited to a range of values depending on the field (hour, minute or seconds). The following message (with the default time or the current time) is displayed on the LCD when this sub-menu is selected:
- Time Show: this item displays the current time or the default time. The following message is displayed on the LCD when this sub-menu is selected: To exit from this sub menu, press the UP/DOWN push buttons. Date This sub-menu is divided in two items allowing the user to display or to adjust the current date.
- Date Adjust: This item has to be selected after each power-up in order to set the current date. The user is asked to fill the cu rrent date to be stor ed in the application memory. The date is displayed on 8 di gits: Dayname MM DD YYYY . The default date HH:MM:SS Time Adjust HH:MM:SS Time Show
STR91x demonstration software Running the demonstrations value “SUN JAN 01 2006” is displayed when you enter this menu for the first time after power-up. The month field is ready to be changed. To change the month, press "UP" or "DOWN". Pressing the "UP" button will di splay the following mo nth, pressing the "DOWN" button will display the previous month. After choosing the month press "SEL", the cursor jumps automatically to the next field. When all the date fields are set, the "Calendar" menu is shown. Some digit values are limited depending on the field (month, day or year). When re-adjusting the date, the current date value is shown. The following message is displayed on the LCD when this sub-menu is selected:
- Date Show: this item displays the current date. The default date displayed after power up and before using the Adjust item application is “SUN JAN 01 2006”. The following message is displayed on the LCD when this sub-menu is selected: To exit from this sub menu press UP/DOWN push buttons. Alarm By means of this Sub-menu the user can configure the time when an alarm can be activated. When the alarm time value is reached the alarm wave is played. The Alarm wave is loaded in the internal Flash. This sub-menu is divided in two items to display or to adjust the current Alarm.
- Alarm Adjust: the alarm adjust is reached by the same procedure as the Time and Date Adjust Submenu. The first digit of the day field is ready to be changed. Pressing the "UP" button will display the current da y value plus one. Pressing the "DOWN" button will display the previous day value. After choosing the needed day press "SEL", the cursor jumps automatically to the next field.
- Alarm Show: this item displays the current alarm time. The default Alarm displayed after power up and before using the Adjust item application is 01/00:00:00. The following message is displayed on the LCD when this sub-menu is selected: To exit from this sub menu press UP/DOWN push buttons. SUN JAN 01 2006 Date Adjust SUN JAN 01 2006 Date Show DD/HH:MM:SS Alarm Adjust 01/00:00:00 Alarm Show
Running the demonstrations STR91x demonstration software Note: When an alarm is occurred the Alarm wave is played.
2.4.2 Wave player
The STR91x microcontroller has several em bedded Timers which can be used for timing purposes and generating the output signals. In this case, we use 2 Timers (TIM) the first Timer TIM3 is configured to generate a PW M signal with a tunable duty cycle. The second Timer TIM0 is used to generate an Update interrupt every 45.35 µs (22.05 KHz) which correspond to the TIM3 Duty cycle update. The wave file has the following characteristics:
- *.wav file
- Audio Format: PCM
- Sample rate: 22050 Hz
- Bits Per Sample: 8 bits
- Number Of Channels: Mono There is one wave to play:
- OSIRIS The following message is displayed on the LCD: Y ou can re-play a wave only by selecting "Play/Replay". The following message is displayed on the LCD: If "SEL" pressed, The following message is displayed on the LCD: To stop playing press "SEL" or wait until the end of the wave and the MCU will stop it automatically.
2.4.3 USB mouse demo
The STR91x microcontroller provides an USB (Universal Serial Bus) which provide an interface between a full-speed USB bus and the AHB bus. OSIRIS Wave Player OSIRIS Play/Replay STOP OSIRIS
STR91x demonstration software Running the demonstrations This sub-menu is used to configure the USB cell to communicate with the PC and run the mouse demo using the joystick push-buttons. If "SEL" pressed the following message is displayed on the LCD screen: For this sub-menu you have to connect an USB cable between the USB connector type B (CN3) and the PC. The previous message will remain displayed on the LCD screen until the cable plugin. Once the cable is connected, the following message is displayed on the LCD screen: Move the joystick and the PC cursor will move corresponding to the joystick push-button. To exit from this sub-menu press "SEL".
2.4.4 Webserver demo
The STR91x microcontroller provides a DMA/MAC controller for Ethernet communication. This demo shows a webserver application, based on the uIP v0.9 TCP/IP stack. The following sub-menu is used to start the Ethernet webserver demo: If "SEL" is pressed the following message is displayed on the LCD screen: Start USB Mouse Demo Plug the USB Cable Move the JoyStick To Stop Press SEL Start Webserver Demo Webserver Started Press UP to exit
- Connect the STR9-EVAL board to your PC Ethernet port using either a crossover
Ethernet cable or through an Ethernet switch or hub.
- Change your PC IP address to: 192.168.0. x (where x is a value other than 8)
Figure 5. STR9 webpage
3 Revision history
Table 3. Document revision history