STMicroelectronics UM0817 Technical data

UM0817
User Manual
STM8S-DISCOVERY
evaluation board
Introduction
STM8S-DISCOVERY is a quick start evaluation board which helps you to discover the STM8 features , and to develop and share your own appl ication. It is based on an STM8S105C6T6 and includes an embedded debugger, ST-LINK, and a touch sensing button. Numerous applications are available.
Features
STM8S105C microcontroller
Powered by USB cable between PC and STM8S-DISCOVERY
Selectable power of 5 V or 3.3 V
Embedded ST-Link for STM8S
USB interface for programming and debugging
SWIM debug support
Touch Sensing button, TS1
User LED, LD1
Extension header for all I/Os
Wrapping area for users own application

Figure 1. STM8S-DISCOVERY evaluation board

October 2009 Doc ID 16361 Rev 1 1/17
www.st.com
Contents UM0817
Contents
1 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Hardware and la yout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 STM8S105C6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 ST-Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Using the ST-Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 Using the ST-Link on other applications . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Single touch sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Daughter board connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2/17 Doc ID 16361 Rev 1
UM0817 Quick start

1 Quick start

It is very simple to get started using the STM8S-DISCOVERY evaluation board, just follow these four steps:
1. Connect the STM8S-DISCOVERY board to a PC with a USB cable.
2. Press the TS1 button, Observe LED LD1 blinking.
3. Press the TS1 button to change b linking speed.
4. Connect to www.st.com/stm8s-discovery and follow the tutorial. The STM8S-DISCOVERY evaluation board helps yo u to develop and share your own
application. You can discover more of the STM8S features by downloading and executing the proposed programs in the project list.
Doc ID 16361 Rev 1 3/17
Hardware and layout UM0817

2 Hardware and layout

The STM8S-DISCOVERY evaluation board is designed around the STM8S105C6 microcontroller in an LQFP48 package. It has two distinct sections that may be separated, the STM8S105C6 module and the ST-Link module.
Figure 2 illustrates the connections between the STM8S105C6 and its peripherals (ST-
LINK, touch-sensing button, LED and connectors).
Figure 3 helps you to locate these features on the STM8S-DISCOVERY board, as well as
the potential point of separat ion (f or more details ref er to Section 2.2.2: Using the ST-Link on
other applications).

Figure 2. Hardware block diagram

4/17 Doc ID 16361 Rev 1
UM0817 Hardware and layout

Figure 3. Top layout

USB connector ST-Link JTAG USB data transfer LED
ST-LINK core
ST-LINK module
SWIM connector
STM8S105C6 module
LED (LD1)
Possible separation point
Power supply jumper
External Osc. (16 MHz) STM8S105C6
Touch sensing button (TS1)
Wrapping area
SO16 footprint
Doc ID 16361 Rev 1 5/17
Hardware and layout UM0817

2.1 STM8S105C6 microcontroller

Figure 4. STM8S105C6 package

The STM8S105C6 8-bit microcontroller offers:
32 Kbytes of Flash program memory, and 1 Kbyte true data EEPROM.
This device provides the following benefits:
Reduced system cost
Integrated true data EEPROM for up to 300 K write/erase cycles – High system integration le vel; internal clock oscillators, brown- out reset, watchdog.
Performance and robustness
1 6 MHz CPU clock frequency – Up to 38 I/Os on a 48-pin package including 16 high sink outputs – Robust I/O immune against current injection – Independent watchdogs with separate clock source – Flexible clock control, 4 master clocks (HSI, LSI, HSE and external HSE) – Clock security system – A family of products for applications with 2.95 V to 5.5 V operating supply
Short development cycles
Applications scalability across common family product architecture with
compatible pinout, memory map and modular peripher als. – Full documentation and a wide choice of development tools – S tandard S/W library for firmware development quick start – Numerous application notes and firmware examples available
Product longevity
Advanced core and peripherals made in state-of-the-art technology – Low power modes (wait, active-halt, halt) – Auto wake-up timer for active halt – Permanently active, low consumption
Other features
Nested interrupt controller with 32 interrupts – Up to 37 e xternal interrupts on 6 vectors – 2 x 16-bit general purpose timers; with 2+3 CAPCOM channels (IC, OC or PWM) – A dvanced control timer: 16-bit, 4 CAPCOM channels, 3 complementary outputs,
dead- time insertion and flexible synchronization – 8-bit basic timer with 8-bit prescaler – UART with clock output for synchronous operation, Smartcard, IrDA, LIN – SPI interface up to 8 Mbit/s – I2C interface up to 400 Kbit/s – Analog-to-digital con v erter 10-bit, ±1 LSB ADC with up to 10 multiple x ed channels
6/17 Doc ID 16361 Rev 1
UM0817 Hardware and layout

