Sie sind auf Seite 1von 48

UM1574

User manual
STM8A-DISCOVERY
Discovery kit for STM8A microcontrollers

Introduction
The STM8A-DISCOVERY helps you discover the STM8AF and STM8AL automotive
microcontroller family features and develop your applications through two dedicated
application boards that can be connected together via a LIN network.
The STM8AF board can perform both CAN and LIN communications with the MCU powered
at 5 V and is ready to be connected into a network with its integrated transceiver.
The STM8AL board manages LIN slave communication through its transceiver and uses a
4-digit alphanumeric LCD display with the MCU powered at 3.3 V, offering low energy power
modes.
Both STM8AF and STM8AL boards include push buttons, LEDs, external connectors and
allow various configurations to take advantage of the numerous capabilities of the
microcontrollers.

Figure 1. STM8A-DISCOVERY

STM8AF STM8AL
board board

Figure 2. Applicable tools


Type Part number

Evaluation tools STM8A-DISCOVERY

November 2012 Doc ID 023645 Rev 1 1/48


www.st.com
Contents UM1574

Contents

1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Development toolchains supporting the STM8A-DISCOVERY . . . . . . . . . 7

3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Hardware and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


4.1 STM8A-DISCOVERY common resources . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.1 Embedded ST-LINK/V2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.2 Debugging STM8A-DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.3 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1.4 L99PM62GXP power management IC with LIN and high speed CAN . 11
4.2 STM8AF board dedicated resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1 STM8AF5288T microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.2 STM8AF board LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.3 STM8AF board Push buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.4 STM8AF board solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.5 STM8AF board jumpers selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.6 STM8AF board extension connection . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 STM8AL board dedicated resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3.1 STM8AL3L68T microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.2 STM8AL board LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.3 STM8AL board Push buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.4 STM8AL board built-in IDD measurement circuit . . . . . . . . . . . . . . . . . . 28
4.3.5 STM8AL board LCD (16 segments, 4 commons) . . . . . . . . . . . . . . . . . 31
4.3.6 STM8AL board solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3.7 STM8AL board jumpers selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3.8 STM8AL board extension connection . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5 STM8A-DISCOVERY boards mechanical drawing . . . . . . . . . . . . . . . . 35


5.1 STM8AF board mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

2/48 Doc ID 023645 Rev 1


UM1574 Contents

5.2 STM8AL board mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6 STM8AF board electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7 STM8AL board electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Doc ID 023645 Rev 1 3/48


List of tables UM1574

List of tables

Table 1. ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6


Table 2. STM8AF board solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 3. STM8AF board jumper selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 4. STM8AF board P1 pinout microcontroller connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 5. STM8AF board P2 pinout microcontroller connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 6. STM8AF board P3 pinout L99PM62GXP connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 7. LCD connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 8. STM8AL board solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 9. STM8AL board jumpers selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 10. STM8AL board P1 pinout Microcontroller connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 11. STM8AL board P2 pinout L99PM62GXP connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 12. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

4/48 Doc ID 023645 Rev 1


UM1574 List of figures

List of figures

