Elite.Parts Manufacturers S STMICROELECTRONICS ST7FOPTIONS-EVAL
About product Datasheet FAQ

STMICROELECTRONICS ST7FOPTIONS-EVAL

Description

BOARD EVALUATION ICP/IAP ST7

Part Number

ST7FOPTIONS-EVAL

Price

Request Quote

Manufacturer

STMICROELECTRONICS

Lead Time

Request Quote

Category

PRODUCTS - S

Datasheet

pdf file

4126743_1.pdf

572 KiB

Extracted Text

SAFE ST7 EVALUATION BOARD (ST7FOPTIONS-EVAL) USER MANUAL June 2002 DOC- ST7FOPTIONS-EVAL 1 USE IN LIFE SUPPORT DEVICES OR SYSTEMS MUST BE EXPRESSLY AUTHORIZED. STMicroelectronics PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF STMicroelectronics. As used herein: 1.Life support devices or systems are those 2. A critical component is any component of a life which (a) are intended for surgical implant into support device or system whose failure to the body, or (b) support or sustain life, and perform can reasonably be expected to cause whose failure to perform, when properly used in the failure of the life support device or system, accordance with instructions for use provided or to affect its safety or effectiveness. with the product, can be reasonably expected to result in significant injury to the user. 1 ST72F26x MCU FAMILY SAFE ST7 EVALUATION BOARD USER MANUAL 1 INTRODUCTION The objective of the Safe ST7 Evaluation Board is to allow you to try out all the special fea- tures embedded in the ST72F26x MCU family. You can learn how each feature works and how to use them the best way by playing with the user controls and jumper settings. For ex- ample, you can check out what happens to your application when the voltage becomes erratic or the clock signal suddenly fails. Examples of what you can do: Save application data in E2PROM when a power cut occurs and/or the main clock source fails (using the AVD and CSS options). Prove it works by resuming the application exactly where it left off after restoring the data saved by the AVD interrupt routine. Drive LEDs directly (using the MCU’s high sink current I/O ports) Experiment with different clock sources: external crystal or ceramic resonator, internal RC oscillator, external clock signal. The advantages of the internal RC: less cost, less components, less power consumption! Check out the safe operation of the MCU in varying supply voltage conditions. You change the voltage using a trimmer. The voltage level is displayed on a 3-digit display. The LVD will automatically hold the MCU in reset state while the voltage is below the safe threshold. No need for an external reset circuit so more savings in board space and components. Select different power sources, on-board 9V battery or external power supply 2 Change E PROM data or Flash program memory on-the-fly using In-Application Programming (IAP) Use Nested interrupts to let you interrupt an interrupt routine, service a higher priority interrupt and resume the one previously being serviced. This evaluation board incorporates basic input sources such as push-buttons, analog trimmer or output sources (LEDs, 7-segment displays, buzzer) and a wire-wrap area so you can easily develop your own application. The following development tools can be ordered separately: assembler, linker, C compiler, source level debugger, hardware emulator, programming boards and gang programmer. For ordering information, see our website at http://mcu.st.com or contact your local sales office. June 2002 1/28 1 Table of Contents 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 SAFE ST7 EVALUATION BOARD DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 BOARD FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 POWER SUPPLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 OSCILLATION SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 ICP (IN-CIRCUIT PROGRAMMING) CONNECTOR . . . . . . . . . . . . . . . . . . . . . . 7 2.6 I²C SERIAL COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.7 SPI SERIAL COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.8 I/O PORT FUNCTIONALITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.8.1 Port A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.8.2 Port B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.8.3 Port C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.9 JUMPER DESCRIPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.1 W2 - Variable voltage enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.2 W3 - Board reference voltage selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.3 TP4 and TP5 - GND and VDD pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.4 W6 - MCU power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.5 W4 and W5 - Source clock selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.6 W8 and W9 - External interrupts enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.9.7 W10 - Buzzer enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.8 TP1, TP2 and TP3 - Port connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.9 W15 - LEDs enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.10W13 and W14 - Analog inputs enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.11W12 - High Sink I/O test enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.12W16, W17 and W18 - 7 seg Displays enable/disable . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.13W1 - ICP Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.14W7 - I²C connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9.15JP11 - SPI Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 SOFTWARE DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1 OPTION BYTE CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 MAIN MCU INITIALIZATION ROUTINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 COUNTERS AND USE OF TIMING RESOURCES . . . . . . . . . . . . . . . . . . . . . . 28 13 3.4 INTERRUPT SERVICE ROUTINES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2/28 1 Introduction 3.5 MAIN PROGRAM ROUTINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.6 OPERATING THE DEMOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.6.1 Running the LVD Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.6.1.1LVD Demo Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.6.2 Running the AVD Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.6.2.1AVD Demo Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.6.3 Running the CSS Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.6.3.1CSS Demo Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.6.4 Running the High I/O current demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.6.4.1High Sink Demo Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.6.5 Running the IAP demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.6.5.1IAP Demo Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.6.6 Running the Nested & Concurrent Interrupts demo . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.6.6.1Nested & Concurrent Interrupts Demo Description . . . . . . . . . . . . . . . . . . . . 25 4 APPENDIX 1: SAFE ST7 EVALUATION BOARD SCHEMATIC . . . . . . . . . . . . . . . . 26 3/28 Safe ST7 Evaluation Board DESCRIPTION 2 SAFE ST7 EVALUATION BOARD DESCRIPTION The Safe ST7 Evaluation Board is designed to support any of the SDIP32 package devices from the ST72F264 family (ST72F264, 262, 260). 2.1 OVERVIEW This board is supplied ready-to-use, to let you try out all the functions described in this manual. The board is delivered with a SDIP32 socket. You will have to build an adapter if you need evaluate the ST72F264 in other packages. Additional hardware functions can be implemented by installing components in the wire-wrap area as shown in Figure 1 below. Figure 1. Safe ST7 Evaluation Board layout ICP Connector Battery Reset Button Wire-Wrap Area MCU + PA, PB & Clock system PC Ports SPI Connector I²C Three Connector 7-segments LEDs Buzzer Voltage Trimmer Two Push Buttons Output LEDs For more details, please refer to the schematic drawing in the appendix. 4/28 1 Safe ST7 Evaluation Board DESCRIPTION The main Safe ST7 Evaluation Board components are: - Socketed ST72F264 - 16MHz crystal - Reset pushbutton - ICP connector - Socketed I²C 8K byte EEPROM (M24C08) - Socketed SPI 4K byte EEPROM (M95040) - 2 pushbuttons for external interrupts - 22 pins for expansion ports - Row of 8 LEDs for displaying binary values - Three 7-segment LEDs - High efficiency LED - Potentiometer for main voltage variation - Potentiometer for I/O current variation - 9-volt battery - Buzzer - Wire-Wrap area 2.2 BOARD FEATURES - Low voltage detector (3 levels programmable by option bytes) - Auxiliary voltage detector - Multi-Oscillator and Clock Security System - High Sink/source current - Nested/ Concurrent Interrupts - In-Application Programming - In-Circuit Programming - I²C & SPI communications interfaces - 10-bit ADC 5/28 Safe ST7 Evaluation Board DESCRIPTION 2.3 POWER SUPPLY This board is supplied with a PP3 9-volt battery demonstrating the board’s low power con- sumption. A complementary DC power supply input (ref. J1) is provided to supply the board by external ( 9 to 13 Volt) power. When using this power supply, take care to respect the po- larities marked next to the two-pole connector. Warning: Disconnect the battery from its socket when the Safe ST7 Evaluation Board is not in use. The reference voltage on board (V ) is selected through the W3 jumper. You can choose be- DD tween two reference voltages, either a regulated 5 volts and or a voltage that varies, by moving the R5 trimmer position, from 0 to 5.6 Volts as shown in Figure 2. Figure 2. How to Change the Board Voltage Reference Variable Voltage selected 5 regulated Volts selected V Board DD W3 V Board 5 regulated Volts Variable Voltage DD W3 5 regulated Volts Variable Voltage RV1 The 1N4004 diodes provide for polarity protection and the LD1 LED provides an indication that power is being supplied to the board. 2.4 OSCILLATION SYSTEM The board is designed to be used with an on-board 16-MHz crystal. This allows you to con- figure the CPU frequency up to 8 MHz. The oscillator system is designed to fit a range of application needs, and you can choose be- tween three different sources using the W4 and W5 jumpers as shown in Figure 3. 6/28 Safe ST7 Evaluation Board DESCRIPTION Figure 3. How to Change the Oscillator Frequency Source Crystal Resonator Internal RC oscillator External Clock C4 C4 C4 W4 W4 W4 XT1 XT1 XT1 W5 W5 W5 C5 C5 C5 2.5 ICP (IN-CIRCUIT PROGRAMMING) CONNECTOR You can use In Circuit Programming (ICP) to update the entire contents of the Flash memory (including option bytes) using the ICC protocol. Figure 4 shows the connector pin assignment. If you are connecting an ST Programming Tool to Safe ST7 Evaluation Board just connect cable provided with the ST Programming Tool to the ICP connector "W2" and then power on the board. Figure 4. How to use the ICP Connector ICP Connector Pin assignment Cable to ST Programming Tool ICCDATA ICCCLK RESET VPP OSC_CLK ICP ICP 2 10 2 10 1 9 1 9 W2 W2 7/28 Safe ST7 Evaluation Board DESCRIPTION 2.6 I²C SERIAL COMMUNICATION An external 8 Kb EEPROM memory with an I²C serial interface is connected to the I²C pins of the ST7 socket as shown in the following figure. The serial EEPROM may also be discon- nected and the I²C bus used for other communications. Figure 5. How to use the I²C Connection Using the I²C BUS Using the On-board I²C EEPROM ST7 I²C SCLI ST7 I²C SCLI pins pins SDAI SDAI W7 W7 U4 U4 Install all the jumpers on the I²C connector. Remove the jumpers and use left connector side. 2.7 SPI SERIAL COMMUNICATION An external 4 Kb EEPROM memory with an SPI serial interface is connected to the SPI pins of the ST7 socket as shown in the following figure. The serial EEPROM may also be discon- nected and the SPI bus used for other communications. Figure 6. How to use the SPI Connection Using the SPI Bus Using the On-board SPI EEPROM PB3 PB3 ST7 I²C ST7 I²C MOSI MOSI pins pins MISO MISO SCK SCK W 11 W 11 U5 U5 Remove the jumpers and use left connector side. Install all the jumpers on the SPI connector. 8/28 M95040 M24C08 SPI I2C M24C08 M95040 I2C SPI Safe ST7 Evaluation Board DESCRIPTION 2.8 I/O PORT FUNCTIONALITY All I/O port pins are accessible through external connectors ( TP1 for port A, TP2 for port B and TP3 for port C ). 2.8.1 Port A The PA0 and PA1 pins are connected to the ICP connector using their alternate functions, IC- CCLK and ICCDATA. The PA2 and PA3 pins are used to enable the U6 and U7 7-segment LED displays (useful for multiplexing). The PA5 pin can be used to generate an external interrupt (ei0). It is connected to the ground via the SW2 push-button switch . The PA4 and PA6 pins alternate functions (SCLI and SDAI) are used for connecting an I²C communication with the external I²C EEPROM. PA7 is used to exercise the high sink I/O current capability through the High efficiency LED. Table 1. Port A Alternate Functions PA0 ICCCLK In Circuit Communication Clock PA1 ICCDATA In Circuit Communication Data PA2 PA3 PA4 SCLI I²C Clock PA5 RDI SCI output PA6 SDAI I²C Data PA7 TDO SCI input 2.8.2 Port B This port is connected simultaneously to 8 LEDs and to the three 7-segment displays. It can be used to display 8 bits of binary data. Table 2. Port B Alternate Functions PB0 ICAP1_A Timer A Input Capture 1 PB1 OCMP1_A Timer A Output Compare 1 PB2 ICAP2_A Timer A Input Capture 2 PB3 OCMP2_A Timer A Output Compare 2 PB4 MOSI SPI Master Out Slave In Data PB5 MISO SPI Master In Slave Out Data PB6 SCK SPI Serial Clock PB7 SS SPI Slave Select 2.8.3 Port C The PC0 pin can be connected to ground via the SW3 push-button in order to generate an external interrupt (ei1). 9/28 Safe ST7 Evaluation Board DESCRIPTION The PC1/OCMP1_B pin can be connected to a buzzer through the W10 jumper . The PC2 pin is used to enable the output signal to the LEDs. A high level on PC2 enables the logic states programmed by port B to be output on the 8 LEDs. The PC3 pin is used to enable the U8 7-segment LEDs display (useful for multiplexing). The PC4/AIN4 pin can be used through the W14 jumper as in analog input to measure the voltage level of R13. The PC5/AIN5 pin can be used through the W13 jumper as in analog input to measure the VREF voltage. Table 3. Port C Alternate Functions PC0 ICAP1_B / AIN0 Timer B Input Capture 1 Analog Input 0 PC1 OCMP1_B / AIN1 Timer B Output Compare 1 Analog Input 1 PC2 CLKOUT / AIN2 CPU Clock Out Analog Input 2 PC3 ICAP2_B / AIN3 Timer B Input Capture 1 Analog Input 3 PC4 OCMP2_B / AIN4 Timer B Output Compare 1 Analog Input 4 PC5 EXTCLK_A / AIN5 Timer A External Clock Analog Input 5 2.9 JUMPER DESCRIPTIONS 2.9.1 W2 - Variable voltage enable/disable This jumper allows you to disable the variable voltage and thus reduce the total power con- sumption of the board and extend battery life. 2.9.2 W3 - Board reference voltage selection Refer to Section 2.3 POWER SUPPLY. 2.9.3 TP4 and TP5 - GND and V pins DD These spare ground and V pins are for test purposes or for providing power to components DD in the wire-wrap area. 2.9.4 W6 - MCU power consumption This jumper is only for connecting to the MCU power supply. Its main purpose is to allow you to measure the current consumption of the µC by connecting a DC-ammeter in series. 2.9.5 W4 and W5 - Source clock selection Please refer to Section 2.4 Oscillation system. 2.9.6 W8 and W9 - External interrupts enable/disable Those two jumpers allow you to disconnect the two push-buttons SW2 and SW3 from the PA5 and PC0 pins respectively. 10/28 Safe ST7 Evaluation Board DESCRIPTION 2.9.7 W10 - Buzzer enable/disable This jumper allows you to use the buzzer by connecting it to the PC1 pin. 2.9.8 TP1, TP2 and TP3 - Port connectors These jumpers allow you to access all I/O ports. 2.9.9 W15 - LEDs enable/disable This jumper is used to connect the LEDs to ground through the resistor network. It is recom- mended to remove the jumper from the board if this feature is not used. 2.9.10 W13 and W14 - Analog inputs enable/disable These jumpers are for measuring the Vref analog voltage and the voltage through R13. Re- moving them will disable those two features (The measurement of the V voltage value and DD the measurement of the current driven through the high efficiency LED). 2.9.11 W12 - High Sink I/O test enable/disable This jumper lets you enable or disable the High efficiency LED. 2.9.12 W16, W17 and W18 - 7 seg Displays enable/disable These jumpers allow you to enable/disable the three 7-seg displays (useful for multiplexing). 2.9.13 W1 - ICP Connector Please refer to Section 2.5 ICP (In-Circuit Programming) connector. 2.9.14 W7 - I²C connector Please refer to Section 2.6 I²C serial communication. 2.9.15 JP11 - SPI Connector Please refer to Section 2.7 SPI serial communication. 11/28 SOFTWARE DESCRIPTION 3 SOFTWARE DESCRIPTION This part gives a short description of the whole program as a main routine that uses many other functions and several drivers. The configuration of the microcontroller and also the con- figuration of option bytes is described first, followed by an overview of the main program struc- ture. Finally, we will provide a detailed description of how to use the board’s features. 3.1 OPTION BYTE CONFIGURATION Option bytes are only accessed using In-Circuit Programming or an ST programming tool such as an EPB. In this case, the option bytes are configured as described below. – Watchdog is configured to be enabled by software and to allow the MCU to enter Halt Mode (no reset on Halt). – The LVD threshold is fixed to the medium value. – Sector 0 size is 4 Kbytes. – No program memory protection. – Port C external interrupt mapping is configured as ei1. – The clock security system is always on. – Oscillator type is resonator oscillator. – Oscillator range is between 8 and 16 MHz. Table 4. Option byte configuration OSC OSC PLL OSC OSC OSC EXTIT CSS RNGE2 RNGE1 RNGE0 TYPE1 TYPE0 OFF 10 000 11 1 WDGHALT WDG SW VD1 VD0 SEC1 SEC0 FMP R FMP W 01011100 12/28 SOFTWARE DESCRIPTION 3.2 MAIN MCU INITIALIZATION ROUTINE This routine initializes the MCU as follows: – MISCR (miscellaneous register): external interrupts trigger on falling edge, no slow mode and f =8 MHz. CPU – Port A: PA7 (Driving the High efficiency LED) is an open drain output, PA6 & PA4 used by I²C as input without interrupt, PA5 (Push-button) used as floating input with interrupt, PA2 & PA3 (multiplexing 7-seg displays) as push-pull outputs. – Port B: used as push pull output to display data. – Port C: PC5 & PC4 as ADC alternate inputs, PC3 as push-pull output (multiplexing 7-seg displays), PC2 to select the LED bank (push-pull output), PC1 to drive the buzzer and PC0 as an input with interrupt (push-button). 3.3 COUNTERS AND USE OF TIMING RESOURCES – Timer A is used as a real time clock that provides a precise time base for all program rou- tines. Timer A interrupt is enabled. – Timer B is mainly used to drive the buzzer using PWM mode without interrupts. 3.4 INTERRUPT SERVICE ROUTINES – Timer A interrupt: increment (circular buffer) several global counters used as time counters when the free running counter reaches the calculated value. – AVD interrupt: saves the current mode when the power drops and, if we are in AVD mode, the last displayed digits are saved in the external I²C EEPROM using the I²C driver. – ei1 Interrupt: this interrupt is used to wake-up the microcontroller from idle mode (HALT) and also it increments a circular variable used by the main program to enter the correspond- ing test. – ei0 Interrupt: this interrupt is used to test concurrent and nested interrupts. 3.5 MAIN PROGRAM ROUTINE The main program includes the initialization code and an endless loop that processes the pushbutton inputs. In fact, after initialization and enabling interrupts, the main program will continue running in an infinite loop and wait for an external interrupt to switch to one of the demo routines: (LVD, AVD/CSS, High Current I/O, IAP, Concurrent/ Nested Interrupts). By default the program is in Halt mode (to reducing power consumption). Warning: Disconnect the battery from its socket when the Safe ST7 Evaluation Board is not in use. 13/28 SOFTWARE DESCRIPTION Figure 7. Main program flowchart Begin Disable all Interrupts MCU Initialization I²C Initialization Init Timer A This function is used for the AVD interrupt Safety procedure Disable RASS Keys Enter Halt Mode Enable all interrupts : Program path/ PGM interrupt “START” message “FINISH” message LVD Demo Nested IT Demo Test “MODE” variable Concurrent IT Demo AVD Demo High Current Demo IAP Demo 14/28 SOFTWARE DESCRIPTION 3.6 OPERATING THE DEMOS The flowcharts below provide a full description of all the tests and demos that you can run. Figure 8. Operations Flowchart (1) Power-on the board / RESET HALT Mode MCU in a HALT state No Push The PGM button No Yes Push The PGM Display “START “ End button Light-on LED 0 No Push The PGM button Yes Low Voltage Detector Demo LoL f Display " LVD " Light-on LED 1 No No Push The PGM Push the DEMO button button Yes Yes Display the V voltage DD Light-on LED1 No Push The PGM button Yes AVD and CSS Demo Display "AVD CSS " Light-on LED 2 No No Push The PGM Push the DEMO button button Yes Yes Display a counter 000..999 Light-on LED2 No Push The PGM button Yes To next figure 15/28 SOFTWARE DESCRIPTION Figure 9. Operations Flowchart (2) From previous Figure High I/O Current Demo Display "HIO" Light-on LED 3 No No Push The PGM Push the DEMO button button Yes Yes Display the current inside the High Efficiency LED Ligh t-on th e high efficiency Led Light-on LED 3 No Push The PGM button Yes In-Application Programming Demo Display "IAP" Light-on LED 4 No No Push The PGM Push the MODE button Button Yes Score 0 Score 1 Test XFlash m emory First Time Display "SCORE 0" Display "SCORE 1" Display "TRANSFER" Light-on LED 4 Light-on LED 4 Light-on LED 4 Receive & Re-program Send Score0 & Score1 Receive & Re-program Score1 from the SPI E²PROM to the SPI E²PROM Score0 from the SPI E²PROM Display " DONE " Light-on LED 4 No Push The PGM button Yes To next Figure 16/28 SOFTWARE DESCRIPTION Figure 10. Operations Flowchart (3) From previous Figure Concurrent Interrupts Demo Display " CONCURRENT IT " Light-on LED 5 No No Push The PGM End of the Light-on LED 5 button message Yes Yes Play music Score Push The PGM IT1 Light-on LED 5 button No No Yes Push The DEMO End of The Score IT0 button Yes Wait End of score Light-on LED 5 Display a lighting Sequence on LEDs Nested Interrupts Demo Yes Display " NESTED IT " End of the Light-on LED 6 Light-on LED 6 message No No Push The PGM Play music Score button Push The PGM Light-on LED 6 button Yes No Display " FINISH " Yes Push The DEMO End of The Score Light-on LED 7 button Yes Display a lighting Sequence on LEDs End 17/28 SOFTWARE DESCRIPTION 3.6.1 Running the LVD Demo In LVD Demo state (see Figure 11), the user can switch between the two positions of W3 as described in Section 2.3. If the power goes below the LVD level, the microcontroller enters RESET state. At power-on, the program enters LVD demo mode (because an LVD reset was detected) and displays the V voltage on the 7-seg display. DD 3.6.1.1 LVD Demo Description The program reads in a fixed 2.4V reference voltage (VREF) via the 10-bit ADC channel, does some arithmetic to convert the digital value it has read to a voltage level and finally displays the main voltage of the board (V ) in Volts on the three 7-segment LEDs. DD Note: X is the converted digital value of VREF (2.4 Volts) and 3FF is the digital value of V , DD So: 3FF V = 2.4 × - --- -- -- --- DD X Figure 11. LVD Demo Overview ST72F264 press to reset Battery SAFE ST7 EVALUATION BOARD move the jumper to right press until LED1 lights-on Push to run on off the Demo Potentiometer LED1 The W3 jumper must be moved to the right to select the variable power supply. If the RV1 trimmer is turned completely clockwise, the board is powered by 5.6 Volts. If the trimmer is turned counter-clockwise the V value will decrease until we reach the LVD threshold (V ), DD IT- at which point the microcontroller enters reset mode. 18/28 SOFTWARE DESCRIPTION In power-on, if the trimmer is turned clockwise, the device will leave reset state and we can see the V threshold on the display. IT+ Note: the V reference value for a voltage drop is lower than the V reference value for IT- IT+ power-on in order to avoid parasitic reset when the microcontroller starts running and sinks current on the supply (hysteresis). 3.6.2 Running the AVD Demo In Auxiliary Voltage Detector & Clock Security System Demo state (see Figure 12), the 7-seg display shows a counter that increments from 000 to 999. To test the AVD capability: – Disconnect the battery or decrease the V voltage using the power trimmer until the MCU DD enters RESET state. – Then, supply the board with the right voltage. – You will see that the counter does not restart at 000, but resumes counting from the last dis- played value before shut-down. 3.6.2.1 AVD Demo Description For system integrity management, in addition to the LVD feature, the Safe ST7 Evaluation Board has an auxiliary voltage detector (AVD) with interrupt capability. In case of a drop in voltage, the AVD interrupt acts as an early warning, allowing software to shut down safely be- fore the LVD resets the microcontroller. The AVD works closely with the LVD and functions only if the LVD is enabled through option byte (see “Option byte configuration” on page 12). 19/28 SOFTWARE DESCRIPTION Figure 12. AVD Demo Overview Disconnect the battery ST72F264 ST72F264 press to reset press to reset Battery Battery SAFE ST7 SAFE ST7 EVALUATION BOARD EVALUATION BOARD move the jumper move the jumper to right to left press until LED2 press until LED2 lights-on Push to on off Push to lights-on run the Demo run the Demo Potentiometer LED2 LED2 In case of power drop, and before going into reset state, the AVD interrupt will save the last displayed value in the external EEPROM (M24C08) using the I²C protocol. On power-on, the software checks if the last reset was made by the LVD, if this is the case, it downloads the pre- viously saved value from the external EEPROM to RAM memory in order to resume counting as normal. To cause a voltage drop, we can choose between two solutions as shown in the Figure 12.The first method consists of moving the W3 jumper to the right, then decreasing the main voltage by turning the RV1 trimmer counter-clockwise. The second method consists of moving the W3 jumper to the left so that we will have a 5-Volt reference value, and then disconnecting the bat- tery. 3.6.3 Running the CSS Demo To run this demo, we have to be in the same state as in the AVD demo see “Running the AVD Demo” on page 19. Once the main program runs at 8 MHz, Timer A is configured to manage the counting opera- tion displayed on the three 7-segments LEDs. To test the CSS capability: – Disconnect the oscillator by removing the W4 and W5 jumpers. – You will see the frequency decreases significantly but that the counter still working. 20/28 SOFTWARE DESCRIPTION 3.6.3.1 CSS Demo Description The clock security system (CSS) embedded in the ST72F264 family of microcontrollers, pro- tects the device against problems occurring to the main clock. To allow you to integrate secu- rity features in your application, it performs clock filter control and generates an interrupt in case of clock problems, while switching to an internal safe oscillator to allow the software to keep running at a reduced speed. The safe oscillator of the CSS block is a low frequency back-up clock source (around 3 Mhz). Figure 13. CSS Demo Overview Disconnect the two clock jumpers ST72F264 press to reset Battery SAFE ST7 EVALUATION BOARD move the jumper to left Push to press until LED2 lights-on run the Demo LED2 If the clock signal disappears, which you can provoke by disconnecting the two jumpers as shown in Figure 13, the safe oscillator delivers a low frequency clock signal (around 3MHz) for a safe oscillator period which allows the ST7 to save any critical data or perform any kind of emergency operations while the CPU is still running. The ST7 clock source switches back from the safe oscillator automatically if the original clock source recovers. You can simulate this by replacing the clock jumpers. For more details refer to Section 2.4 Oscillation system. 3.6.4 Running the High I/O current demo This demo uses the example of a high efficiency LED to provide a visible result: its relative lu- minosity increases linearly with the forward current, which reaches more than 50mA at only 3 Volts. The program measures the value of the current in the LED using ADC analog input channel 4 and at the same time it displays the result on three 7-segment LEDs (units in mA). 21/28 SOFTWARE DESCRIPTION To vary the forward current, we have to move the RV2 trimmer position as shown in Figure 14 You can verify the current value for yourself by connecting a serial ammeter to W12. Figure 14. High Sink I/O Demo Overview ST72F264 press to reset Battery SAFE ST7 EVALUATION BOARD move the jumper to left press until LED3 Push to + - lights-on run the Demo LED3 3.6.4.1 High Sink Demo Description This demo shows how the high sink outputs can be used and how to measure the current de- livered by any of the high sink outputs on Port A. In addition to standard I/O ports which sink and sources a maximum (absolute rating) output current of 25mA, most ST7s include High sink I/Os that can sink a current (absolute rating) output of up to 50mA. This allows you to drive any type of high power device directly without needing expensive external circuitry. 3.6.5 Running the IAP demo This demo consists of re-programming XFLASH sector 1 using the In-Application Program- ming. To show this, it reprograms one piece of music (64 Bytes) by another one using the SPI communication protocol with the external M95040 4Kb SPI EEPROM memory. The demo software includes an IAP_driver that will be copied to the RAM area to execute the demo. It programs 16 bytes at a time. For more details about XFLASH In-Application Programming refer to the ST7 FLASH Pro- gramming Reference manual. As shown in Figure 15, you enter the IAP demo by pushing down the PGM button until LED4 lights-up and the “IAP” message appears. Then you must push the DEMO button. During this time the device will be updated and when this is finished a “DONE” message will appear. 22/28 SOFTWARE DESCRIPTION Note: If you don’t want to enter this mode, you must push the PGM button again to jump di- rectly to the next demo. Note: This demo only runs the software that downloads the musical sequence from the ex- ternal EEPROM to the XFLASH device. This music data can be output on the buzzer. In order to listen to the music and verify that the data has been changed by IAP, you have to run the nested & concurrent interrupts demos. Figure 15. IAP Demo Overview ST72F264 press to reset Battery SAFE ST7 EVALUATION BOARD keep the jumper to left Push to run the Demo press until LED4 lights-on LED4 3.6.5.1 IAP Demo Description The ST72F26x microcontroller family has a single voltage extended Flash (XFLASH) area that can be electrically erased and programmed either on a byte-by-byte basis or up to 32 bytes in parallel. In-Application Programming (IAP) allows you to update program memory contents when the device is already plugged on the application board, at minimum cost in terms of added components and board area impact. This programming mode uses an IAP driver program which has been previously programmed in sector 0. This method is fully controlled by user software. This allows it to be adapted to the user application (user-defined strategy for entering programming mode, choice of communi- cations protocol used to fetch the data to be stored). RAM Mapping 0xA0 to 0xA1: XFLASH start address (2 bytes) 0xA2 to 0xB2: 16-byte RAM buffer. 23/28 SOFTWARE DESCRIPTION 0xB2 to 0xCE: IAP_driver storage area, (used only while the demo is running) Sector1 Mapping (Reprogrammable Area) 0xE000 to 0xE00F: 16 spare bytes for testing 0xE010 to 0xE04F: (64 bytes) Music score1 (Software reprogrammable bytes) 0xE050 to 0xE08F: (64 bytes) Music score 2 0xE090 to 0xE14F: All other constants Figure 16. IAP Demo flowchart Begin Else 0xE010..0xE04F contents Score0 (or 1) First time the chip is plugged in Test 0xE000 content Display "SCORE0" (or "SCORE1") Display "TRANSFER" Init SPI Init SPI Repeat 4 times Send Score1&2 to M95040 Receive next 16 bytes of Score1 (2) from M95040 SPI Disable Program 16 bytes of Score1 (2) to the right addresses SPI Disable Using IAP write "1" to 0xE000 Using IAP write "2" (1) to 0xE000 End 3.6.6 Running the Nested & Concurrent Interrupts demo Most ST7 microcontrollers have two different interrupt management modes. The first is called concurrent mode and does not allow an interrupt to be interrupted, unlike the nested mode where a software priority is given to each interrupt. 24/28 SOFTWARE DESCRIPTION 3.6.6.1 Nested & Concurrent Interrupts Demo Description Figure 17. Interrupts Demo Overview ST72F264 press to reset ST72F264 press to reset Battery Battery SAFE ST7 SAFE ST7 EVALUATION BOARD EVALUATION BOARD keep the jumper keep the jumper to left to left (2) Press to run IT0 (2) Press to run IT0 (1) Press to run IT1 (1) Press to run IT1 Buzzer Buzzer LED5 LED6 Concurrent Interrupt Demo Nested Interrupt Demo As shown in Figure 17 this demo is divided into two parts: The first one runs concurrent inter- rupts while the second uses nested interrupts. The IT0 and IT1 interrupt service routines are assigned to external interrupt vectors ei0 and ei1. You can trigger the interrupts directly by pressing the two push-buttons shown in Figure 17: IT1: outputs a piece of music (previously downloaded in the IAP demo) on the buzzer. IT0: displays a lighting sequence on LEDs. In the first demo (Concurrent Interrupts), all the interrupts have the same priority level, so the interrupt with the highest hardware priority will be serviced (in this case it is ei0). In this demo, you have to push the PGM button in order to trigger the IT1 routine, then pushing the DEMO button, IT0 won’t interrupt the IT1 routine and you have to wait for the end of music before the LEDs light up in sequence. To run the nested interrupt demo the board must be in the state shown in Figure 17, then if you push the PGM button, it will trigger the IT1 interrupt routine (music output). Before the end of the music you have to push the DEMO button in order abort the IT1 routine and service the IT0 routine. When the program returns from IT0, it resumes playing the music from the point where it was interrupted. 25/28 Appendix 1: Safe ST7 Evaluation Board SCHEMATIC 4 APPENDIX 1: SAFE ST7 EVALUATION BOARD SCHEMATIC VCC TP1 PA0 1 PA1 2 PA2 3 PA3 4 PA4 R2 C2 5 4.7k PA5 CD2 6 100µF PA6 100nF 7 PA7 8 LD1 U1 TP2 D1 L7805 PB0 1 3 POWER VV 1 PB1 IN OUT 2 PB2 1N4004 GND 3 PB3 4 PB4 5 PB5 D2 R1 6 1N4004 PB6 CD1 470 7 C1 PB7 J1 8 100nF 1 100µF 2 VREF TP3 BT1 Z1 PC0 1 2V4 PC1 2 PC2 3 PC3 4 PC4 5 PC5 W2 6 VCC TP4 R4 1 1k 2 U2A 3 VCC 1 T1 W3 2N2222 2 1 TS912 TP5 VCC 2 3 1 RV1 2 R5 POWER SELECT 10k 4.7k Z2 GND 5V6 26/28 4 8 2 Appendix 1: Safe ST7 Evaluation Board SCHEMATIC VCC VCC R9 R10 VCC 27k 27k PB3 U5 W11 1 SS U4 PB4 1 CD7 1 2 5 3 R11 E0 3 4 D W PA4 2 100pF E1 PB5 5 6 W7 6 3 100 2 7 SCLK E2 7 8 Q HOLD PB6 R12 1 2 PA6 5 3 4 SDA SPI 6 C 100 I2C 7 M95040 CD8 WC 100pF M24C08 PA1 ICCDATA W1 PA0 ICCCLK 2 1 4 3 RESET 6 5 8 7 VCC 10 9 VPP R3 VPP 10k ICP OSC1 VCC R6 IDD W6 4.7k U3 VCC VCC VCC CD4 C3 1 32 RESET VDD R7 R8 100nF 100pF 4.7k 4.7k 2 31 OSC1 VSS SW1 RESET CD3 3 30 OSC2 VPP/TEST VPP 100nF PB7 4 29 PA0 PB7/ SS ICCCLK/PA0 ICCCLK SW2 SW3 PB6 5 28 PA1 DEMO CD5 PGM CD6 PB6/SCK ICCDATA/PA1 ICCDATA 100nF 100nF PB5 6 27 PA2 PB5/MISO PA2 PA2 PB4 7 26 PA3 PB4/MOSI PA3 PA3 8 25 NC NC W4 W5 EI0 EI1 9 24 1 1 NC NC 2 2 PB3 10 23 PA4 3 3 PB3/OCMP2_A SCLI/PA4 W8 PB2 11 22 PA5 PB2/ICAP2_A RDI/PA5 XT1 PB1 12 21 PA6 PB1/OCMP1_A SDAI/PA6 4Mhz PB0 13 20 PA7 PB0/ICAP1_A TDO/PA7(HS) C4 C5 W9 22pF 22pF PC5 14 19 PC0 PC5/EXTCLK_A/AIN5 AIN0/ICAP1_B/PC0 BZ1 W10 PC4 15 18 PC1 PC4/OCMP2_B/AIN4 AIN1/OCMP1_B/PC1 PC3 16 17 PC2 PC3 PC3/ICAP2_B/AIN3 AIN2/MCO/PC2 PC2 Buzzer ST72F264 W12 W13 VCC RV2 VREF R13 10 LD3 PB0 W14 LD4 PB1 I/O Test LD2 RS1 2 LD5 3 PB2 4 5 LD6 W15 6 1 PB3 7 Leds enable U6 U7 U8 8 LD7 9 PB4 PB0 7 PB0 7 PB0 7 PB1 6 PB1 6 PB1 6 1k LD8 PB2 4 PB2 4 PB2 4 PB5 BC547 R14 PB3 2 PB3 2 PB3 2 PC2 PB4 1 PB4 1 PB4 1 4.7k T2 LD9 PB5 10 PB5 10 PB5 10 PB6 PB6 9 PB6 9 PB6 9 PB7 5 PB7 5 PB7 5 LD10 PB7 R16 R18 R20 1k 1k 1k W16 R15 T3 W17 R17 T4 W18 R19 T5 PA2 BC547 PA3 BC547 PC3 BC547 4.7k 4.7k 4.7k 27/28 4 8 VSS VCC 3 8 3 8 3 8 4 8 VSS VCC Appendix 1: Safe ST7 Evaluation Board SCHEMATIC THE SOFTWARE INCLUDED IN THIS NOTE IS FOR GUIDANCE ONLY. STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM USE OF THE SOFTWARE. Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics �2002 STMicroelectronics - All Rights Reserved. 2 2 Purchase of I C Components by STMicroelectronics conveys a license under the Philips I C Patent. Rights to use these components in an 2 2 I C system is granted provided that the system conforms to the I C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - Canada - China - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com 28/28