Figure 5. STM8S105C6 block diagram

For more information see the complete STM8S documentation.
Doc ID 16361 Rev 1 7/17
Hardware and layout UM0817

2.2 ST-Link

The ST-Link provides a USB interface for programming and debugging using a sin gle wire interface module (SWIM) . The ST-Link module of the STM8S-DISCO VER Y e v aluation b oard also supplies 5 V and 3.3 V to the STM8S105C6 module.

2.2.1 Using the ST-Link

Figure 6. Typical configuration
Hardware requirements:
- USB cable type A to B
- Computer with Windows 2000, XP or Vista OS
Software requirement: Programming tool chain supporting ST-Link SWIM
Note: The driver for ST-Link is installed automatically when the USB is connected.
For more information about ST-Link debugging and programming features refer to the software and debug documentation.
For information about the SWIM protocol, refer t o UM0470.

2.2.2 Using the ST-Link on other applications

You can connect your ST-Link to other applications in 2 ways.
By removing the solder bridges: This way uses the ST-Link withou t br eakin g th e PCB:
Unsolder the two solder bridges SB1 and SB2 under the SWIM connector. See
Figure 7. You can re-solder the two bridges at a later date thus keeping the STM8S-
DISCOVERY usable.
By removing it from your board: This way constitutes a good alternative to programming
the STM8 devices in other applications. See Figure 8.
Figure 7. ST-Link alternative
Remove SB1 and SB2 solder bridges
8/17 Doc ID 16361 Rev 1
UM0817 Hardware and layout
Figure 8. Separated ST-Link module
STM8S105C6 eval board
STLink
SWI M
Warning: By removing this module you will lose power supply on the
STM8S105C6 evaluation board. In consequence, you will not be able to program and use the STM8 S105C6 evaluation board without a SWIM cable and an external power supply.
To reconnect your STM8S105C6 use connector CNn see
Section 3: Daughter board connection.

2.3 Power supply and power selection

The power supply is provided by a USB connector. Jumper JP1 selects the VDD value (5 V or regulated 3.3 V) see Figure 9.

Figure 9. Power selection

VDD = 5 V
VDD = 3.3 V
Doc ID 16361 Rev 1 9/17
Hardware and layout UM0817

2.4 Single touch sensing

A touch sensing button TS1 is available on the STM8S-DISCOVERY evaluation board (see
Figure 10).

Figure 10. Touch sensing schematic

To disable the touch sensing interface and to use PC1, PC2 and PC3 as standard I/O, you need to unsolder the 2-1 connection and solder 2-3 connection on SB4 and SB3, you also need to unsolder the R2 resistor.
RC acquisition principle
The RC acquisition method detects a human touch on k ey to uch sensor (TS1) by measuring the small variation of the touch electrode capacitance (C2). Electrode capacitance C2 is periodically charged and discharged through a fixed resistor (R2).
The capacitance value depends o n the following parameters: electrode area (A), relative dielectric constant of the insulator (eR), the relative permittivity of air (e0) and the distance between the two electrodes.
For more information about touch sensing please refer to AN2927.
10/17 Doc ID 16361 Rev 1
UM0817 Daughter board connection