Figure 1. STM8A-DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. Applicable tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 3. Debugging the STM8AF microcontroller when the STM8AL board or an
external application board is connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 4. Debugging the STM8AL microcontroller when the STM8AF board or an
external application board is connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5. L99PM62GXP block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 6. STM8AF board hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 7. STM8AF board top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 8. STM8AF board bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 9. STM8AF5288T package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 10. STM8AF5288T block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 11. STM8AL board hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 12. STM8AL board top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 13. STM8AL board bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 14. STM8AL3L68T package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 15. STM8AL3L68T MCU block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 16. STM8AL board IDD measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 17. STM8AL board IDD Low power mode measurement timing diagram . . . . . . . . . . . . . . . . . 30
Figure 18. LCD segment mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 19. STM8AF board mechanical drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 20. STM8AL board mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 21. STM8AF board top level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 22. STM8AF board ST-LINK/V2 (SWIM only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 23. STM8AF board MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 24. STM8AF board CAN/LIN and 12V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 25. STM8AL board top level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 26. STM8AL board ST-LINK/V2 (SWIM only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 27. STM8AL board MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 28. STM8AL board LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 29. STM8AL board IDD_measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 30. STM8AL board LIN and 12V. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Doc ID 023645 Rev 1 5/48


Conventions UM1574

1 Conventions

Table 1 provides the definitions of some conventions used in the present document.

Table 1. ON/OFF conventions


Convention Definition

Jumper JPx ON Jumper fitted


Jumper JPx OFF Jumper not fitted
Jumper JPx 1-2 Jumper is fitted between pins 1 and 2
Jumper JPx 2-3 Jumper is fitted between pins 2 and 3
Solder bridge SBx ON SBx connections closed by solder
Solder bridge SBx OFF SBx connections left open

6/48 Doc ID 023645 Rev 1


UM1574 Quick start

2 Quick start

The STM8A-DISCOVERY is a low-cost and easy-to-use development kit to quickly evaluate


and start a development with STM8AF and STM8AL microcontrollers family devices.
STM8AF devices offer high performance and full automotive network connectivity with high
speed CAN and LIN master/slave modes communications. STM8AL devices offer high
performance with ultra-low power management. Both comply with automotive qualification
and conform to AEC-Q100 rev G.
For more information on the STM8A-DISCOVERY and for demonstration software, visit
www.st.com/stm8a-discovery.

2.1 Getting started


1. Connect CN3 and CN4 on the STM8AF board to CN3 and CN4 on the STM8AL board.
2. Connect both type A connectors of the USB cable to a PC.
3. Then connect the mini-B connector of the USB cable to the STM8AF board.
4. All LEDs blink once on the STM8AF board and twice on the STM8AL board, then the
LIN communication between both boards starts.
5. Turn the RV1 trimmer on the STM8AF board to adjust the value from 0 to 100 on the
STM8AL board LCD through the LIN bus.
6. Push button USER1 on the STM8AF board to sequentially display the LCD bars on the
STM8AL board through the LIN bus. Push button USER2 on the STM8AF board to
sequentially switch them off one by one.
7. Push button USER1 on the STM8AL board to sequentially switch on green LEDs LD4,
LD5, LD6 and LD7 on the STM8AF board through the LIN bus. Push button USER2 on
the STM8AL board to sequentially switch them off one by one.
8. To perform or modify the Discover project related to this demo, visit www.st.com/stm8a-
discovery.
9. You can discover the STM8AF and STM8AL features, download and execute programs
proposed in the list of projects.
10. You can then develop your own application using the available examples.

2.2 System requirements


Windows PC (XP, Vista, 7)
USB cable (dual type A to mini-B) - included

2.3 Development toolchains supporting the STM8A-DISCOVERY


IAR: EWSTM8
STMicroelectronics: STVD

Doc ID 023645 Rev 1 7/48


Features UM1574

3 Features

The STM8A-DISCOVERY offers different features combined with STM8AF and STM8AL
boards:
STM8AF and STM8AL common board features:
On-board ST-LINK/V2 included for debugging and programming
Board power supply: through 5 V USB bus
Internal dual ST662A step-up converter building the 12 Vdc when powered by USB
port
External application power supply VBAT (up to 14 Vdc)
16 MHz HSE XTAL crystal oscillator
L99PM62GXP power management IC with LIN and high speed CAN with SPI control
interface and high-side drivers
Two push buttons (USER1 and USER2)
Extension header for L99PM62GXP including relays, high-side outputs and wake-up
capabilities
STM8AF dedicated board features:
STM8AF5288T microcontroller featuring 64 Kbytes Flash, 2 Kbytes data EEPROM,
LIN, CAN in an 48-pin package
Seven LEDs:
LD1 (red/green) for USB communication
LD2 (red) for 5 V power ON
Five user LEDs LD3 (red) and LD4 to LD7 (green)
RV1 potentiometer connected to the ADC peripheral
Extension headers for MCU connectivity (full Port B, free ports pins, RESET)
STM8AL dedicated board features:
STM8AL3L68T microcontroller featuring 32 Kbytes Flash, 1 Kbytes data EEPROM,
LCD in an 48-pin package
Four LEDs:
LD1 (red/green) for USB communication
LD2 (red) for 3.3 V power ON
2 user LEDs LD3 (red) and LD4 (green)
4-digit alphanumeric LCD display including 4 bars display
Extension header for MCU connectivity (free ports pins, RESET)

8/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4 Hardware and layout

This section describes STM8A-DISCOVERY hardware and layout which can be broken
down into common resources used both in STM8AF and STM8AL boards and the special
features belonging to each of them.

4.1 STM8A-DISCOVERY common resources

4.1.1 Embedded ST-LINK/V2


The ST-LINK/V2 programming and debugging tool is integrated both in STM8AF and
STM8AL boards. The embedded ST-LINK/V2 can be used to program/debug the MCU on
the board and supports SWIM for STM8 devices.
The ST-LINK/V2 must be connected with the dual type A to mini-B USB cable provided in
the blister.
Caution: First connect the dual type A on the PC side (both type A connectors must be plugged in)
then connect the mini-B USB to the board (STM8AF or STM8AL boards).
For programming or debugging the STM8A-DISCOVERY, the PC can be either connected to
the mini-B USB connector of the STM8AF or STM8AL board.
The connection on both mini-B usb of the STM8AF and STM8AL boards is not supported.
This operation can damage the boards.
For information about debugging and programming features refer to user manual UM1075
(ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32) which describes in
detail all the ST-LINK/V2 features.

Doc ID 023645 Rev 1 9/48


Hardware and layout UM1574

4.1.2 Debugging STM8A-DISCOVERY


The STM8A-DISCOVERY is composed by a STM8AF board connected to a STM8AL board.
A PC can be connected to the STM8AF or STM8AL board side while
programming/debugging the STM8AF5288T or the STM8AL3L68T.
Example 1: Debugging the STM8AF microcontroller when the STM8AL board or an
external application board is connected.

Figure 3. Debugging the STM8AF microcontroller when the STM8AL board or an


external application board is connected

Example 2: Debugging the STM8AL microcontroller when the STM8AF board or an


external application board is connected.

Figure 4. Debugging the STM8AL microcontroller when the STM8AF board or an


external application board is connected

Note: All other configuration are not supported and could damage the boards or the PC.

10/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.1.3 Power supply


The power supply is provided by the host PC through the dual type A to mini-B USB cable or
by an external VBAT power supply (12 Vdc typical, 14 Vdc max).
One dual type A to mini-B USB is needed to provide the current required by the STM8AF
and STM8AL boards when they are connected together.
Reminder: First connect the dual type A on the PC side (both type A connectors must be
plugged in) then connect the mini-B USB to one of the STM8Ax boards.
When the STM8AF board is connected to the STM8AL board, different schemes are
possible:
The USB cable is used to simply provide the power supply to the STM8A-DISCOVERY.
In that case, it can be connected either to the STM8AF or STM8AL board side.
While programming/debugging the STM8AF or STM8AL board with your PC, the USB
cable must be placed on the appropriate side of the board depending on which board is
being debugged (see Figure 3 and Figure 4).
If no programming/debugging operations are needed (no PC connected) or if a larger
amount of current is required (higher than 200 mA @5 V), then the power supply must
be wired between the VBAT and GND pins of the STM8AF or STM8AL board. VBAT is
indeed internally distributed through the two boards. Therefore, VBAT can be wired
indifferently on the STM8AF or STM8AL board (not on both).
On the other hand, if the STM8AF or STM8AL board is used in standalone (not connected
together), they can be supplied either by the USB cable or by the external VBAT. As for
instance, this configuration can be used when the boards are inserted in an automotive
network.
The STM8AF and STM8AL boards include an internal 5 V to 12 V step-up converter that is
needed to build the voltages required for LIN or CAN networks. The 5 V USB is then
converted into 12 V voltage that supplies the integrated L99PM62GXP power management
IC. This device includes a 5 V regulator which is connected directly to the STM8AF5288T
microcontroller or transformed subsequently into 3.3 V to supply the STM8AL3L68T
microcontroller.
The power supplies of STM8AF5288T and STM8AL3L68T are provided by the
L99PM62GXP power management IC on condition that the microcontrollers sequentially
refresh the watchdog included in the L99PM62GXP devices. This functionality exists when
the L99PM62GXP is in Active mode (standard operation). In that case, if the L99PM62GXP
device is not refreshed periodically, the 5 V power supply is provisionally shutdown until a
next start-up sequence is performed. This behavior can generate some issues when the
SWIM communication tries to establish a connection with the microcontroller and when the
latter is not power supplied. To remedy to this situation and to avoid caring about
L99PM62GXP watchdog refresh, the L99PM62GXP can be placed in Flash mode by
configuring some dedicated jumpers (see Section 4.2.5). This prevents to cut the power
supply to the microcontroller as for instance for software debugging. This behavior is only
present on the STM8AF board as the STM8AL board is always put in Flash mode by design.

4.1.4 L99PM62GXP power management IC with LIN and high speed CAN
The L99PM62GXP is a power management system IC that provides electronic control units
with enhanced system power supply functionality, including various standby modes, as well
as LIN and HS CAN physical communication layers. The device's two low-drop voltage
regulators supply the system microcontroller and external peripheral loads such as sensors

Doc ID 023645 Rev 1 11/48


Hardware and layout UM1574

and provide enhanced system standby functionality with programmable local and remote
wake-up capability.
The microcontrollers of the STM8AF and STM8AL boards communicate with the
L99PM62GXP IC through the SPI interface, that allows control and diagnosis of the device.
A lot of features are offered to control low and high-side drivers using the embedded and
configurable PWM timers, window watchdog, wake-up capability. Some of their outputs are
available at external headers of the STM8AF and STM8AL boards. This device is a power
SS0-36-pin package.

Figure 5 illustrates the L99PM62GXP block diagram. For further information on the
L99PM62GXP device and to explore its numerous capabilities, please refer to datasheet
available at www.st.com.

12/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

Figure 5. L99PM62GXP block diagram

MS31061V1

Doc ID 023645 Rev 1 13/48


Hardware and layout UM1574

4.2 STM8AF board dedicated resources


The STM8AF board is designed around the STM8AF5288T microcontroller in a 48-pin
LQFP package.
Figure 6 illustrates the connections between the STM8AF5288T and the different
peripherals (ST-LINK/V2, L99PM62GXP IC, push buttons, LED and connectors).
Figure 6 and Figure 7 help you locate these features on the STM8AF board.

Figure 6. STM8AF board hardware block diagram

Mini
USB

Embedded
ST-LINK/V2 CN3/CN4

CAN
DC/DC

LIN
converter L99PM62GXP
5V to 12V Power Management
LIN transceiver
5V

VBAT

SWIM SPI 5V
P1 Header

STM8AF5288T
P3 Header

I/O
I/O
P2 Header

Red LED LD3


USER1 button

Green LED LD4


USER2 button
Green LED LD5

RV1
potentiometer Green LED LD6

Green LED LD7

MS31074V1

14/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

Figure 7. STM8AF board top layout

ST-LINK/V2 LD2
LD1 (red/green LED) (red LED) PWR
COM

(red LED) LD3,


(green LED) LD4,
(green LED) LD5,
(green LED) LD6,
(green LED) LD7

STM8AF5288T

JP3 (I DD
measurement)

L99PM62GXP
JP1 (FLASH/LIN)

VBAT

ST662A

B1 USER1 button
JP2 (FLASH/CAN)

B2 USER2 button

CN3
CN4 Male external
Female external

RV1 potentiometer

MS31065V2

Doc ID 023645 Rev 1 15/48


Hardware and layout UM1574

Figure 8. STM8AF board bottom layout

SB1 (RESERVED)

SB2 (STM_RST)

SB3 (MCO)

SB4, SB5
(RESERVED)

SB6 (L99PM62GXP)

SB7 (CAN supply)

SB8 (Start-up delay)

SB9 (CAN
SB10, SB11 (USB5V) terminating resistor)

SB12, SB13 (RESERVED) MS31063V1

16/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.2.1 STM8AF5288T microcontroller


This automotive 8-bit MCU has 64 Kbytes Flash, 2 Kbytes data EEPROM, 10-bit ADC,
timers, LIN, CAN, USART, SPI, I2C and operates from 3 to 5.5 V.

Figure 9. STM8AF5288T package

STM8AF5288T

64 Kbytes of Flash memory


2 Kbytes of EEPROM
4 Kbytes of RAM

LQFP48 7x7

The STM8AF5288T automotive 8-bit microcontroller offers 64 Kbytes of non-volatile


memory and integrated true data EEPROM.
The STM8AF52xx series feature a CAN interface.
All devices of the STM8A product line provide the following benefits: reduced system cost,
performance and robustness, short development cycles, and product longevity.
Reduced system cost
Integrated true data EEPROM for up to 300 k write/erase cycles
High system integration level with internal clock oscillators, watchdog and
brownout reset
Performance and robustness
Peak performance 20 MIPS at 24 MHz and average performance 10 MIPS at
16 MHz CPU clock frequency
Robust I/O, independent watchdogs with separate clock source
Clock security system
Short development cycles
Applications scalability across a common family product architecture with
compatible pinout, memory map and modular peripherals.
Full documentation and a wide choice of development tools
Product longevity
Advanced core and peripherals made in a state-of-the art technology
Native automotive product family operating both at 3.3 V and 5 V supply
The STM8AF and STM8AL boards are supported by the same tools including STVD/STVP
development environment.

Doc ID 023645 Rev 1 17/48


Hardware and layout UM1574

Figure 10. STM8AF5288T block diagram

Reset block XTAL 1-24 MHz


Clock controller

Reset Reset
RC int. 16 MHz

Detector
POR
RC int. 128 kHz

BOR

Clock to peripherals and core

Window WDG
STM8A CORE
IWDG

Single wire Up to 128 Kbyte


debug interf. Debug/SWIM
high density program
Flash
Master/slave
automatic LINUART
Up to 2 Kbytes
resynchronization
Address and data bus

data EEPROM

400 Kbit/s Up to 6 Kbytes


I2C
RAM

10 Mbit/s SPI Boot ROM

LIN master 16-bit advanced control


SPI emul. USART timer (TIM1)
Up to
9 CAPCOM
16-bit general purpose channels
1 Mbit/s beCAN (TIM2, TIM3)

8-bit AR timer
Up to (TIM4)
10-bit ADC
16 channels

AWU timer

MS31062V1

18/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.2.2 STM8AF board LEDs


The STM8AF board includes the following LEDs:
LD1 COM: LD1 default status is red. LD1 turns to green to indicate that
communications are in progress between the PC and the ST-LINK/V2.
LD2 PWR: red LED indicates that the board is powered and that 5 V is output from
L99PM62GXP power management IC.
User LD3: red LED is a user LED connected to the I/O PA3 of the STM8AF5288T.
User LD4: green LED is a user LED connected to the I/O PD3 of the STM8AF5288T.
User LD5: green LED is a user LED connected to the I/O PD0 of the STM8AF5288T.
User LD6: green LED is a user LED connected to the I/O PE3 of the STM8AF5288T.
User LD7: green LED is a user LED connected to the I/O PC3 of the STM8AF5288T.

4.2.3 STM8AF board Push buttons


STM8AF board includes two push buttons:
USER1: User button connected to the I/O PE2 of STM8AF5288T.
USER2: User button connected to the I/O PE1 of STM8AF5288T.

Doc ID 023645 Rev 1 19/48


Hardware and layout UM1574

4.2.4 STM8AF board solder bridges

Table 2. STM8AF board solder bridges


Bridge State(1) Description

SB1 (Reserved) ON Reserved, do not modify.

SB2 OFF NRST signal of STM32F103C8T6 (ST-LINK/V2) is not connected to GND.


(STM_RST) ON NRST signal of STM32F103C8T6 (ST-LINK/V2) is connected to GND.
MCO clock from STM32F103C8T6 is not connected to PA1 (OSC_IN) of
OFF
SB3 (MCO) STM8AF5288T.
ON MCO clock from STM32F103C8T6 is connected to PA1 (OSC_IN) of STM8AF5288T.
SB4,5
OFF Reserved, do not modify.
(Reserved)
NRESET of L99PM62GXP is not connected to the STM8AF5288T Reset pin (external
SB6 OFF
watchdog disable).
(L99PM62GXP
Reset) NRESET of L99PM62GXP is connected to the STM8AF5288T Reset pin (external
ON
watchdog enable).

SB7 ON CAN transceiver is powered ON.


(CAN supply) OFF CAN transceiver is OFF. This selection saves power consumption.
If the STM8AF board is connected to another STM8AF board, then one of them must
SB8 OFF
have SB8 OFF.
(Start-up delay)
ON The STM8AF board is connected to the STM8AL board (standard demo package).
SB9 (CAN ON The CAN terminating 120 Ohms resistor is connected on the CAN bus.
terminating
resistor) OFF The CAN terminating 120 Ohms resistor is not connected on the CAN bus.

USB5V is available on CN3/CN4 connectors for powering an external board through


SB10,11 ON
CN3/CN4.
(USB5V)
OFF USB5V is not available on CN3/CN4 connectors.
SB12,13
ON Reserved, do not modify.
(Reserved)
1. Default SBx state is shown in bold.

20/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.2.5 STM8AF board jumpers selection

Table 3. STM8AF board jumper selection


Jumper State(1) Description

JP1 1-2 Flash mode selected (2).


(LIN/FLASH) 2-3 LIN communication enabled.

JP2 1-2 Flash mode selected (2).


(CAN/FLASH) 2-3 CAN communication enabled.
ON Standard operation, 5 V connected to the VDD of the microcontroller.
JP3 (IDD) An ammeter can be connected between JP3 pins to measure the
OFF
current sunk by the MCU.
JP4 (Reserved) OFF Reserved, do not modify.
1. Default jumper state is shown in bold.
2. The Flash mode is activated if at least JP1 or JP2 selects Flash mode.

4.2.6 STM8AF board extension connection


Male headers P1, P2 and P3 connectors can connect the STM8AF board to a standard
prototyping/wrapping board. Free GPI/Os of the STM8AF5288T are available on P1 and P2.
L99PM62GXP device I/Os are connected to P3. P1, P2 and P3 can also be probed by an
oscilloscope, a logic analyzer or a voltmeter.
P1 connector contains the full port B GPI/Os and the alternate functions are the first 8 ADC
channel inputs. Its standard HE10 format complies with some additional modules or
resources that are pin-to-pin equivalent.

Table 4. STM8AF board P1 pinout microcontroller connectivity


Pin number Pin number Board pin
Type Main function Alternate function
P1 STM8AF MCU name

1 22 PB0 I/O Port B0 Analog input AIN0


2 21 PB1 I/O Port B1 Analog input AIN1
3 20 PB2 I/O Port B2 Analog input AIN2
4 19 PB3 I/O Port B3 Analog input AIN3
5 18 PB4 I/O Port B4 Analog input AIN4
6 17 PB5 I/O Port B5 Analog input AIN5
7 16 PB6 I/O Port B6 Analog input AIN6
8 15 PB7 I/O Port B7 Analog input AIN7
9 VDD Microcontroller Digital power supply
10 GND Digital ground

Doc ID 023645 Rev 1 21/48


Hardware and layout UM1574

Table 5. STM8AF board P2 pinout microcontroller connectivity


Pin number
Pin number Board pin
STM8AF Type Main function Alternate function
P2 name
MCU

1 GND Digital ground


2 1 NRST I/O Reset
3 48 PD7 I/O Port D7 TLI
4 45 PD4 I/O Port D4 Timer 2 - channel 1
5 43 PD2 I/O Port D2 Timer 3 - channel 1
6 12 PA6 I/O Port A6 USART synchronous clock
7 40 PE0 I/O Port E0 CCO Configurable clock output
8 24 PE6 I/O Port E6 Analog input AIN9
9 29 PC4 I/O Port C4 Timer 1 - channel 4
10 27 PC2 I/O Port C2 Timer 1 - channel 2
11 26 PC1 I/O Port C1 Timer 1 - channel 1
12 VDD Microcontroller Digital power supply

Table 6. STM8AF board P3 pinout L99PM62GXP connectivity(1)


Pin number
Pin number Board pin
STM8AF Type Main function
P3 name
MCU

5 V board power supply (output 5V1 from


1 5V
L99PM62GXP)
2 20 WU1 I Wake-up input 1
3 28 OUT2 O High-side driver output (7 , typ.)
4 29 OUT1 O High-side driver output (7 , typ.)
5 30 O_HS O High-side driver (1 , typ.)
6 34 REL1 O Low-side driver output (2 typ.)
7 35 REL2 O Low-side driver output (2 typ.)
8 GND Digital ground
9 VBAT I External power supply (12 Vdc typ.)
1. For additional information on L99PM62GXP device connectivity, please refer to product datasheet
available at www.st.com.

22/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.3 STM8AL board dedicated resources


The STM8AL board is designed around the STM8AL3L68T microcontroller in a 48-pin
LQFP package.
Figure 11 illustrates the connections between the STM8AL3L68T and the different
peripherals (ST-LINK/V2, L99PM62GXP IC, push buttons, LED, IDD measurement circuitry,
LCD and connectors).
Figure 11 and Figure 12 help you to locate these features on the STM8AL board.

Figure 11. STM8AL board hardware block diagram

Mini
USB

Embedded
ST-LINK/V2

CN3/CN4

LIN
DC/DC
converter L99PM62GXP
5V to 12V Power Management
LIN transceiver
5V

5V to 3V3

SWIM SPI 3V3


VBAT

STM8AL3L68T
P1 Header

P2 Header

I/O
I/O

USER1 button Red LED LD3

USER2 button Green LED LD4

IDD
measurement

LCD (16 segments, 4 commons)

MS31075V1

Doc ID 023645 Rev 1 23/48


Hardware and layout UM1574

Figure 12. STM8AL board top layout

ST-LINK/V2
LD1 (red/green LED) LD2 (red LED) PWR
COM

LCD 24 segments
IDD module

JP2 (I DD ) (red LED) LD3

STM8AL3L68T (green LED) LD4

JP3 (RESERVED)

L99PM62GXP

VBAT

B1 USER1 button
B2 USER2 button

ST662A

CN3 Male external


CN4 Female external

MS31065V1

24/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

Figure 13. STM8AL board bottom layout

SB1 (RESERVED)

SB2 (STM_RST)

SB4, SB5 (RESERVED)


SB3 (MCO)

SB6, SB7, SB8


(IDD circuitry)

SB9, SB10
(Xtal 32.768 kHZ)

SB11
(L99M62GXP Reset)

SB12 (RESERVED)
SB13, SB14 (USB5V)

SB15, SB16
(RESERVED)
MS31064V1

Doc ID 023645 Rev 1 25/48


Hardware and layout UM1574

4.3.1 STM8AL3L68T microcontroller


This automotive 8-bit ultralow power MCU has 32 Kbytes Flash, 1 Kbytes data EEPROM,
RTC, LCD, timers, USART, I2C, SPI, ADC, DAC and comparators.

Figure 14. STM8AL3L68T package

STM8AL3L68T

32 Kbytes of Flash memory


1 Kbytes of EEPROM
2 Kbytes of RAM

LQFP48 7x7

This microcontroller belongs to the STM8AL family and provides the following benefits:
Integrated system
Up to 32 Kbytes of medium-density embedded Flash program memory
1 Kbyte of data EEPROM
Internal high speed and low-power low speed RC.
Embedded reset
Ultralow power consumption
195 A/MHZ + 440 A (consumption)
0.9 A with LSI in Active-halt mode
Clock gated system and optimized power management
Capability to execute from RAM for Low power wait mode and Low power run
mode
Advanced features
Up to 16 MIPS at 16 MHz CPU clock frequency
Direct memory access (DMA) for memory-to-memory or peripheral-to-memory
access.
Short development cycles
Application scalability across a common family product architecture with
compatible pinout, memory map and modular peripherals.
Wide choice of development tools
This device offers 12-bit ADC, DAC, two comparators, real-time clock, three 16-bit timers,
one 8-bit timer as well as standard communication interfaces such as SPI, I2C and USART.
A 4x28-segment LCD is available on the medium-density STM8AL3L68T device.

26/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

Figure 15. STM8AL3L68T MCU block diagram


OSC_IN, @VDD
OSC_OUT 1-16 MHz oscillator
VDD18 Power VDD1 =1.65 V
Clock to 3.6 V
16 MHz internal RC controller VSS1
OSC32_IN, VOLT. REG.
32 kHz oscillator and Clocks
OSC32_OUT
CSS to core and
38 kHz internal RC peripherals
RESET NRST
Interrupt controller
STM8 Core POR/PDR

Debug module BOR


SWIM
(SWIM)
PVD PVD_IN
2 channels 16-bit Timer 2
2 channels 16-bit Timer 3
3 channels
32 Kbytes
16-bit Timer 1 Program memory

Address, control and data buses


8-bit Timer 4 1 Kbyte
Data EEPROM
IR_TIM Infrared interface
2 Kbytes RAM

DMA1
(4 channels)
Port A PA[7:0]

SCL, SDA,
SMB IC1 Port B PB[7:0]

MOSI, MISO,
SCK, NSS SPI1 Port C PC[7:0]

RX, TX, CK USART1 Port D PD[7:0]


VDDA
VSSA @VDDA/VSSA
Port E PE[7:0]
ADC1_INx
VREF+ 12-bit ADC1
Port F PF0
VREF-
Temp sensor
Beeper BEEP

VREFINT out
Internal reference RTC ALARM, CALIB
voltage
IWDG
(38 kHz clock)
COMP1_INP COMP 1
COMP2_INP
COMP2_INM COMP 2 WWDG
DAC_OUT
VREF+ 12-bitDAC
12-bit DAC
LCD driver SEGx, COMx
VLCD = 2.5 V to 4x28
3.6 V LCD booster

1. Legend:
ADC: Analog-to-Digital Converter
BOR: Brownout Reset
DMA: Direct Memory Access
DAC: Digital-to-Analog Converter
IC: Inter-Integrated Circuit multimaster interface
IWDG: Independent WatchDoG
LCD: Liquid Crystal Display
POR/PDR: Power On Reset / Power Down Reset
RTC: Real-Time Clock
SPI: Serial Peripheral Interface
SWIM: Single Wire Interface Module
USART: Universal Synchronous Asynchronous Receiver Transmitter
WWDG: Window WatchDoG

Doc ID 023645 Rev 1 27/48


Hardware and layout UM1574

4.3.2 STM8AL board LEDs


The STM8AL board includes the following LEDs and their description is:
LD1 COM: LD1 default status is red. LD1 turns to green to indicate that communications are
in progress between the PC and the ST-LINK/V2.
LD2 PWR: red LED indicates that the board is powered and that 3.3 V is generated by the
regulator supplied by the L99PM62GXP power management IC.
User LD3: red LED is a user LED connected to the I/O PE7 of the STM8AL3L68T.
User LD4: green LED is a user LED connected to the I/O PC7 of the STM8AL3L68T.

4.3.3 STM8AL board Push buttons


The STM8AL board includes two push buttons:
USER1: User button connected to the I/O PE1 of STM8AL3L68T.
USER2: User button connected to the I/O PE2 of STM8AL3L68T.

4.3.4 STM8AL board built-in IDD measurement circuit


The STM8AL board built-in IDD measurement circuit allows the consumption of the
STM8AL3L68T to be measured and displayed on the LCD Glass while the MCU is in Run or
Low power saving modes.
JP2 in ON position: STM8AL3L68T is powered through IDD measurement circuit
(default).
JP2 in OFF position: STM8AL3L68T is powered directly by +3V3, IDD measurement
circuit is bypassed.
Note: When jumper JP2 is removed the current consumption of the STM8AL3L68T can be
measured by connecting an ammeter between jumper JP2 pin 1 and pin 2.
For IDD measurement by the MCU itself, the circuit below is implemented on the STM8AL
board. Solder bridges SB6, SB7 and SB8 must be closed and a jumper must be plugged
between JP2 pin 2 and pin 3.

28/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

Figure 16. STM8AL board IDD measurement circuit

IDD Measure
V DD

off on
2
1

JP2 U8

1
5 MAX9938FEUK+ U9 PF0
3V3 R25 R22
3 1 2
I/O O/I IDD_Measurement
4 4 10K 0 SB6
R23 C C14
3 5
2(1%) 2 GND VCC 3V3 1uF
R24 74H1G66STR
2K(1%)

4 U4
74LX1G04CTR
3 5
3V3
U7 C15
2

1 16 100nF
Q12 VCC 3V3
2 15
Q13 Q10 R26
3 14
Q14 Q8 10K
U5 4 13 PC4
Q6 Q9
1 8 5 12
S1 D1 Q5 CLR I DD_CNT_EN
2 7 6 11 SB7
G1 D1 Q7 CI
3 6 PE6 7 10
3V3 S2 D2 Q4 CO
4 5 8 9
G2 D2 IDD_WAKEUP GND CO
SB8

T
STS4 DPF20L M74HC4060TTR C16 R29 R27
R28 1nF 15K 30K
47K

Oscillator frequency 30 KHz


AF
MS31059V1

Run mode
In Run mode, IDD current is measured using the operational amplifier MAX9938FEUK+ (U8)
connected to the 2 shunt resistor (R23). In this case IDD_CNT_EN remains high during
measurement, so R24 remains in short-circuit during the measurement because of switch
U5 which remains ON permanently. The jumper JP2 must be connected between pins 2 and
3 of JP2. The measurement range in this case can be up to 30 mA.
Low power mode
In Low power modes (Halt or Active halt), IDD current is measured using the operational
amplifier MAX9938FEUK+ (U8) connected to the 2 K shunt resistor (R24), controlled by
the switch STS4DPF20L (U5). In this case the counter 74HC4060 (U7) enabled by
IDD_CNT_EN manages the measurement timing according to Figure 17. The measurement
range in this case can be up to 30 A.
Low power mode IDD measurement principle
The principle used to measure a current when the STM8AL3L68T 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 C14.
6. Reset the counter by programming IDD_CNT_EN high (in less than 70 ms after the
wakeup) to avoid the R24 2 K resistor being connected later in Run mode.

Doc ID 023645 Rev 1 29/48


Hardware and layout UM1574

The measurement timing is given in Figure 17. In Low power modes, the 2 K resistor is
connected when the U5 switch goes off after entering Low power mode. The Q13 output of
the counter allows connection of the 2 K resistor when the current IDD becomes very low.
Figure 17 shows how the counter and U5 ensure that, 150 ms after IDD_CNT_EN falling
edge, the shunt resistor R24 is connected between VDD_MCU and the power supply in
order to reduce the measurement range to 30 A full scale (instead of 30 mA in Run mode).
Then after another 150 ms for current stabilization, R24 is shorted, the IDD measurement is
stored in C14, and the MCU is woken up. After wakeup, the MCU can measure the IDD
current corresponding to the Low power mode stored in C14.

Figure 17. STM8AL board IDD Low power mode measurement timing diagram

Wake-up IDD
period measurement

Wake-up Clear CNT


event event
MCU mode Run Low power

IDD_CNT_EN 3 6
Q13 = LOW_POWER_EN
4
Q14 = IDD_WAKEUP
Q14n = U4 pin 4

0 ms 150 ms 300 ms

Ibias current measurement procedure


In Low power mode the bias current of operational amplifier input (U8 pin 4) is not negligible
compared to IDD current (typical Ibias is ~240 nA). To obtain a reliable STM8AL3L68T IDD
measurement, it is mandatory to subtract the bias current from the IDD low power
measurement since MCU is not sinking the current. Ibias is measured during production test
and stored in the MCU EPROM. The demonstration software, Discover, uses this value to
display the correct IDD. The Ibias measurement procedure is part of the demonstration
software and can be launched if required.
The procedure for Ibias measurement (implemented in the package demo) is:
1. Power off the board (disconnect the USB cable).
2. Set jumper JP2 to OFF position (pins 1 and 2).
3. Push down USER2 button while powering on the board from the USB.
4. Wait at least 1 second before releasing USER2, the LCD displays the Ibias
measurement.
5. Power off the board (disconnect the USB cable).
6. Set jumper JP2 to ON position (pins 2 and 3). The Ibias value is now stored. The bias
current is then subtracted from the IDD measurement performed in Low power mode.

30/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.3.5 STM8AL board LCD (16 segments, 4 commons)


This LCD allows the STM8AL3L68T to display any information on four 14-segment digits
and 4 BARs, using all COMs. (See the LCD segment mapping in Figure 18 and pin
connections in Table 7). The two first left digits of the LCD display are not used in this
application.
Characteristics overview:
16 segments and 4 commons
Drive method: multiplexed 1/4 duty, 1/3 bias
Operating voltage: 3 V
Operating temperature: 0 to 50C
Connector: 28-pin DIL 2.54 mm pitch
Note: When the LCD is plugged in, all I/O ports listed in Table 7 are unavailable. To use one of
these as I/O, you must remove the LCD

Figure 18. LCD segment mapping

Doc ID 023645 Rev 1 31/48


Hardware and layout UM1574

Table 7. LCD connections


STM8AL3L68T LCD

Pin Name PIN COM3 COM2 COM1 COM0

1 1N 1P 1D 1E
2 1DP 1COLON 1C 1M
3 2N 2P 2D 2E
4 2DP 2COLON 2C 2M
PE3_LCDSEG4 5 3N 3P 3D 3E
PE4_LCDSEG5 6 3DP 3COLON 3C 3M
PE5_LCDSEG6 7 4N 4P 4D 4E
PD0_LCDSEG7 8 4DP 4COLON 4C 4M
PD2_LCDSEG8 9 5N 5P 5D 5E
PD3_LCDSEG9 10 BAR2 BAR3 5C 5M
PB0_LCDSEG10 11 6N 6P 6D 6E
PB1_LCDSEG11 12 BAR0 BAR1 6C 6M
PD1_LCDCOM3 13 COM3
PA6_LCDCOM2 14 COM2
PA5_LCDCOM1 15 COM1
PA4_LCDCOM0 16 COM0
PB2_LCDSEG12 17 6J 6K 6A 6B
PB3_LCDSEG13 18 6H 6Q 6F 6G
PA7_LCDSEG0 19 5J 5K 5A 5B
PE0_LCDSEG1 20 5H 5Q 5F 5G
PD6_LCDSEG20 21 4J 4K 4A 4B
PD7_LCDSEG21 22 4H 4Q 4F 4G
PD4_LCDSEG18 23 3J 3K 3A 3B
PD5_LCDSEG19 24 3H 3Q 3F 3G
25 2J 2K 2A 2B
26 2H 2Q 2F 2G
27 1J 1K 1A 1B
28 1H 1Q 1F 1G

32/48 Doc ID 023645 Rev 1


UM1574 Hardware and layout

4.3.6 STM8AL board solder bridges

Table 8. STM8AL board solder bridges


Bridge State Description

SB1 (Reserved) ON Reserved, do not modify.

SB2 OFF NRST signal of STM32F103C8T6 (ST-LINK/V2) is not connected to GND.


(STM_RST) ON NRST signal of STM32F103C8T6 (ST-LINK/V2) is connected to GND.
MCO clock from STM32F103C8T6 is not connected to PA2 (OSC_IN) of
OFF
SB3 (MCO) STM8AL3L68T.
ON MCO clock from STM32F103C8T6 is connected to PA2 (OSC_IN) of STM8AL3L68T.
SB4, 5 (Reserved) OFF Reserved, do not modify.
ON IDD measurement circuitry and features connected.
SB6, 7, 8
(IDD circuitry) IDD measurement circuitry and features are not connected (freeing PF0, PC4 and
OFF
PE6).
OFF PC5 and PC6 of STM8AL3L68T are free for general purpose I/Os.
SB9, 10
(Xtal 32.768 kHz) PC5 and PC6 of STM8AL3L68T are connected to 32.768 kHz crystal oscillator (if
ON
fitted on board).
NRESET of L99PM62GXP is not connected to STM8AL3L68T Reset pin (external
SB11 OFF
watchdog disable).
(L99PM62GXP
Reset) NRESET of L99PM62GXP is connected to STM8AL3L68T Reset pin (external
ON
watchdog enable).
SB12 (Reserved) ON Reserved, do not modify.
USB5V is distributed on CN3/CN4 connectors (USB5V can drive an external board
ON
SB13, 14 (USB5V) connected to CN3 and CN4).
OFF USB5V is not distributed on CN3/CN4 connectors.
SB15, 16 (Reserved) ON Reserved, do not modify.
1. Default SBx state is shown in bold.

4.3.7 STM8AL board jumpers selection

Table 9. STM8AL board jumpers selection


Jumper State(1) Description

JP1 (Reserved) OFF Reserved, do not modify.


1-2 OFF Ibias measurement selection.
JP2 (IDD)
2-3 ON IDD measurement selection.
JP3 (Reserved) 2-3 Reserved, do not modify.
1. Default jumper state is shown in bold.

Doc ID 023645 Rev 1 33/48


Hardware and layout UM1574

4.3.8 STM8AL board extension connection


Male headers P1 and P2 connectors can connect the STM8AL board to a standard
prototyping/wrapping board. Free GPI/Os of STM8AL3L68T are available on P1.
L99PM62GXP device I/Os are connected to P2.
P1 and P2 can also be probed by an oscilloscope, a logic analyzer or a voltmeter.

Table 10. STM8AL board P1 pinout Microcontroller connectivity


Pin number
Pin number Board pin
STM8AL Type Main function Alternate function
P1 name
MCU

1 GND Digital ground


2 2 NRST I/O Reset PA1
3 45 PC6 I/O Port C6 OSC32_OUT
4 44 PC5 I/O Port C5 OSC32_IN
5 38 PC1 I/O Port C1 I2C1_SCL
6 37 PC0 I/O Port C0 I2C1_SDA
7 10 VDD Microcontroller Digital power supply
5V board power supply (output 5V1 from
8 5V
L99PM62GXP)

Table 11. STM8AL board P2 pinout L99PM62GXP connectivity(1)


Pin
Pin number Board pin
number Type Main function
L99PM62GXP name
P2

3.3 V board power supply


1 3V3
(output 3.3 V from U11 PWR_STM8)
2 20 WU1 I Wake-up input 1
3 28 OUT2 O High-side driver output (7 , typ.)
4 29 OUT1 O High-side driver output (7 , typ.)
5 30 O_HS O High-side driver (1 , typ.)
6 34 REL1 O Low-side driver output (2 typ.)
7 35 REL2 O Low-side driver output (2 typ.)
8 GND Digital ground
9 VBAT I External power supply (12Vdc typ.)
1. For additional information on L99PM62GXP device connectivity, please refer to product datasheet
available at www.st.com.

34/48 Doc ID 023645 Rev 1


UM1574 STM8A-DISCOVERY boards mechanical drawing

5 STM8A-DISCOVERY boards mechanical drawing

5.1 STM8AF board mechanical drawing


Figure 19. STM8AF board mechanical drawing

Doc ID 023645 Rev 1 35/48


STM8A-DISCOVERY boards mechanical drawing UM1574

5.2 STM8AL board mechanical drawing


Figure 20. STM8AL board mechanical drawing

36/48 Doc ID 023645 Rev 1


6 STM8AF board electrical schematics

UM1574
Figure 21. STM8AF board top level
1 2 3 4

CN3
SB13
VBAT 2 1
LIN
4 3
U_ST_LINK SB11
USB5V 6 5
P1 ST_LINK_V2.SCHDOC CANL
8 7
PB0 PB1 MCO CANH
1 2 MCO 10 9
PB2 PB3 STM8AF_USART_RX PA4
A 3 4 PA4 A
PB4 PB5 STM8AF_USART_TX PA5 ST_LINK_SWIM Header F 90 5x2H
5 6 PA5 ST_LINK_SWIM
PB6 PB7 NRST
7 8 NRST
CN4
VDD 9 10
CANH
10 9
Header 5X2 CANL
8 7
SB10
USB5V 6 5
LIN
4 3
SB12
VBAT 2 1
Header M 90 5X2H

GND Test Point U_STM8AF


STM8AF.SchDoc Female

LIN_TX NRST
Doc ID 023645 Rev 1

TP1 LIN_TX NRST


LIN_RX
LIN_RX
ST_LINK_SWIM
ST_LINK_SWIM
TP4 SPI_MISO USB
B SPI_MISO B
TP5 SPI_MOSI MCO
SPI_MOSI MCO
TP3 SPI_SCK
SPI_SCK
TP2 SPI_NSS PA4 STM8AF_USART_RX Male
SPI_NSS PA4
PA5 STM8AF_USART_TX
PA5
CAN_TX PA6
CAN_TX PA6
CAN_RX
CAN_RX
PB0
PB0
P2 PD2 PB1
PD2 PB1
PD4 PB2
1 PD4 PB2
NRST PD7 PB3
2 PD7 PB3
PD7 PB4 P3
3 PB4
PD4 PC1 PB5
4 PC1 PB5 5V 1
PD2 PC2 PB6 WU1
5 PC2 PB6 2
PA6 PC4 PB7 OUT2
6 PC4 PB7 3
PE0 OUT1
7 4

STM8AF board electrical schematics


PE6 PE0 OUT_HS
8 PE0 5
PC4 PE6 REL1
9 PE6 6
PC2 REL2
10 7
PC1
C 11 8 C
12 VDD VBAT 9
Header 12 Header 9
U_CAN_LIN
CAN_LIN.SchDoc

LIN_TX NRST
LIN_TX NRST
LIN_RX
LIN_RX
REL1
REL1
SPI_MISO REL2
SPI_MISO REL2
SPI_MOSI WU1
SPI_MOSI WU1
SPI_SCK OUT1
SPI_SCK OUT1
SPI_NSS OUT2
SPI_NSS OUT2
OUT_HS RevA.0 --> PCB label MB1036 A-00
OUT_HS
CAN_TX RevB.0 --> PCB label MB1036 B-00
CAN_TX
CAN_RX CANH - Add capacitor for consumption delay when step-up start
CAN_RX CANH
CANL - Adjust few values of components
CANL
LIN
D LIN D
STMicroelectronics
Title:
STM8AF BOARD
37/48

Number:MB1036 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 1 of 4


1 2 3 4
Figure 22. STM8AF board ST-LINK/V2 (SWIM only)
38/48

STM8AF board electrical schematics


1 2 3 4

5V
R14 10K R11
100K SWIM

SWIM_RST_IN
A R9 A
Board Ident: PC13=0

SWIM_RST

STM_JTCK
R15 10K 680

SWIM_IN

SWIM_IN
ST_LINK_SWIM

SWIM
SWIM_IN R10 SWIM R21
ST_LINK_SWIM
220 47
Not Fitted 3V

48
47
46
45
44
43
42
41
40
39
38
37
U3 SWIM_RST_IN R13 SWIM_RST R12
NRST
STM32F103C8T6 220 47

PA15/JTDI
VDD_3
VSS_3
PB9
PB8
BOOT0
PB7
PB6
PB5
PB4/JNTRST
PB3/JTDO

JTCK/SWCLK
STM8AF_RESET

C9 C7
20pF X1 20pF 1 36
VBAT VDD_2 3V
3V 1 2 2 35
PC13 VSS_2
3 34 STM_JTMS
8MHz PC14 JTMS/SWDIO
4 33 USB_DP
PC15 PA12
R16 OSC_IN 5 32 USB_DM
OSCIN PA11
100K OSC_OUT 6 31 T_SWO
OSCOUT PA10
B
STM_RST 7
NRST PA9
30 LED_STLINK RC Must be very close to STM32F103 pin 29 B
R17
Doc ID 023645 Rev 1

8 29 MCO
VSSA PA8 MCO
C10 9 28 100
3V VDDA PB15
100nF R19 4K7 AIN_1 10 27 T_JTMS C11
PA0 PB14
SB2 11 26 T_JTCK 20pF
PA1 PB13 R20
R18 4K7 12 25

PB2/BOOT1
PA2 PB12 100 Not Fitted
STLINK_TX

T_SWDIO_IN 5V

VDD_1
VSS_1
PB10
PB11
PA3
PA4
PA5
PA6
PA7
PB0
PB1
JP3 R2
STM8AF_USART_RX 1K
13
14
15
16
17
18
19
20
SWIM_IN 21
22
23
24
PA4 Idd
SB4 3V
PWR
T_NRST
T_JTDO

T_JRST

JP4 LD2
T_JTCK

TX CN2
T_JTDI

SWIM 3V RED
RX
1 3V
STLINK_RX STM_JTCK VDD
PA5 C8 C13 C12 C6 2
SB5 3
STM8AF_USART_TX 100nF 100nF 100nF 100nF STM_JTMS
4
C C
Not Fitted
Close to JP
Not Fitted
LD1
Red
USB5V 5V COM R4 2 1
D1 D2 D3 510

USB BAT60JFILM BAT60JFILM BAT60JFILM LED_STLINK R3 3 4 R1


3V
PWR 510 0
_Green
SB1 USB5V U1 3V LD_BICOLOR_CMS
1

CN1 1 Vin Vout 5


1 R7 1K5 U2
VCC 3V
IO1

GND IO2

2 R8 0 USB_DM ESDA5V3L 3 INH


D- C4 C1
3 R6 0 USB_DP GND BYPASS
D+ 1F_X5R_0603 1F_X5R_0603
4 R5 100K
D ID D
2

GND
SHELL
5
0 C5
LD3985M33R
C3 C2 STMicroelectronics
3

100nF 10nF_X7R_0603 100nF


5075BMR-05-SM Title:
STM8AF BOARD ST-LINK/V2 (SWIM only)

UM1574
Number:MB1036 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 2 of 4
1 2 3 4
Figure 23. STM8AF board MCU

UM1574
1 2 3 4

LD3
PA3 R25
1K
red
A LD7 A
PC3 R29
510
green
ST_LINK_SWIM
STM8AF_USART_RX PA4 LD5
PA4 R27
STM8AF_USART_TX PA5 PD0
PA5 PD2
510
green
PD4
LD4

ST_LINK_SWIM
LIN_TX R26
PD3
LIN_RX
5V 510
PD7 PE0 green
Not Fitted

LIN_RX
LIN_TX
LD6
R24 PE3 R28

PD7

PD4
PD3
PD2

PD0
PE0
PE1
PE2
PE3
10K 510
green
NRST
5V
Close to XTAL & MCU C19

48
47
46
45
44
43
42
41
40
39
38
37
10nF U4
MCO STM8AF5288T User Button 2 R30
B MCO B

PD7
PD6
PD5
PD4
PD3
PD2
PD1
PD0
PE0
PE1
PE2
PE3
SB3 4K7
Doc ID 023645 Rev 1

NRST 1 36 CAN_RX
R23 NRST PG1 CAN_RX
PA1 2 35 CAN_TX PE1
OSCIN/PA1 PG0 CAN_TX
C18 0 PA2 3 34 SPI_MISO SW-PUSH-CMS
OSCOUT/PA2 PC7 SPI_MISO

4
1
20pF 4 33 SPI_MOSI
Vssio_1 PC6 SPI_MOSI
X2 C14 5 32 B2
Vss Vddio_2 VDD
16MHz VCAP 6 31 C36
VCAP Vssio_2
C17 7 30 SPI_SCK
R22 680nF Vdd PC5 SPI_SCK
8 29 PC4 100nF
VDD Vddio_1 PC4 PC4
60 PA3 9 28 PC3
PA3 PC3

3
2
20pF PA4 10 27 PC2
PA4 PC2 PC2
PA5 11 26 PC1
PA5 PC1 PC1
PA6 12 25 SPI_NSS
PA6 PA6 PE5 SPI_NSS

Vdda
Vssa
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
PE7
PE6
5V

13
14
15
16
17
18
19
20
21
22
23
24
L1
VDDA
C VDD C

STM8AF board electrical schematics


User Button 1 R42

PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
BEAD

PE7
PE6
C15 C21 4K7
1uF 100nF
PE6
5V PE2
SW-PUSH-CMS
PB0

4
1
PB1 RV1
PE7 2 B1
PB2 10K C30
PB3
PB4

3
100nF
PB5
PB6

3
2
PB7
VDD

C22 C16 C20


100nF 100nF 100nF
D D
STMicroelectronics
Title:
STM8AF BOARD MCU
Number:MB1036 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 3 of 4
1 2 3 4
39/48
Figure 24. STM8AF board CAN/LIN and 12V
40/48

STM8AF board electrical schematics


1 2 3 4

12V
U5
C23 L99PM62GXP

31
A 220nF A
9 34 REL1
5V 5V1 REL1 REL1

VS
10 35 REL2
5V2 REL2 REL2
NRST 8 30 OUT_HS
NRST NRESET OUT_HS OUT_HS
SB6
SPI_NSS R31 1K 19 29 OUT1
SPI_NSS CSN OUT1 OUT1
SPI_SCK R32 1K 18 28 OUT2
SPI_SCK CLK OUT2 OUT2
SPI_MOSI R34 1K 16 27
SPI_MOSI DI OUT3/FSO
SPI_MISO R33 1K 17 26
SPI_MISO DO OUT4
FLASH Mode
1 23 20 WU1
12V OP1OUT WU1 WU1
2 24 21
OP1- WU2
LIN_TX R36 1K 3 25 22
LIN_TX OP1+ WU3
SB7
JP1 15 7
OP2OUT CAN_Supply 5V CANH
LIN ON 14
OP2-
13 4 CANH SB9
OP2+ CANH
6
B SPLIT B
Doc ID 023645 Rev 1

LIN_RX R35 1K 12 5 CANL R43


LIN_RX RxDL/NINT CANL
FLASH Mode 11 120
TxDL D4
1
12V CANL

AGND
2 3 32 R37 1K

GND
TxDC LINPU
CAN_TX R41 1K 3 CAN_RX R38 1K 2 33
CAN_TX CAN_RX RxDC LIN
BAT60JFILM LIN
LIN
JP2

36

1
CAN ON

U7 U6
1 3 1 3 VBAT
C C1- C2- C1- C2- C
C34 C35 C32 C33
220nF 2 4 220nF 220nF 2 4 220nF
C1+ C2+ C1+ C2+
7 8 SHDN 7 8 SHDN D5 R40
GND SHDN GND SHDN D6 BAT60JFILM 22K
12V
5 6 5 6 SHDN C29
USB5V VCC VOUT VCC VOUT USB5V
220nF SB8
ST662A C25 ST662A BAT60JFILM
220nF C28
C31
C24 10uF/25V R39 220nF
100nF 10K
C27 C26
10uF/25V 10uF/25V

D D
STMicroelectronics
Title:
STM8AF BOARD CAN / LIN & 12V

UM1574
Number:MB1036 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 4 of 4
1 2 3 4
7 STM8AL board electrical schematics

UM1574
Figure 25. STM8AL board top level
1 2 3 4

U_ST_LINK IDD_measurement.SchDoc CN4


ST_LINK_V2.SCHDOC U_Power SB16
VBAT 2 1
MCO LIN
MCO 4 3
STM8AL_USART_RX PC2 IDD_CNT_EN SB15
PC2 IDD_CNT_EN USB5V 6 5
STM8AL_USART_TX PC3 ST_LINK_SWIM IDD_Measurement CANL
PC3 ST_LINK_SWIM IDD_Measurement 8 7
NRST IDD_WAKEUP CANH
A NRST IDD_WAKEUP 10 9 A
Header F 90 5x2H

CN3
CANH
10 9
CANL
8 7
SB13
USB5V 6 5
GND Test Point LIN
4 3
SB14
VBAT 2 1
U_STM8AL U_LCD
STM8AL.SchDoc GH08172_buttons.SchDoc Header M 90 5X2H
TP1
NRST
NRST PD7_LCDSEG21 PD7_LCDSEG21
ST_LINK_SWIM
ST_LINK_SWIM PD6_LCDSEG20 PD6_LCDSEG20
MCO Female
MCO PD5_LCDSEG19 PD5_LCDSEG19
Doc ID 023645 Rev 1

PD4_LCDSEG18 PD4_LCDSEG18
STM8AL_USART_RX PC2
USART1_RX
STM8AL_USART_TX PC3
USART1_TX
B B
TP5 SPI_MISO USB
SPI_MISO
TP4 SPI_MOSI
SPI_MOSI PB3_LCDSEG13 PB3_LCDSEG13
TP3 SPI_SCK
SPI_SCK PB2_LCDSEG12 PB2_LCDSEG12
TP2 SPI_NSS Male
SPI_NSS PB1_LCDSEG11 PB1_LCDSEG11
PB0_LCDSEG10 PB0_LCDSEG10
IDD_CNT_EN
IDD_CNT_EN PD3_LCDSEG9 PD3_LCDSEG9
IDD_Measurement
IDD_Measurement PD2_LCDSEG8 PD2_LCDSEG8
IDD_WAKEUP
IDD_WAKEUP PD0_LCDSEG7 PD0_LCDSEG7
P2
PE5_LCDSEG6 PE5_LCDSEG6
PC0
PC0 PE4_LCDSEG5 PE4_LCDSEG5 3V3 1
PC1 WU1
PC1 PE3_LCDSEG4 PE3_LCDSEG4 2
PC5 OUT2
PC5 3
P1 PC6 OUT1
PC6 4
OUT_HS
1 PE0_LCDSEG1 PE0_LCDSEG1 5
NRST REL1
2 PA7_LCDSEG0 PA7_LCDSEG0 6
PC6 REL2

STM8AL board electrical schematics


3 PD1_LCDCOM3 PD1_LCDCOM3 7
PC5
4 PA6_LCDCOM2 PA6_LCDCOM2 8
PC1
5 PA5_LCDCOM1 PA5_LCDCOM1 VBAT 9
PC0
C 6 PA4_LCDCOM0 PA4_LCDCOM0 C
Header 9
7 VDD
8 5V
Header 8
U_LIN
LIN.SchDoc

PC2 NRST
LIN_RX NRST
PC3
LIN_TX
REL1
REL1
SPI_MISO REL2
SPI_MISO REL2
SPI_MOSI WU1
SPI_MOSI WU1
SPI_SCK OUT1
SPI_SCK OUT1
SPI_NSS OUT2 RevA.0 --> PCB label MB1037 A-00
SPI_NSS OUT2
OUT_HS RevB.0 --> PCB label MB1037 B-00
OUT_HS
- Add capacitor for consumption delay when step-up start
LIN - Adjust few values of components
LIN

D D
STMicroelectronics
Title:
STM8AL BOARD
41/48

Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 1 of 6


1 2 3 4
Figure 26. STM8AL board ST-LINK/V2 (SWIM only)
42/48

STM8AL board electrical schematics


1 2 3 4

3V3
R12 10K R6
100K SWIM

SWIM_RST_IN
A R5 A
Board Ident: PC13=0

SWIM_RST

STM_JTCK
R15 10K 680

SWIM_IN

SWIM_IN
ST_LINK_SWIM

SWIM
SWIM_IN R13 SWIM R21
ST_LINK_SWIM
220 47
Not Fitted 3V

48
47
46
45
44
43
42
41
40
39
38
37
U3 SWIM_RST_IN R14 SWIM_RST R7
NRST
STM32F103C8T6 220 47

PA15/JTDI
VDD_3
VSS_3
PB9
PB8
BOOT0
PB7
PB6
PB5
PB4/JNTRST
PB3/JTDO

JTCK/SWCLK
STM8AF_RESET

C8 C7
20pF X1 20pF 1 36
VBAT VDD_2 3V
3V 1 2 2 35
PC13 VSS_2 PWR_STM8
3 34 STM_JTMS
8MHz PC14 JTMS/SWDIO
4 33 USB_DP
PC15 PA12
R16 OSC_IN 5 32 USB_DM 5V U11 3V3
OSCIN PA11
100K OSC_OUT 6 31 T_SWO 1 Vin Vout 5
OSCOUT PA10
B
STM_RST 7
NRST PA9
30 LED_STLINK RC Must be very close to STM32F103 pin 29 B
8 29 R18 MCO 3 INH
Doc ID 023645 Rev 1

VSSA PA8 MCO C31 C28


C10 9 28 100 GND BYPASS
3V VDDA PB15 1F_X5R_0603 1F_X5R_0603
100nF R20 4K7 AIN_1 10 27 T_JTMS C11
PA0 PB14

4
SB2 11 26 T_JTCK 20pF LD3985M33R
PA1 PB13 R17 C32 C29
R19 4K7 12 25 C30

PB2/BOOT1
PA2 PB12 100 Not Fitted 100nF 10nF_X7R_0603 100nF
STLINK_TX

T_SWDIO_IN

VDD_1
VSS_1
PB10
PB11
PA3
PA4
PA5
PA6
PA7
PB0
PB1
CN2
3V3
1 3V
STM8AL_USART_RX STM_JTCK
2
13
14
15
16
17
18
19
20
SWIM_IN 21
22
23
24
PC2 3 R2
SB5 3V STM_JTMS
4
T_NRST
T_JTDO

T_JRST

JP1 820
T_JTCK

TX
T_JTDI

3V
RX SWIM
STLINK_RX
PC3 C13 C9 C12 C6 LD2 PWR
SB4
STM8AL_USART_TX 100nF 100nF 100nF 100nF RED
C C
Not Fitted
Close to JP
Not Fitted

USB5V 5V LD1
D1 D2 D3 Red
COM R4 2 1
510
USB BAT60JFILM BAT60JFILM BAT60JFILM
PWR
LED_STLINK R3 3 4 R1
3V
SB1 USB5V U1 3V 510 0
1

CN1 1 Vin Vout 5 _Green


1 R9 1K5 U2 LD_BICOLOR_CMS
VCC 3V
IO1

GND IO2

2 R11 0 USB_DM ESDA5V3L 3 INH


D- C4 C1
3 R10 0 USB_DP GND BYPASS
D+ 1F_X5R_0603 1F_X5R_0603
4 R8 100K
D ID D
2

GND
SHELL
5
0 C5
LD3985M33R
C3 C2 STMicroelectronics
3

100nF 10nF_X7R_0603 100nF


5075BMR-05-SM Title:
STM8AL BOARD ST-LINK/V2 (SWIM only)

UM1574
Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 2 of 6
1 2 3 4
Figure 27. STM8AL board MCU

UM1574
1 2 3 4

ST_LINK_SWIM LD3
PE7 R30
820
red
3V3
A A
Not Fitted LD4
PC7 R35
R31 330
10K green
NRST
NRST

C17
Close to XTAL & MCU 10nF
X3
MCO C24 C27
MCO 6.8pF
SB3 6.8pF 1 4

C23 2 3
R33
0 MC306-G-06Q-32.768 (manufacturer JFVNY)
20pF U10 R34
X2 PA0 1
PA0 PE7
48 PE7 0 Must be close to the Crystal and ON
16MHz 2 47 PE6
B NRST/PA1 PE6 IDD_WAKEUP B
Doc ID 023645 Rev 1

C22 3 46 PC7
R32 PA2 PC7
4 45 PC6 PC6
PA3 PC6 PC6
60 PA4 5 44 PC5 SB9 PC5
20pF PA4_LCDCOM0 PA4 PC5 PC5
PA5 6 43 PC4 SB10
PA5_LCDCOM1 PA5 PC4 IDD_CNT_EN
PA6 7 42 PC3
PA6_LCDCOM2 PA6 PC3 USART1_TX
PA7 8 41 PC2
PA7_LCDSEG0 PA7 PC2 USART1_RX
9 40
AVSS VSSIO
10 39
VDD VDD VDDIO VDD
11 38 PC1
VDDA VDDA PC1 PC1
12 37 PC0
R36 VREF+ PC0 PC0
13 36 PD7
VDD VLCD PD7 PD7_LCDSEG21
0 PE0 14 35 PD6
C25 PE0_LCDSEG1 PE0 PD6 PD6_LCDSEG20
PE1 15 34 PD5
1uF PE1 PD5 PD5_LCDSEG19
PE2 16 33 PD4
PE2 PD4 PD4_LCDSEG18
PE3 17 32 PF0
PE3_LCDSEG4 PE3 PF0 IDD_Measurement
PE4 18 31 PB7
PE4_LCDSEG5 PE4 PB7 SPI_MISO
PE5 19 30 PB6
Not Fitted PE5_LCDSEG6 PE5 PB6 SPI_MOSI
PD0 20 29 PB5
PD0_LCDSEG7 PD0 PB5 SPI_SCK
PD1 21 28 PB4 3V3 3V3

STM8AL board electrical schematics


C PD1_LCDCOM3 PD1 PB4 SPI_NSS C
PD2 22 27 PB3
PD2_LCDSEG8 PD2 PB3 PB3_LCDSEG13
PD3 23 26 PB2
PD3_LCDSEG9 PD3 PB2 PB2_LCDSEG12
PB0 24 25 PB1 User Button 1 R45 User Button 2 R48
PB0_LCDSEG10 PB0 PB1 PB1_LCDSEG11
4K7 4K7
STM8AL3L68T
PE1 PE2

SW-PUSH-CMS

SW-PUSH-CMS
4
1

4
1
B1 B2
VDD VDDA C37 C42
L1

BEAD 100nF 100nF


C18 C26 C21 C19 C20
1uF 1uF

3
2

3
2
100nF 100nF 100nF

D D
STMicroelectronics
Title:
STM8AL BOARD MCU
Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 3 of 6
1 2 3 4
43/48
Figure 28. STM8AL board LCD
44/48

STM8AL board electrical schematics


1 2 3 4

A A

LCD
PD7_LCDSEG21 PD6_LCDSEG20
PD4_LCDSEG18 PE0_LCDSEG1
PD5_LCDSEG19 PA7_LCDSEG0
PB3_LCDSEG13
PB2_LCDSEG12
PA4_LCDCOM0
PA5_LCDCOM1

28

27

26

25

24

23

22

21

20

19

18

17

16

15
U6

SEG23

SEG22

SEG21

SEG20

SEG19

SEG18

SEG17

SEG16

SEG15

SEG14

SEG13

SEG12

COM0

COM1
GH08172T

B B
Doc ID 023645 Rev 1

SEG10

SEG11

COM3

COM2
SEG0

SEG1

SEG2

SEG3

SEG4

SEG5

SEG6

SEG7

SEG8

SEG9
10

11

12

13

14
1

9
PA6_LCDCOM2
PD1_LCDCOM3
PB1_LCDSEG11
PB0_LCDSEG10
PE3_LCDSEG4 PD3_LCDSEG9
C PE4_LCDSEG5 PD2_LCDSEG8 C
PE5_LCDSEG6 PD0_LCDSEG7

D D
STMicroelectronics
Title:
STM8AL BOARD LCD

UM1574
Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 4 of 6
1 2 3 4
Figure 29. STM8AL board IDD_measurement

UM1574
1 2 3 4

A A

IDD Measure
VDD

off on

2
1

3
JP2 U8

1
5 MAX9938FEUK+ U9 PF0
3V3 R25 R22
3 1 2
I/O O/I IDD_Measurement
4 4 10K 0 SB6
R23 C C14
3 5
GND VCC 3V3 1uF

2
2(1%)
R24 74H1G66STR
2K(1%)
B B
Doc ID 023645 Rev 1

4
U4
3 5 74LX1G04CTR
3V3
U7 C15

2
1 16 100nF
Q12 VCC 3V3
2 15
Q13 Q10 R26
3 14
Q14 Q8
U5 4 13 10K PC4
Q6 Q9
1 8 5 12
S1 D1 Q5 CLR IDD_CNT_EN
2 7 6 11 SB7
G1 D1 Q7 CI
3 6 PE6 7 10
3V3 S2 D2 Q4 CO
4 5 8 9
G2 D2 IDD_WAKEUP GND CO
SB8
STS4DPF20L M74HC4060TTR C16 R29 R27
R28 1nF 15K 30K
47K

Oscillator frequency 30KHz


C C

STM8AL board electrical schematics


D D
STMicroelectronics
Title:
STM8AL BOARD IDD_Measurement
Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 5 of 6
1 2 3 4
45/48
Figure 30. STM8AL board LIN and 12V
46/48

STM8AL board electrical schematics


1 2 3 4

12V
U12
C33 L99PM62GXP

31
A 220nF A
9 34 REL1
5V 5V1 REL1 REL1

VS
10 35 REL2
5V2 REL2 REL2
NRST 8 30 OUT_HS
NRST NRESET OUT_HS OUT_HS
SB11
SPI_NSS R37 1K 19 29 OUT1
SPI_NSS CSN OUT1 OUT1
SPI_SCK R38 1K 18 28 OUT2
SPI_SCK CLK OUT2 OUT2
SPI_MOSI R39 1K 16 27
SPI_MOSI DI OUT3/FSO
SPI_MISO R40 1K 17 26
SPI_MISO D4 DO OUT4
FLASH Mode
1 23 20 WU1
12V 3V3 OP1OUT WU1 WU1
2 24 21
OP1- WU2
LIN_TX R44 3 BAT60JFILM 25 22
LIN_TX OP1+ WU3
1K
JP3 D5 15 7
OP2OUT CAN_Supply
LIN ON 14
3V3 OP2-
13 4
OP2+ CANH
BAT60JFILM 6
B SPLIT B
Doc ID 023645 Rev 1

LIN_RX R41 1K 12 5
LIN_RX RxDL/NINT CANL
11
TxDL D6

AGND
R43 3 32 R42

GND
12V TxDC LINPU
0 2 33 1K
RxDC LIN
BAT60JFILM LIN
LIN

36

1
U14 U13 VBAT
1 3 1 3
C C1- C2- C1- C2- C
C45 C46 C43 C44
220nF 2 4 220nF 220nF 2 4 220nF
C1+ C2+ C1+ C2+ D8 R46
7 8 SHDN 7 8 SHDN BAT60JFILM 22K
GND SHDN GND SHDN D7 12V
5 6 5 6 SHDN C41
USB5V VCC VOUT VCC VOUT USB5V
220nF SB12
C34
ST662A C38 ST662A BAT60JFILM
220nF C39 10uF/25V R47 C40
100nF 10K 220nF
C36 C35
10uF/25V 10uF/25V

D D
STMicroelectronics
Title:
STM8AL BOARD LIN & 12V

UM1574
Number:MB1037 Rev: B.0(PCB.SCH) Date: 10/3/2012 Sheet 6 of 6
1 2 3 4
UM1574 Revision history

8 Revision history

Table 12. Document revision history


Date Revision Changes

15-Nov-2012 1 Initial release.

Doc ID 023645 Rev 1 47/48


UM1574

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 STs 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 STS 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 TWO AUTHORIZED ST REPRESENTATIVES, 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 USERS 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.

2012 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

48/48 Doc ID 023645 Rev 1

Das könnte Ihnen auch gefallen