STMicroelectronics STM8S DISCOVERY evaluation board User Manual
Iklan
Iklan
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 application. 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
Contents
UM0817
STM8S105C6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Using the ST-Link on other applications . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Daughter board connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2/17 Doc ID 16361 Rev 1
UM0817 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 blinking speed.
The STM8S-DISCOVERY evaluation board helps you 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
2 Hardware and layout
UM0817
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.
illustrates the connections between the STM8S105C6 and its peripherals (ST-
LINK, touch-sensing button, LED and connectors).
helps you to locate these features on the STM8S-DISCOVERY board, as well as
the potential point of separation (for more details refer 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
Figure 3.
Top layout
Hardware and layout
USB connector
ST-Link JTAG
USB data transfer LED
ST-LINK core
SWIM connector
Possible separation point
LED (LD1)
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
6/17
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 level; internal clock oscillators, brown-out reset, watchdog.
Performance and robustness
– 16 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 peripherals.
– Full documentation and a wide choice of development tools
– Standard 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 external interrupts on 6 vectors
– 2 x 16-bit general purpose timers; with 2+3 CAPCOM channels (IC, OC or PWM)
– Advanced 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 converter 10-bit, ±1 LSB ADC with up to 10 multiplexed channels
Doc ID 16361 Rev 1
UM0817
Figure 5.
STM8S105C6 block diagram
Hardware and layout
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 single wire interface module (SWIM). The ST-Link module of the STM8S-DISCOVERY evaluation board 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:
2.2.2
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 to UM0470.
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 without breaking the PCB:
Unsolder the two solder bridges SB1 and SB2 under the SWIM connector. See
. 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 7.
ST-Link alternative
Remove SB1 and SB2 solder bridges
8/17 Doc ID 16361 Rev 1
UM0817
Figure 8.
Separated ST-Link module
Hardware and layout
STM8S105C6 eval board
STLink
SWIM
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 STM8S105C6 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.
Power selection
VDD = 5 V
VDD = 3.3 V
Doc ID 16361 Rev 1 9/17
Hardware and layout UM0817
A touch sensing button TS1 is available on the STM8S-DISCOVERY evaluation board (see
).
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 key touch 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 on 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
3 Daughter board connection
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)
Pin number
(chip)
7
8
5
6
9
10
11
12
3
4
1
2
7
8
5
6
9
10
11
12
3
4
1
2
Pin name Main function
NRST
OSCIN/PA1
IO Reset
IO Port A1
OSCOUT/PA2 IO Port A2
Vssio_1 S I/O ground
Vss
VCAP
Vdd
Vddio_1
PA3
PA4
PA5
PA6
S
S
S
S
IO
IO
IO
IO
Digital ground
1.8V regulator capacitor
Digital power supply
I/O power supply
Port A3
Port A4
Port A5
Port A6
Alternate function
Table 2.
CN2 pinout
Pin number
(Cn2)
Pin number
(chip)
1 25
2
6
7
8
9
10
3
4
5
11
12
26
30
31
32
33
34
27
28
29
35
36
Pin name Main function Alternate function
PE5
PC1/TS1
IO
IO
Port E5
Port C1
PC2/TS1_load IO Port C2
PC3 IO Port C3
PC4 IO Port C4
PC5
Vssio_2
Vddio_2
PC6
PC7
PG0
PG1
IO Port C5
S I/O ground
S
IO
IO
IO
IO
I/O power supply
Port C6
Port C7
Port G0
Port G1
SPI master / slave
Timer 1 - channel 1 / UART2 synchronous clock
Timer 1 - channel2
Timer 1 - channel 3
Timer 1 - channel 4
SPI clock
SPI master out / slave in
SPI master in / slave out
Doc ID 16361 Rev 1 11/17
Daughter board connection UM0817
Table 3.
CN3 pinout
Pin number
(Cn3)
Pin number
(chip)
7
8
5
6
3
4
1
2
9
10
11
12
17
18
19
20
13
14
15
16
21
22
23
24
Pin name
PB1
PB0
PE7
PE6
PB5
PB4
PB3
PB2
Vdda
Vssa
PB7
PB6
Main function Alternate function
S Analog power supply
S Analog ground
IO Port B7
IO Port B6
Analog input 7
Analog input 6
IO Port B5
IO Port B4
IO Port B3
IO Port B2
Analog input 5
Analog input 4
Analog input 3
Analog input 2
IO Port B1
IO Port B0
IO Port E7
IO Port E6
Analog input 1
Analog input 0
Analog input 8
Analog input 9(2)
*
Table 4.
CN4 pinout
Pin number
(Cn4)
Pin number
(chip)
9
10
11
12
6
7
8
1
2
3
4
5
45
46
47
48
42
43
44
37
38
39
40
41
Pin name
PE3
PE2
PE1
PE0
PD0/LED
PD1/SWIM
PD2
PD3
PD4
PD5
PD6
PD7
Main function
IO Port E3
IO Port E2
IO Port E1
IO Port E0
IO Port D0
IO Port D1
IO Port D2
IO Port D3
IO Port D4
IO Port D5
IO Port D6
IO Port D7
Alternate function
Timer 1 – break Input
I2C data
I2C clock
Configurable clock output
Timer 3 - channel 2
SWIM data interface
Timer 3 - channel 1
Timer 2 - channel 2
Timer 2 - channel 1
UART2 data transmit
UART2 data receive
Top level interrupt
12/17 Doc ID 16361 Rev 1
Figure 11.
STM8S-DISCOVERY
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:
MB867
Rev:
A.1(PCB.SCH)
Date:
5/6/2009
3
Figure 12.
STM8S-DISCOVERY MCU
1 2 3 4
ST_LINK_SWIM
C3
20pF
C4
20pF
RESET#
VDD
R7
10K[N/A]
C1
10nF
X1
16MHz
VDD
R5
C5
60
680nF
NRST
PA1
PA2
VCAP
PA3
PA4
PA5
PA6
10
11
12
8
9
6
7
3
4
5
1
2
NRST
OSCIN/PA1
OSCOUT/PA2
Vssio_1
Vss
VCAP
Vdd
Vddio_1
PA3
PA4
PA5
PA6
VDD
R1
510
LD1
Green
PG1
PG0
PC7
PC6
Vddio_2
Vssio_2
PC5
PC4
PC3
PC2
PC1
PE5
36
35
34
33
32
31
30
29
28
27
26
25
U1
STM8S105C6T6
PG1
PG0
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PE5
VDD
SB3 solder bridge
SB4 solder bridge
VDD
NRST
PA2
PA3
PA5
VDDA
PB7
PB5
PB3
PB1
PE7
CN1
5
7
1
3
9 10
11 12
6
8
2
4
PA1
VCAP
PA4
PA6
Header 6X2H
Left
CN3
5
7
1
3
9 10
11 12
2
4
6
8
PB6
PB4
PB2
PB0
PE6
Header 6X2H
Down
VDD
R2
R4
10K
1M
SB5
VDD
L1
BEAD
C6
1uF
C7
100nF
VDDA
EX_PC3
PE5
PC2
PC4
PC6
PG0
PE3
PE1
PD0
PD2
PD4
PD6
C2
1nF
CN2
5
7
1
3
9 10
11 12
6
8
2
4
Header 6X2H
Right
CN4
1
3
5
7
9
11
2
4
6
8
10
12
Header 6X2H
Top
EX_PC1
EX_PC3
PC5
PC7
PG1
PE2
PE0
PD1
PD3
PD5
PD7
VDD
Extension connector
<----Active shield
R6
10K
<----ESD resistor close to MCU pad
<----Touch Sensing diameter 8mm
TS1
TS_PAD
+3V3
U5V
1
2
JP1 VDD
3
C8
100nF
C9
100nF
C10
100nF
1 2 3
STMicroelectronics
Title:
STM8S-Discovery MCU
Number:
MB867
Rev: A.1(PCB.SCH) Date: 8/24/2009
4
3
Figure 13.
STM8S-DISCOVERY ST-Link (SWIM only)
1 2
R15
100K
+3V3
C15
20pF 1
X2
2
8MHz
+3V3
R16
100K
C16
20pF
+3V3
1
SWIM_PULLUP_CTL
OSC_IN
OSC_OUT
STM_RST
C11
AIN_1
M25_CS
U2_TX
9
7
8
10
11
12
4
5
2
3
6
VBAT
PC13
PC14
PC15
OSC_IN
OSC_OUT
/RST
VSSA
VDDA
PA0
PA1
U2_TX
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
STM_JRST
STM_JTDI
STM_JTCK
8
6
4
CN5
7
5
3
1
STM_JTMS
STM_JTDO
+3V3
JTAG
+3V3
MCU
+3V3
R18
1K5
CN6
VCC
D-
D+
GND
SHELL
SHELL
USB-typeB connector
4
0
0
1
2
3
U5V
R21
R22
1
22
22
USB_DM
USB_DP
U5V
3
U4
LD1117-3V3
Vin Vout
2
+3V3
C18
4.7uF
C19
4.7uF
C12
104P
C13
104P
C17
104P
C14
104P
USB
2
3 4
VDD
SWIM_IN
SWIM_RST_IN
R8
R9
220
220
SWIM
SWIM_RST
R12
680
R13
R14
47
47
ST_LINK_SWIM
RESET#
VDD CN7
3
4
1
2
Header 4
SWIM
3
ST_LINK_LED
VDD
R17
510
R19
4K7
LD2
RED
R20
4K7
AIN_1
STMicroelectronics
Title:
STM8S-Discovery ST_LINK (SWIM only)
Number:
MB867
Rev: A.1(PCB.SCH) Date: 6/25/2009
4
LED
Sh
Revision history
Table 5.
Date
05-Oct-2009
Document revision history
Revision
1
Initial release.
Changes
UM0817
16/17 Doc ID 16361 Rev 1
UM0817
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.
© 2009 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 16361 Rev 1 17/17
Unduh
Iklan