3 Daughter board connection

Four 12-pin male headers CN1, CN2, CN3 and CN4 are connected to the STM8S105C6 microcontroller. See the following tables for pin assignments.

Table 1. CN1 pinout

Pin number
(Cn1)
1 1 NRST IO Reset 2 2 OSCIN/PA1 IO Port A1 3 3 OSCOUT/PA2 IO Port A2 4 4 Vssio_1 S I/O ground 5 5 Vss S Digital ground 6 6 VCAP S 1.8V regulator capacito r 7 7 Vdd S Digital power supply 8 8 Vddio_1 S I/O power supply
99PA3IOPort A3 10 10 PA4 IO Port A4 11 11 PA5 IO Port A5 12 12 PA6 IO Port A6
Pin number
(chip)
Pin name
Main function Alternate function
Type

Table 2. CN2 pinout

Pin number
(Cn2)
1 25 PE5 IO Port E5 SPI master / slave
2 26 PC1/TS1 IO Port C1
Pin number
(chip)
Pin name
Main function Alternate function
Type
Timer 1 - channel 1 / UART2
synchronous clock 3 27 PC2/TS1_load IO Port C2 Timer 1 - channel2 4 28 PC3 IO Port C3 Timer 1 - channel 3 5 29 PC4 IO Port C4 Timer 1 - channel 4 6 30 PC5 IO Port C5 SPI clock 7 31 Vssio_2 S I/O ground 8 32 Vddio_2 S I/O power supply 9 33 PC6 IO Port C6 SPI master out / slave in
10 34 PC7 IO Port C7 SPI master in / slave out 11 35 PG0 IO Port G0 12 36 PG1 IO Port G1
Doc ID 16361 Rev 1 11/17
Daughter board connection UM0817

Table 3. CN3 pinout

Pin number
(Cn3)
Pin number
(chip)
Pin name
Main function Alternate function
Type
1 13 Vdda S Analog power supply 2 14 Vssa S Analog ground 3 15 PB7 IO Port B7 Analog input 7 4 16 PB6 IO Port B6 Analog input 6 5 17 PB5 IO Port B5 Analog input 5 6 18 PB4 IO Port B4 Analog input 4 7 19 PB3 IO Port B3 Analog input 3 8 20 PB2 IO Port B2 Analog input 2 9 21 PB1 IO Port B1 Analog input 1
10 22 PB0 IO Port B0 Analog input 0 11 23 PE7 IO Port E7 Analog input 8 12 24 PE6 IO Port E6 Analog input 9(2)
*

Table 4. CN4 pinout

Pin number
(Cn4)
Pin number
(chip)
Pin name
Main function Alternate function
Type
1 37 PE3 IO Port E3 Timer 1 – break Input 2 38 PE2 IO Port E2 I2C data 3 39 PE1 IO Port E1 I2C clock 4 40 PE0 IO Port E0 Configurable clock output 5 41 PD0/LED IO Port D0 Timer 3 - channel 2 6 42 PD1/SWIM IO Port D1 SWIM data interface 7 43 PD2 IO Port D2 Timer 3 - channel 1 8 44 PD3 IO Port D3 Timer 2 - channel 2 9 45 PD4 IO Port D4 Timer 2 - channel 1
10 46 PD5 IO Port D5 UART2 data transmit 11 47 PD6 IO Port D6 UART2 data receive 12 48 PD7 IO Port D7 Top level interrupt
12/17 Doc ID 16361 Rev 1

4 Electrical schematics

Figure 11. STM8S-DISCOVERY

UM0817 Electrical schematics
Doc ID 16361 Rev 1 13/17
U_ST_LINK ST_LINK.SCHDOC
RESET#
ST_LINK_SWIM
SB1 SB2
U_MCU MCU.SchDoc
RESET# ST_LINK_SWIM
STMicroelectronics
Title:
STM8S-Discovery
Number: Rev: Sheet of
MB867 1 3
A.1(PCB.SCH)
Date:
5/6/2009