Frequently asked questions

What makes Elite.Parts unique?

chervon down
At GID Industrial (Elite.Parts' parent company), we specialize in procuring industrial parts. We know where to find the rare and obsolete equipment that our customers need in order to get back to business. There are other companies who claim to do what we do, but we're confident that our commitment to quality and value is unparalleled in our field.

What kind of warranty will the ST7FOPTIONS-EVAL have?

chervon down
Warranties differ by part and by which suppliers we use to procure it for you. Sometimes, a part will be sold as-is and without a warranty. Our specialty, single board computers, tend to receive a one-year warranty.

Which carriers does Elite.Parts work with?

chervon down
Elite.Parts can ship via FedEx, UPS, DHL, and USPS. We have accounts with each of them and generally ship using one of those, but we can also ship using your account if you would prefer. However, we can use other carriers if it will be more convenient for you.

Will Elite.Parts sell to me even though I live outside the USA?

chervon down
Absolutely! We are happy to serve customers regardless of location. We work with international clients all the time, and we are familiar with shipping to destinations all across the globe.

I have a preferred payment method. Will Elite.Parts accept it?

chervon down
All major credit cards are accepted: Visa, MasterCard, Discover, and American Express. We will also accept payment made with wire transfer or PayPal. Checks will only be accepted from customers in the USA. Terms may available for larger orders, upon approval.

Why buy from GID?

quality

Quality

We are industry veterans who take pride in our work

protection

Protection

Avoid the dangers of risky trading in the gray market

access

Access

Our network of suppliers is ready and at your disposal

savings

Savings

Maintain legacy systems to prevent costly downtime

speed

Speed

Time is of the essence, and we are respectful of yours

What they say about us

FANTASTIC RESOURCE

star star star star star

One of our top priorities is maintaining our business with precision, and we are constantly looking for affiliates that can help us achieve our goal. With the aid of GID Industrial, our obsolete product management has never been more efficient. They have been a great resource to our company, and have quickly become a go-to supplier on our list!

Bucher Emhart Glass

EXCELLENT SERVICE

star star star star star

With our strict fundamentals and high expectations, we were surprised when we came across GID Industrial and their competitive pricing. When we approached them with our issue, they were incredibly confident in being able to provide us with a seamless solution at the best price for us. GID Industrial quickly understood our needs and provided us with excellent service, as well as fully tested product to ensure what we received would be the right fit for our company.

Fuji

HARD TO FIND A BETTER PROVIDER

star star star star star

Our company provides services to aid in the manufacture of technological products, such as semiconductors and flat panel displays, and often searching for distributors of obsolete product we require can waste time and money. Finding GID Industrial proved to be a great asset to our company, with cost effective solutions and superior knowledge on all of their materials, it’d be hard to find a better provider of obsolete or hard to find products.

Applied Materials

CONSISTENTLY DELIVERS QUALITY SOLUTIONS

star star star star star

Over the years, the equipment used in our company becomes discontinued, but they’re still of great use to us and our customers. Once these products are no longer available through the manufacturer, finding a reliable, quick supplier is a necessity, and luckily for us, GID Industrial has provided the most trustworthy, quality solutions to our obsolete component needs.

Nidec Vamco

TERRIFIC RESOURCE

star star star star star

This company has been a terrific help to us (I work for Trican Well Service) in sourcing the Micron Ram Memory we needed for our Siemens computers. Great service! And great pricing! I know when the product is shipping and when it will arrive, all the way through the ordering process.

Trican Well Service

GO TO SOURCE

star star star star star

When I can't find an obsolete part, I first call GID and they'll come up with my parts every time. Great customer service and follow up as well. Scott emails me from time to time to touch base and see if we're having trouble finding something.....which is often with our 25 yr old equipment.

ConAgra Foods

Related Products

product

TRANSIL 400W 130V BIDIR SMA

product

TVS 600W 12V UNI-DIR DO-214AA

product

TVS 600W 30V BI-DIR DO-214AA

product

TRISIL 100A 360V BIDIRECT SMB

product

TRANSISTOR NPN SS SOT23

product

STMICROELECTRONICS ST10F269Z2Q6 MICROCONTROLLER - 16-BIT MCU WITH MAC UNIT, 128K to 256K BYTE FLASH ...