STMicroelectronics STM8L DISCOVERY STM8L-DISCOVERY board User Manual
Reklama
Reklama
UM0970
User Manual
STM8L-DISCOVERY
Introduction
The STM8L-DISCOVERY helps you to discover the STM8L ultralow power features and to develop and share your applications. It is based on an STM8L152C6T6 and includes an ST-
Link embedded debug tool interface, LCD (24 segments, 4 commons), LEDs and push buttons.
Figure 1.
STM8L-DISCOVERY board
September 2010 Doc ID 17693 Rev 1 1/29
www.st.com
Contents
Contents
UM0970
STM8L152C6T6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Using the ST-Link to program/debug the STM8L on board . . . . . . . . . . 12
Using the ST-Link to program/debug an external STM8L application . . 12
Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Built-in IDD measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
measurement principle . . . . . . . . . . . . . . . . . . . . 15
Ibias current measurement procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 16
LCD (24 segments, 4 commons) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2/29 Doc ID 17693 Rev 1
UM0970 Quick start
The STM8L-DISCOVERY is a low-cost and easy-to-use development kit to quickly evaluate and start a development with an STM8L ultralow power microcontroller.
Before installing and using the product, please accept the Evaluation Product License
Agreement from www.st.com/stm8l-discovery.
For more information on the STM8L-DISCOVERY and for demonstration software visit www.st.com/stm8l-discovery.
1.
Check jumper positions on the board, JP1 and CN3 ON (Discovery selected).
2. Connect the STM8L-DISCOVERY board to a PC with a USB cable to power the board.
Red LED LD2 (PWR) then lights up.
3. Function 1 is executed and each click on user button B2 changes the executed function
Table 1.
Functions
Function LED LD3/4 Bars Value displayed
1 Blink STM8L V
DD
voltage measured
2 Off STM8L consumption measured in Run mode
3 Off STM8L consumption measured in Low power mode, LCD on
4 Off
5 Off
STM8L consumption measured in Low power mode, LCD off
STM8L consumption measured in Halt mode, LCD off
To study or modify the DISCOVER project related to this demo, visit www.st.com/stm8ldiscovery and follow the tutorial. Discover the STM8L features, download and execute programs proposed in the list of projects. This site also contains examples from which you can develop your own applications.
●
●
Windows PC (2000, XP, Vista)
A/Mini-B USB cable
Doc ID 17693 Rev 1 3/29
Quick start UM0970
●
●
IAR, Embedded Workbench® for STM8
STMicroelectronics, ST Visual Develop (STVD)
Demonstration software is preloaded in the board's Flash memory. This demonstration uses the built-in IDD measurement feature of the STM8L-DISCOVERY to automatically measure and display on the LCD the consumption of the MCU in run and low power modes.
The latest versions of this demonstration source code and associated documentation can be downloaded from www.st.com/stm8l-discovery.
To order the STM8L ultralow power Discovery, use the order code STM8L-DISCOVERY.
4/29 Doc ID 17693 Rev 1
UM0970
2 Features
Features
●
●
●
●
●
●
●
●
The STM8L-DISCOVERY offers the following features:
● STM8L152C6T6 microcontroller, 32 KB Flash, 2 KB RAM, 1 KB EEPROM in 48-pin
LQFP
●
On-board ST-Link with selection mode switch to use the kit as a stand-alone ST-Link
(with SWIM connector for programming and debugging)
Two red LEDs; LD1 for USB communication, LD2 for 3.3 V power on
I
Designed to be powered by USB or an external supply of 5 V or 3.3 V
Can supply target application with 5 volts and 3 volts
Two user LEDs, LD3 and LD4 (green and blue)
Two push buttons (User and Reset)
DD
current measurement
LCD 28-pin DIP (24 segments, 4 commons)
Extension header for all QFP48 I/Os for quick connection to prototyping board for easy probing
Doc ID 17693 Rev 1 5/29
Hardware and layout
3 Hardware and layout
UM0970
The STM8L-DISCOVERY is designed around the STM8L152C6T6 microcontroller in a 48pin LQFP package.
illustrates the connections between the STM8L152C6T6 and its peripherals (ST-
Link, push button, LED, LCD and connectors).
help you to locate these features on the STM8L-DISCOVERY.
Figure 2.
Hardware block diagram
Mini
U S B
Em b edded
S T-LINK
I/O
S TM 8 L152C6T6
I/O
I/O RE S ET
Green LED
LD 3
Bl u e LED
LD4
B1
R S T
B2
U S ER
IDD me asu rement
P2 He a der
LCD (24 s egment s , 4 common s )
6/29 Doc ID 17693 Rev 1
UM0970
Figure 3.
Top layout
D1 diode
LD1
COM
CN2
SWIM connector
LCD 24 segments
JP1
I
DD
measurement
+3.3V power supply input
SB1,2
X2 crystal
STM8L152C6T6
B1
Reset button
LD3
LED green
Doc ID 17693 Rev 1
B2
User button
LD4
LED blue
7/29
Hardware and layout
D2 diode
LD2 power
ST-Link
CN3
ST-Link/Discovery selector
IDD module
+5V power supply input
Hardware and layout
Figure 4.
Bottom layout
SB3,5,7,9
PRG-32
(RESERVED)
SB4,6,8,10
DEFAULT
SB11,12,14
IDD_Measurement
UM0970
8/29
SB13,15
X3 crystal
SB17
B2-USER
SB16
B1-RESET
Doc ID 17693 Rev 1
P2 connector
P1 connector
JP1
IDD
P3 connector
UM0970 Hardware and layout
This 8-bit ultralow power MCU has 32 KB Flash, 2 KB RAM, 1 KB data EEPROM, RTC,
LCD, timers, USART, I2C, SPI, ADC, DAC and comparators.
Figure 5.
STM8L152C6T6 package
The STM8L152C6T6 8-bit microcontroller offers:
32 Kbytes of Flash memory
2 Kbytes RAM
1 Kbytes EEPROM
LQFP48 7 x 7 mm
This device provides the following benefits:
●
Ultralow power proprietary 130 nm technology:
Speed and power consumption independent of MCU power supply, Ultralow leakage
● Ultralow power design (clock gating, low-power Flash with power-off capability):
Reduced overall Run and Wait mode current consumption by turning off clocks of unused peripherals or Flash
●
●
Sub 1 µA hardware RTC and AWU system unit:
Ultralow power modes for applications requesting regular wake up
Range of Low power modes (up to 4):
Suitable for many applications from complete switch off to continuous monitoring at ultralow frequency
●
●
Advanced and flexible clock system (multiple internal and external clock sources):
Switch and adjust frequency and clock sources on the fly depending on application needs
Direct memory access on board (4-channel DMA):
Autonomy for peripherals, independent from core; can switch off Flash memory and
CPU (large current consumption contributors) while keeping peripherals active
●
●
Ultralow power and ultrasafe reset system POR/PDR; additional optional activation
BOR:
Integrated safety and security for application
Ultrafast wakeup from lowest Low power mode (4 µs):
Fast switching from Static and Dynamic power modes
●
Analog functional down to 1.8 V, programming down to 1.65 V:
Full functionality over the complete V
DD
range
For more information see the STM8L152C6T6 datasheet (Doc ID 15962) on the ST website.
Doc ID 17693 Rev 1 9/29
Hardware and layout
Figure 6.
STM8L152C6T6 block diagram
UM0970
10/29 Doc ID 17693 Rev 1
UM0970 Hardware and layout
Note:
●
●
The ST-Link programming and debugging tool is integrated on the STM8L-DISCOVERY.
The embedded ST-Link can be used in 2 different ways according to the jumper states (see
to program/debug the MCU on board, to program/debug an MCU in an external application board using a cable connected to
SWIM connector CN2.
For information about debugging and programming features refer to ST-Link UM0627.
UM0627 contains information about all the ST-Link features. Usage in this situation is restricted to STM8 devices and SWIM support.
Figure 7.
Typical configuration
Hardware requirements:
- USB cable type A to mini-B
- Computer with Windows 2000, XP or Vista OS
Development toolchain:
- IAR, Embedded Workbench® for STM8L
- STMicroelectronics, ST Visual Develop (STVD)
Table 2.
Jumper states
Jumper state
Both CN3 jumpers ON
Both CN3 jumpers OFF
Description
ST-Link functions enabled for on board programming (default)
ST-Link functions enabled for external application through CN2 connector (SWIM supported).
Doc ID 17693 Rev 1 11/29
Hardware and layout
3.2.1
UM0970
Using the ST-Link to program/debug the STM8L on board
To program the STM8L on board, simply plug in the two jumpers on CN3, as shown in
in red, but do not use the CN2 connector as that could disturb communication with
the STM8L152C6T6 of the STM8L-DISCOVERY.
Figure 8.
STM8L-DISCOVERY connections image
Jumpers on CN3
3.2.2 Using the ST-Link to program/debug an external STM8L application
It is very easy to use the ST-Link to program the STM8L on an external application. Simply remove the 2 jumpers from CN3 as shown in
, and connect your application to the
CN2 debug connector according to
.
Table 3.
Debug connector CN2 (SWIM)
Pin CN2
1
2
3
4
VDD_TARGET
SWIM
GND
SWIM_RST
Designation
VDD from application
SWIM data input/output
Ground
SWIM reset
12/29 Doc ID 17693 Rev 1
UM0970
Figure 9.
ST-Link connections image
Hardware and layout
No jumpers on CN3
3.3 Power supply and power selection
The power supply is provided either by the host PC through the USB cable, or by external power supply (5 V or 3.3 V). The D1 and D2 protection diodes allow the 5V and 3V3 pins to
be used independently as input or output power supplies (see
). The 5V and 3V3 pins can be used as an output power supply for use by an application board connected on pin headers (P1 to P3). In such a case, the 3V3 pin provides only a 3V power supply and the power consumption must be lower than 100 mA. The 5V and 3V3 pins can also be used as an input power supply for the board when the USB connector is not connected to the PC.
3.4 LEDs
●
●
●
●
LD1 COM: Red LED indicates communication in progress between PC and ST-Link.
LD2 PWR: Red LED indicates that the board is powered.
LD3 PE7: Green LED is a user LED connected to the I/O PE7 of the STM8L152C6T6.
LD4 PC7: Blue LED is a user LED connected to the I/O PC7 of the STM8L152C6T6.
●
●
B1 RST: Push button is used to RESET the STM8L152C6T6.
B2 USER: User push button connected to the I/O PC1 of the STM8L152C6T6.
Doc ID 17693 Rev 1 13/29
Hardware and layout UM0970
3.6
Note:
Built-in IDD measurement circuit
The STM8L-DISCOVERY built-in I
DD
measurement circuit allows the consumption of the
STM8L152C6T6 to be measured and displayed on the LCD Glass while the MCU is in Run or Low power saving modes.
●
●
JP1 in ON position: STM8L152C6T6 is powered through I
DD
measurement circuit
(default).
JP1 in OFF position: STM8L152C6T6 is powered directly by +3V3, I
DD
measurement circuit is bypassed.
When jumper JP1 is removed the current consumption of the STM8L152C6T6 can be measured by connecting an ammeter between jumper JP1 pin 1 and pin 2.
For I
DD
measurement by the MCU itself, the circuit below is implemented on the STM8L-
DISCOVERY. Solder bridges SB11, SB12 and SB14 must be closed and a jumper must be plugged between JP1 pin 2 and pin 3.
Figure 10.
STM8L-DISCOVERY I
DD
measurement circuit
IDD
VDD_MCU
off on
+3V3
R20
2(1%)
JP1
S
5
4
R21
2K(1%)
1 2 6
D
G
T1
STT5PF20V +3V3
U4
MAX9938FEUK+
3 1
4
3
U6
I/O
C
GND
O/I
VCC
74H1G66STR
5 3
U7
74LX1G04CTR
2
5
+3V3
R18
10K
C11
1uF
+3V3
7
8
5
6
3
4
1
2
U3
Q12
Q13
Q14
Q6
Q5
Q7
Q4
GND
VCC
Q10
Q8
Q9
CLR
CI
CO
CO
M74HC4060TTR
16
15
14
13
12
11
10
9
C13
1nF
R17
0
T2
4
3
D 1
5
2
6
STT5PF20V
C12
100nF
+3V3
+3V3
R26
10K
R22
15K
R23
30K
Oscillator frequency 30KHz
SB11
R19
47K
SB12
SB14
PF0
IDD_Measurement
PE6
IDD_WAKEUP
PC4
IDD_CNT_EN
3.6.2
In Run mode, I
DD
current is measured using the operational amplifier MAX9938FEUK+ (U4) connected to the 2
Ω
shunt resistor (R20). In this case IDD_CNT_EN remains high during measurement, so R21 remains in short-circuit during the measurement because of transitor
T1 which remains ON permanently. The jumper JP1 must be connected between pins 2 and
3 of JP1.
Low power mode
In Low power modes (Halt or Active halt), the operational amplifier MAX9938FEUK+ (U4) is connected to the 2K
Ω
shunt resistor (R21), controlled by the analogue switch STT5PF20V
(T1). In this case the counter 74HC4060 (U3) enabled by IDD_CNT_EN manages the measurement timing according to
.
14/29 Doc ID 17693 Rev 1
UM0970 Hardware and layout
3.6.3 Low power mode I
DD
measurement principle
The principle used to measure a current when the STM8L152C6T6 is in Low power mode is:
1.
Configure ADC to measure voltage on the IDD_Measurement pin.
2. Configure PE6 to serve as wakeup pin.
3. Enter Low power mode after setting IDD_CNT_EN (PC4) signal low.
4. IDD_WAKEUP rising edge wakes up the MCU after around 300 ms.
5. Start ADC conversion as soon as possible after wakeup in order to measure the voltage corresponding to Low power mode on capacitor C11.
6. Reset the counter by programming IDD_CNT_EN high (in less than 70 ms after the wakeup) to avoid the R21 2 K
Ω
resistor being connected later in Run mode.
The measurement timing is given in
Ω
resistor is connected when T1 goes off after entering Low power mode. Q13 output of the counter allows connection of the 2 K
Ω resistor when the current I
DD
becomes very low.
shows how the counter and T1 ensure that, 150 ms after IDD_CNT_EN falling edge, the shunt resistor R21 is connected between VDD_MCU and the power supply in order to reduce the measurement range to 30 uA full scale. Then after another 150 ms for current stabilization, R21 is shorted, the IDD measurement is stored in C11, and the MCU is woken up. After wakeup the MCU can measure the IDD current corresponding to the Low power mode stored in C11.
Figure 11.
STM8L-DISCOVERY I
DD
Low power mode measurement timing diagram
The Low power mode measurement procedure can be used in Halt or Active halt mode if the
I
DD
current does not exceed 30 uA, otherwise the I
DD measurement procedure in Run mode should be used up to 30 mA.
Doc ID 17693 Rev 1 15/29
Hardware and layout UM0970
In Low power mode the bias current of operational amplifier input (U4 pin 4) is not negligible compared to I
DD
current (typical Ibias is ~240 nA). To obtain a reliable STM8L152 I
DD measurement it is mandatory to subtract the bias current from the I
DD
low power measurement since this current is not sinked by the MCU. Ibias is measured during production test and stored in the MCU EPROM. The demonstration software, Discover, uses this value to display the correct I
DD
. The Ibias measurement procedure is part of the demonstration software and can be launched if required.
The procedure for Ibias measurement (implemented in the Demo) is:
1.
Power off the board (disconnect the USB cable).
2. Set jumper JP1 to OFF position (pins 1 and 2).
3. Push down B2 (USER button), power on the board from the USB.
4. Wait at least 1 second before releasing B2, the LCD displays the Ibias measurement.
5. Power off the board (disconnect the USB cable).
6. Set jumper JP1 to ON position (pins 2 and 3). The Ibias value is now stored. The bias current is then subtracted from the I
DD
measurement performed in Low power mode.
Table 4.
Bridge
Solder bridge
State
(1)
SB1,2
(X2 crystal)
Off
On
Description
PA2, PA3 are disconnected from P1
X2, C19, C20 and R24 provide a clock as shown in schematics
PA2, PA3 are connected to P1 (X2, C19, C20, R24 must not be fitted)
SB3,5,7,9
(DEFAULT)
SB4,6,8,10
(PRG-32)
On
Off
Reserved, do not modify
Reserved, do not modify
Off
SB11,12,14
(IDD_Measurement)
On
SB13,15
(X3 crystal)
SB16
(B1-RESET)
SB17
(B2-USER)
Off
On
Off
On
Off
On
1.
Default state is in
bold
type.
PFO, PE6, PC4 are available and IDD module cannot be used
JP1 must be set to OFF
PFO, PE6, PC4 are used by IDD module
JP1 must be set to ON
PC5, PC6 are only connected to P2 (but do not remove X3, C21, C23, R27)
PC5, PC6 are connected to P2. X3, C21, C23 and R27 provide 32 KHz clock
PA1/RESET signal is only connected to P1
PA1/RESET signal is used by ST_LINK as SWIM_RST and also connected to P1
PC1 is only connected to P2
PC1 is connected to P2 and push button B2 for user
16/29 Doc ID 17693 Rev 1
UM0970
3.8
Note:
Note:
Hardware and layout
LCD (24 segments, 4 commons)
This LCD allows the STM8L152C6T6 to display any information on six 14-segment digits
and 4 BARs, using all COMs. (See the LCD segment mapping in
and pin connections in
This LCD also supports six 8-segment digits by only using COM0 and COM1.
This configuration allows COM2 and COM3 to be used as I/O ports. In this case the 2 LCD pins must not be plugged into the LCD socket. To proceed with this configuration, remove the LCD carefully, slightly open the COM2 and COM3 pins (pin 13 and pin 14) of the LCD, then replug it in the socket.
Characteristics overview:
●
●
●
●
●
24 segments and 4 commons
Drive method: multiplexed 1/4 duty, 1/3 bias
Operating voltage: 3 V
Operating temperature: 0 to 50°C
Connector: 28-pin DIL 2.54 mm pitch
When the LCD is plugged, all I/O ports listed in
are unavailable. To use one of these as I/O, you must remove the LCD.
Figure 12.
LCD segment mapping
Doc ID 17693 Rev 1 17/29
Hardware and layout
Table 5.
LCD connections
STM8L152C6T6
Pin name
PA7_LCDSEG0
PE0_LCDSEG1
PE1_LCDSEG2
PE2_LCDSEG3
PE3_LCDSEG4
PE4_LCDSEG5
PE5_LCDSEG6
PD0_LCDSEG7
PD2_LCDSEG8
PD3_LCDSEG9
PB0_LCDSEG10
PB1_LCDSEG11
PD1_LCDCOM3
PA6_LCDCOM2
PA5_LCDCOM1
PA4_LCDCOM0
PB2_LCDSEG12
PB3_LCDSEG13
PB4_LCDSEG14
PB5_LCDSEG15
PB6_LCDSEG16
PB7_LCDSEG17
PD4_LCDSEG18
PD5_LCDSEG19
PD6_LCDSEG20
PD7_LCDSEG21
PC2_LCDSEG22
PC3_LCDSEG23
Pin
24
25
26
27
28
21
22
23
15
16
17
18
19
20
9
10
11
12
13
14
7
8
5
6
3
4
1
2
COM3
5N
BAR2
6N
BAR0
COM3
3N
3DP
4N
4DP
1N
1DP
2N
2DP
6J
6H
5J
5H
4J
4H
3J
3H
2J
2H
1J
1H
6K
6Q
5K
5Q
4K
4Q
3K
3Q
2K
2Q
1K
1Q
LCD
COM2
1P
1COLON
2P
2COLON
3P
3COLON
4P
4COLON
5P
BAR3
6P
BAR1
COM2
COM1
3D
3C
4D
4C
1D
1C
2D
2C
5D
5C
6D
6C
COM1
6A
6F
5A
5F
4A
4F
3A
3F
2A
2F
1A
1F
UM0970
3G
2B
2G
1B
1G
4B
4G
3B
COM0
6B
6G
5B
5G
COM0
3E
3M
4E
4M
1E
1M
2E
2M
5E
5M
6E
6M
18/29 Doc ID 17693 Rev 1
Extension connection UM0970
19/29
Male headers P1, P2 and P3 can connect the STM8L-DISCOVERY to a standard prototyping/wrapping board. All GPI/Os of STM8L152C6T6 are available on it.
P1, P2 and P3 can also be probed by an oscilloscope, logical analyzer or voltmeter.
Table 6.
P1 pinout
Pin number
(P1)
Pin number
(STM8L)
Board pin name
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
9/40
2
3
4
5
6
7
8
14
15
16
17
18
+3V3
PA0
GND
PA1
PA2
PA3
PA4
PA5
PA6
PA7
PE0
PE1
PE2
PE3
PE4
Main function
Alternate function LCD (U5)
3.3 V board power supplied or supply external application when
USB connected
PA0/[USART1_CK](3)/
SWIM/BEEP/
IR_TIM (7)
Ground
I/O Reset NRST/PA1(1)
PA2/OSC_IN/
[USART1_TX](3)/
[SPI1_MISO] (3)
PA3/OSC_OUT/
[USART1 _RX](3)/
[SPI1_MOSI](3)
PA4/TIM2_BKIN/
LCD_COM0(2)/
ADC1_IN2/
COMP1_INP
PA5/TIM3_BKIN/
LCD_COM1(2)/
ADC1_IN1/
COMP1_INP
PA6/[ADC1_TRIG](3)/
LCD_COM2(2)/
ADC1_IN0/
COMP1_INP
PA7/
LCD_SEG0(2)(4)
PE0(4)/
LCD_SEG1(2)
PE1/TIM1_CH2N /
LCD_SEG2(2)
PE2/TIM1_CH3N /
LCD_SEG3(2)
LCD_COM0
LCD_COM1
LCD_COM2
LCD_SEG0
LCD_SEG1
LCD_SEG2
LCD_SEG3
LCD_SEG4
LCD_SEG5
Doc ID 17693 Rev 1
UM0970 Extension connection
Table 6.
16
17
18
1
2
3
4
5
P1 pinout (continued)
Pin number
(P1)
Pin number
(STM8L)
Board pin name
19 PE5
20 PD0
21 PD1
+5V
9/40
48
47
NC
GND
PE7
46 PC7
45 PC6
44 PC5
43 PC4
Main function
Alternate function
PE5/LCD_SEG6(2)/
ADC1_IN23/
COMP2_INP/
COMP1_INP
PD0/TIM3_CH2/
[ADC1_TRIG](3)/
LCD_SEG7(2)/
ADC1_IN2 2/
COMP2_INP/
COMP1_INP
PD1/TIM3_TRIG/
LCD_COM3(2)/
ADC1_IN21/
COMP2_INP/
COMP1_INP
Ground
LCD (U5)
LCD_SEG6
LCD_SEG7
LCD_COM3
19 9/40 GND
Table 7.
P2 pinout
Pin number
(P2)
Pin number
(STM8L)
Pin name
6
7
8
9
Main function
Alternate function
5 Volts board power supplied or supply external application when
USB connected
LCD (U5)
Ground
I/O
PE6/LCD_SEG26(2)/
E6
PVD_IN
Port C6
PC7/LCD_SEG25(2)/
ADC1_IN3/
COMP2_INM/
COMP1_INP
PC6/OSC32_OUT/
[SPI1_SCK](3)/
[USART1_RX](3)
PC5/OSC32_IN /
[SPI1_NSS](3)/
[USART1_TX](3)
PC4/[USART1_CK](3)/
I2C1_SMB/CCO/
LCD_SEG24(2)/
ADC1_IN4/COMP2_INM/
COMP1_INP
Doc ID 17693 Rev 1 20/29
UM0970 Extension connection
Table 7.
P2 pinout (continued)
Pin number
(P2)
Pin number
(STM8L)
Pin name
10
11
12
13
42 PC3
41 PC2
38
37
PC1
PC0
Main function
Alternate function LCD (U5)
PC3/[USART1_TX](3)/
LCD_SEG23(2)/
ADC1_IN5/
COMP1_INP/
COMP2_INM
PC2/[USART1_RX](3)/
LCD_SEG22/
ADC1_IN6/
COMP1_INP/
VREF_OUT
LCD_SEG23
LCD_SEG22
14
15
16
17
18
19
36 PD7
35 PD6
34 PD5
33 PD4
32
9/40
PF0
GND
I/O Port D7
PD7/TIM1_CH1N /
LCD_SEG21(2)/
ADC1_IN7/
RTC_ALARM/
VREF_OUT/
COMP1_INP
PD6/TIM1_BKIN /
LCD_SEG20(2)/
ADC1_IN8/
RTC_CALIB/
VREF_OUT/
COMP1_INP
PD5/TIM1_CH3 /
LCD_SEG19(2)/
ADC1_IN9/
COMP1_INP
PD4/TIM1_CH2 /
LCD_SEG18(2)/
ADC1_IN10/
COMP1_INP
PF0/ADC1_IN24/
DAC_OUT
Ground
LCD_SEG21
LCD_SEG20
LCD_SEG19
LCD_SEG18
Doc ID 17693 Rev 1 21/29
Extension connection UM0970
Table 8.
P3 pinout
Pin number
(P3)
Pin number
(STM8L)
1
2
3
4
5
6
7
8
9
10
22
23
24
25
26
27
28
29
30
31
Pin name
PD2
PD3
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB7
Main function
Alternate function
I/O Port D2
I/O Port D3
I/O Port B0
I/O Port B1
I/O Port B2
I/O Port B3
I/O Port B4
I/O Port B5
I/O Port B6
I/O Port B7
PD2/TIM1_CH1 /
LCD_SEG8(2)/
ADC1_IN20/
COMP1_INP
PD3/ TIM1_TRIG/
LCD_SEG9(2)/
ADC1_IN1 9/
COMP1_INP
PB0/TIM2_CH1/
LCD_SEG10(2)/
ADC1_IN18/
COMP1_INP
PB1/TIM3_CH1/
LCD_SEG11(2)/
ADC1_IN17/
COMP1_INP
PB2/ TIM2_CH2/
LCD_SEG12(2)/
ADC1_IN16/
COMP1_INP
PB3/TIM2_TRIG/
LCD_SEG13(2)/
ADC1_IN15/
COMP1_INP
PB4/[SPI1_NSS](3)/
LCD_SEG14(2)/
ADC1_IN14/
COMP1_INP
PB5/[SPI1_SCK](3)/
LCD_SEG15(2)/
ADC1_IN13/
COMP1_INP
PB6/[SPI1_MOSI](3)/
LCD_SEG16(2)/
ADC1_IN12/
COMP1_INP
PB7/[SPI1_MISO](3)/
LCD_SEG17(2)/
ADC1_IN11/
COMP1_INP
LCD (U5)
LCD_SEG8
LCD_SEG9
LCD_SEG10
LCD_SEG11
LCD_SEG12
LCD_SEG13
LCD_SEG14
LCD_SEG15
LCD_SEG16
LCD_SEG17
22/29 Doc ID 17693 Rev 1
Figure 13.
STM8L-DISCOVERY
P1
10
11
12
8
9
6
7
3
4
5
1
2
13
14
15
16
17
18
19
Header 19
EXT_3V3
PA0
PA7
PE0
PE1
PE2
PE3
PE4
PE5
PD0
PD1
PA1
PA2
PA3
PA4
PA5
PA6
RST
IDD_CNT_EN
IDD_Measurement
IDD_WAKEUP
IDD_measurement.SchDoc
U_Power
ST_LINK.SCHDOC
U_ST_LINK
IDD_CNT_EN
IDD_Measurement
IDD_WAKEUP
RESET#
ST_LINK_SWIM
EXT_5V
EXT_3V3
RESET#
ST_LINK_SWIM
EXT_5V
EXT_3V3
PA[0..7]
PB[0..7]
PC[0..7]
PD[0..7]
PE[0..7]
PF0
RESET#
ST_LINK_SWIM
IDD_CNT_EN
IDD_Measurement
IDD_WAKEUP
MCU.SchDoc
U_MCU
PA[0..7]
PB[0..7]
PC[0..7]
PD[0..7]
PE[0..7]
PF0
RESET#
ST_LINK_SWIM
IDD_CNT_EN
IDD_Measurement
IDD_WAKEUP
PC3_LCDSEG23
PC2_LCDSEG22
PD7_LCDSEG21
PD6_LCDSEG20
PD5_LCDSEG19
PD4_LCDSEG18
PB7_LCDSEG17
PB6_LCDSEG16
PB5_LCDSEG15
PB4_LCDSEG14
PB3_LCDSEG13
PB2_LCDSEG12
PB1_LCDSEG11
PB0_LCDSEG10
PD3_LCDSEG9
PD2_LCDSEG8
PD0_LCDSEG7
PE5_LCDSEG6
PE4_LCDSEG5
PE3_LCDSEG4
PE2_LCDSEG3
PE1_LCDSEG2
PE0_LCDSEG1
PA7_LCDSEG0
PD1_LCDCOM3
PA6_LCDCOM2
PA5_LCDCOM1
PA4_LCDCOM0
GH08172_buttons.SchDoc
U_Power
PC3_LCDSEG23
PC2_LCDSEG22
PD7_LCDSEG21
PD6_LCDSEG20
PD5_LCDSEG19
PD4_LCDSEG18
PB7_LCDSEG17
PB6_LCDSEG16
PB5_LCDSEG15
PB4_LCDSEG14
PB3_LCDSEG13
PB2_LCDSEG12
PB1_LCDSEG11
PB0_LCDSEG10
PD3_LCDSEG9
PD2_LCDSEG8
PD0_LCDSEG7
PE5_LCDSEG6
PE4_LCDSEG5
PE3_LCDSEG4
PE2_LCDSEG3
PE1_LCDSEG2
PE0_LCDSEG1
PA7_LCDSEG0
PD1_LCDCOM3
PA6_LCDCOM2
PA5_LCDCOM1
PA4_LCDCOM0
P3
8
9
10
6
7
4
5
1
2
3
Header 10
PD2
PD3
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB7
EXT_5V
PE7
PE6
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PD7
PD6
PD5
PD4
PF0
P2
15
16
17
18
19
11
12
13
14
6
7
4
5
1
2
3
8
9
10
Header 19
STMicroelectronics
Title:
STM8L-DISCOVERY
Number:
MB913
Rev:
B.2(PCB.SCH)
Date:
7/15/2010
Sheet
1
of
5
Figure 14.
LCD
PD5_LCDSEG19
PD6_LCDSEG20
PD7_LCDSEG21
PC2_LCDSEG22
PC3_LCDSEG23
PB7_LCDSEG17
PD4_LCDSEG18
LCD
PB6_LCDSEG16
PB5_LCDSEG15
PB4_LCDSEG14
PB3_LCDSEG13
PB2_LCDSEG12
PA4_LCDCOM0
PA5_LCDCOM1
U5
GH08172T
PA7_LCDSEG0
PE0_LCDSEG1
PE1_LCDSEG2
PE2_LCDSEG3
PE3_LCDSEG4
PE4_LCDSEG5
PE5_LCDSEG6
PA6_LCDCOM2
PD1_LCDCOM3
PB1_LCDSEG11
PB0_LCDSEG10
PD3_LCDSEG9
PD2_LCDSEG8
PD0_LCDSEG7
STMicroelectronics
Title:
STM8L-DISCOVERY LCD
Number:
MB915
Rev:
B.2(SCH.PCB)
Date:
7/15/2010
Sheet
2
of
5
Figure 15.
I
DD
measurement
IDD
VDD_MCU
off on
+3V3
R20
2(1%)
JP1
S
R21
2K(1%)
5
4
G
D
T1
STT5PF20V +3V3
U4
MAX9938FEUK+
3 1
4
3
U6
I/O
C
GND
O/I
VCC
74H1G66STR
2
5
5 3
U7
74LX1G04CTR
+3V3
R18
10K
C11
1uF
+3V3
6
7
4
5
8
1
2
3
U3
Q12
Q13
Q14
Q6
Q5
Q7
Q4
GND
VCC
Q10
Q8
Q9
CLR
CI
CO
CO
M74HC4060TTR
12
11
10
9
16
15
14
13
C13
1nF
R17
0
T2
4
+3V3
3 5
1
2
6
STT5PF20V
C12
100nF
+3V3
R26
10K
R22
15K
R23
30K
SB11
R19
47K
SB12
SB14
Oscillator frequency 30KHz
PF0
IDD_Measurement
PE6
IDD_WAKEUP
PC4
IDD_CNT_EN
STMicroelectronics
Title:
STM8L-DISCOVERY IDD_Measurement
Number:
MB915
Rev:
B.2(SCH.PCB)
Date:
7/15/2010
Sheet
3
Figure 16.
STM8L MCU
ST_LINK_SWIM
PE7
R28
330
PC7
R29
660
LD3 green
LD4 blue
RESET#
RESET
RESET#
SB16
Must be close to the Crystal and ON
B1
RESET (Black)
C24
100nF
C20
Not Fitted
20pF
C19
20pF
X2
16MHz
R24
60
PA[0..7]
PB[0..7]
PC[0..7]
PD[0..7]
PE[0..7]
PF0
PA[0..7]
PB[0..7]
PC[0..7]
PD[0..7]
PE[0..7]
PF0
Not Fitted
PA2
SB2
PA3
SB1
VDD_MCU
R25
0
C22
1uF
PA4_LCDCOM0
PA5_LCDCOM1
PA6_LCDCOM2
PA7_LCDSEG0
PE0_LCDSEG1
PE1_LCDSEG2
PE2_LCDSEG3
PE3_LCDSEG4
PE4_LCDSEG5
PE5_LCDSEG6
PD0_LCDSEG7
PD1_LCDCOM3
PD2_LCDSEG8
PD3_LCDSEG9
PB0_LCDSEG10
VDD_MCU
VDDA
PA0
PA1
PA4
PA5
PA6
PA7
13
14
15
16
9
10
11
12
17
18
19
20
21
22
23
24
7
8
5
6
1
2
3
4
PE0
PE1
PE2
PE3
PE4
PE5
PD0
PD1
PD2
PD3
PB0
U8
PE2
PE3
PE4
PE5
PD0
PD1
PD2
PD3
PB0
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
AVSS
VDD
VDDA
VREF+
VLCD
PE0
PE1
STM8L152C6T6
C18
1uF
VDD_MCU
C17
100nF
C16
100nF
L1
BEAD
C14
1uF
IDD_WAKEUP
C21
6.8pF
X3
1
2
4
3
C23
6.8pF
R27
MC306-G-06Q-32.768 (manufacturer JFVNY)
0
Must be close to the Crystal and ON
PE7
PE6
PC7
PC6
PC5
PC4
PC3
PC2
VSSIO
VDDIO
PC1
PC0
PD7
PD6
PD5
PD4
PF0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
38
37
36
35
34
33
32
31
30
29
28
27
26
25
48
47
46
45
44
43
42
41
40
39
PE7
PE6
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PD7
PD6
PD5
PD4
PF0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
SB13
IDD_CNT_EN
PC3_LCDSEG23
PC2_LCDSEG22
VDD_MCU
PD7_LCDSEG21
PD6_LCDSEG20
PD5_LCDSEG19
PD4_LCDSEG18
PB7_LCDSEG17
PB6_LCDSEG16
PB5_LCDSEG15
PB4_LCDSEG14
PB3_LCDSEG13
PB2_LCDSEG12
PB1_LCDSEG11
SB15
SB17
IDD_Measurement
User_PB
B2
USER (Blue)
+3V3
User Button
R30
4K7
C25
100nF
SWIM
VDDA
C15
100nF
STMicroelectronics
Title:
STM8L-DISCOVERY MCU
Number:
MB915
Rev:
B.2(PCB.SCH)
Date:
7/15/2010
LED
Sheet
4
of
5
Figure 17.
ST-Link (SWIM only)
R9
100K
+3V3
C9
20pF 1
X1
2
8MHz
+3V3
+3V3
R14
100K
C8
20pF
+3V3
SWIM_PULLUP_CTL
OSC_IN
OSC_OUT
STM_RST
C10
AIN_1
M25_CS
U2_TX
10
11
12
8
9
4
5
6
7
1
2
3
VBAT
PC13
PC14
PC15
OSC_IN
OSC_OUT
/RST
VSSA
VDDA
PA0
PA1
U2_TX
R15
4K7
R16
4K7
U2
STM32F103C8T6
+3V3
VDD_2
VSS_2
JTMS
PA12
PA11
PA10
PA9
PA8
S2_MOSI
S2_MISO
S2_CK
PB12
36
35
34
33
32
31
30
29
28
27
26
25
STM_JTMS
USB_DP
USB_DM
U1_RX
U1_TX
ST_LINK_LED
T_JTMS
T_JTCK
+3V3
CN1
VCC
D-
D+
ID
GND
SHELL
5075BMR-05-SM
4
5
0
1
2
3
U5V
+3V3
R3
1K5
R2
100K
R5
22
USB
R4
USB_DM
USB_DP
22
EXT_5V
U5V
D2
BAT60JFILM
+5V
+3V3
C5
100nF
C6
100nF
C7
100nF
C4
100nF
ST_LINK_SWIM
RESET#
SWIM_IN
R12
220
SWIM_RST_IN
R7
220
+3V3
SWIM
SWIM_RST
R10
680
R13
47
R6
47
SWIM
CN2
1
2
3
4
SB4
SB6
SB8
SB10
SB3
SB5
SB7
SB9
STM_JTCK
STM_JTMS
+3V3
SWCLK
SWDIO
R11
10K
DISCOVERY
ST-LINK
CN3
Jumpers ON --> DISCOVERY Selected
Jumpers OFF --> ST-LINK Selected
Wired on Solder Side
JP3
JP2
ST_LINK_LED
R8
510
+5V
3
U1
Vin
LD1117S33TR
Vout
2
C3
10uF
C1
10uF
C2
100nF
D1
BAT60JFILM
+3V3
COM
LD1
RED
R1
1K
PWR
LD2
RED
EXT_3V3
STMicroelectronics
Title:
STM8L-DISCOVERY ST-LINK (SWIM only)
Number:
MB915
Rev:
B.2(PCB.SCH)
Date:
7/15/2010
Sheet
5
of
5
Revision history
Table 9.
Date
Document revision history
Revision
24-Sep-2010
1
Initial release.
Changes
UM0970
28/29 Doc ID 17693 Rev 1
UM0970
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, selection 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 AN AUTHORIZED ST REPRESENTATIVE, 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 provisions 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.
© 2010 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
Doc ID 17693 Rev 1 29/29
Pobierz
Reklama