Figure 12. STM8S-DISCOVERY MCU

or
1
UM0817 Electrical schematics
2
3
4
Doc ID 16361 Rev 1 14/17
20pF
C4
20pF
CN1
NRST PA1 PA2
PA3 PA4 PA5 PA6
VDD
SB4 solder bri dge
1
VDDA
12
LD1 Gree n
PD4
PB6
PD3
PB5
PD2
PB4
PD1
PB3
PD0
PB2
R1 510
PE0
PE1
PE2
PE3
40
PD041PD142PD243PD344PD445PD546PD647PD7
Vddio_2
Vssio_2
24
PB0
PB1
PE6
PE7
U1 STM8S105C6T6
PE337PE238PE139PE0
PG1 PG0 PC7 PC6
PC5 PC4 PC3 PC2 PC1 PE5
PG1
36
PG0
35
PC7
34
PC6
33 32 31 30 29 28 27 26 25
PC5 PC4 PC3 PC2 PC1 PE5
VDD
3
EX_PC1
2
1
SB3 solder bri dge
EX_PC3
2
3
ST_LINK_SWIM
VDD
R7
VDD
VDD
10K[N/A]
C1 10nF
R5 60
C5
680nF
L1 BEAD
NRST PA1 PA2
VCAP
PA3 PA4 PA5 PA6
C6 1uF
10 11 12
C7 100nF
1 2 3 4 5 6 7 8 9
RESET#
X1 16MHz
C3
PD5
PD6
PD7
48
NRST OSCIN/PA1 OSCOU T/PA2 Vssio_ 1 Vss VCAP Vdd Vddio_ 1 PA3 PA4 PA5 PA6
Vdda13Vssa14PB715PB616PB517PB418PB319PB220PB121PB022PE723PE6
VDDA
PB7
1 2 3 4 5 6 7 8 9 10 11 12
Header 6X2H
CN3
1 2 3 4 5 6 7 8 9 10 11 12
Header 6X2H
SB5
VCAP
PB6PB7 PB4PB5 PB2PB3 PB0PB1 PE6PE7
Down
R2 10K
R4 1M
VDDVDD
R6 10K
TS1 TS_PAD
CN2
PE5 EX_PC1 PC2 EX_PC3 PC4 PC5
PC6 PC7 PG0 PG1
PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7
<----ESD r esist or close to MCU pad
<----Touch Sens ing di ameter 8mm
C2
1nF
1 2 3 4 5 6 7 8 9 10 11 12
Header 6X2H
CN4
1 2 3 4 5 6 7 8 9 10 11 12
Header 6X2H
RightLeft
PE2PE3 PE0PE1
Top
Extension connect
<----Active s hiel d
VDD
1
JP1
+3V3
U5V
VDD
2
3
C8 100nFC9100nF
C10 100nF
STMicroelectronics
Title:
STM8S-Discovery MCU
MB867 2 3
1
2
3
Number: Rev: Sheet of
A.1(PCB.SCH)
Date:
8/24/2009
4

Figure 13. STM8S-DISCOVERY ST-Link (SWIM only)

1
2
3
4
Sh
R15 100K
UM0817 Electrical schematics
C15 20pF
1 2
C16
X2
20pF
8MHz
SWIM_PULLUP_CTL
R16
+3V3
Doc ID 16361 Rev 1 15/17
100K
STM_JRST STM_JTDI STM_JTMS STM_JTCK
CN5
C11 100nF
78 56 34
STM_JTDO
1
+3V3
JTAG
+3V3
R18 1K5
VCC
GND
U5V
1 2
D-
3
D+
4 0 0
R21 22 R22 22
CN6
SHELL SHELL
USB-ty peB connect or
+3V3
OSC_IN OSC_OUT STM_RST
AIN_1 M25_CS U2_TX
+3V3
USB_DM USB_DP
U5V
1 2 3 4 5 6 7 8
9 10 11 12
C18
4.7uF
SWIM_IN
+3V3
VBAT PC13 PC14 PC15 OSC_IN OSC_O UT /RST VSSA VDDA PA0 PA1 U2_TX
SWIM
47
48
46
PB845PB9
VSS_3
VDD_ 3
U2_RX13U2_CK14S1_CK15S1_MISO16S1_MOSI17PB018PB119PB2/BOOT120PB1021VSS_123VDD_ 1
U2_RX
U2_CK
T_JTCK
T_JTDO
U4 LD111 7-3V3
Vin3Vout
1
STM_JTCK
STM_JTDI
STM_JTDO
STM_JRST
SWIM_IN
SWIM_RST_ IN
SWIM_RST
40
44
43
PB541PB642PB7
BOOT0
JNRST
39
JTDO
38
37
JTDI
S2_MOSI S2_MISO
U2 STM32F103C8T6
JTCK
VDD_2
VSS_2
JTMS
PA12 PA11 PA10
PA9 PA8
S2_CK
PB12
36 35 34 33 32 31 30 29 28 27 26 25
+3V3
STM_JTMS USB_DP USB_DM U1_RX U1_TX ST_LINK_ LED
T_JTMS T_JTCK
SWIM_IN SWIM_RST_IN
R8 220 R9 220
SWIM SWIM_RST
VDD
R12 680
R13 47 R14 47
ST_LINK_SWIM RESET#
VDD
CN7
1 2 3 4
Header 4
PB11
24
22
T_JTDI
T_NRST
T_JRST
SWIM_IN
SWIM
+3V3
SWIM
MCU
ST_LINK_ LED
+3V3
2
C12 104P
C13 104P
C17 104P
C14 104P
C19
4.7uF
USB
R17 510
R19
VDD
4K7
STMicroelectronics
Title:
STM8S-Discovery ST_LINK (SWIM on ly)
Number: Rev:
MB867
LD2
RED
R20 4K7
AIN_1
A.1(PCB.SCH)
Date:
LED
6/25/2009
Revision history UM0817

5 Revision history

Table 5. Document revision history

Date Revision Changes
05-Oct-2009
1
Initial release.
16/17 Doc ID 16361 Rev 1
UM0817
I
e
r
y
t A P
o
l N
is
d
ts
o
h
t
U
D
W
D
W
S
O U
T
R
G
A
Y,
D
E
G
R
id
a
y
l
Please Read Carefully:
nformation in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve th ight to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at an ime, without notice.
ll ST products are sold pursuant to ST’s terms and conditions of sale. urchasers are solely respon sibl e fo r the c hoic e, sele cti on an d use o f the S T prod ucts and s ervi ces d escrib ed he rein , and ST as sumes n
iability whatsoever relati ng to the choice, selection or use of the ST products and services described herein.
o license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of th ocument refers to any third pa rty p ro duc ts or se rv ices it sh all n ot be deem ed a lice ns e gr ant by ST fo r t he use of su ch thi r d p arty produc r services, or any intellectua l property c ontained the rein or consi dered as a warr anty coverin g the use in any manner whats oever of suc
hird party products or servi ces or any intellectual property contained therein.
NLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIE
ARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIE ARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICUL AR PURPOSE (AND T HEIR EQUIVALE NTS UNDER THE LAW
F ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
NLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NO
ECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAININ
PPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJ UR
EATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIV
RADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
esale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately vo ny warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, an
iability of ST.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document su persedes and replaces all information previously supplied.
© 2009 STMicroelectronics - All rights reserved
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan -
STMicroelectronics group of compan ie s
Malaysia - Malta - Morocco - Philip pines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com
Doc ID 16361 Rev 1 17/17
Loading...