[STM8S001J3] Reference design for 8-pin STM8

Document created by Szymon Panecki Moderator on Aug 2, 2017Last modified by Szymon Panecki Moderator on Aug 11, 2017
Version 5Show Document
  • View in full screen mode

About this project

Dear STM8 Community,

 

STMicroelectronics recently extended STM8 family with STM8S001J3, which is a first STM8 MCU in a small 8-pin package (SO8N). A short introduction to this new STM8 member you can find here.

Following by introduction of STM8S001J3, we would like to demonstrate you how easy is to design a hardware with this new MCU. Below project consists of MCU board described in a first part of document and extension baord described in second part of document.

 

Project info

Type : Reference project, evaluation board

Progress : Completed

Difficulty : Easy 

License : Open-source

 

Hand tools and fabrication machines

Soldering station, tweezers.  

MCU baord - Story

1. Pinout

 

Let’s start with having a look at the pinout. Package of STM8S001J3 provides 8 pins in total.

2. Power supply

 

Three of pins from STM8S001J3 pinout are related to power supply domain of MCU. These pins are VCAP, VDD/VDDA and VSS/VSSA.

 

VDD/VDDA (pin 4) and VSS/VSSA (pin 2) are pair of pins responsible for delivering power to MCU. It is allowed to apply to them voltage in a range of 3.00 – 5.5V. This voltage is used to supply directly some of resources of MCU (like I/O pins and analog peripherals). It is also used as an input voltage for internal voltage regulator, which generates on output 1.8V provided to the core. For purpose of supply voltage decoupling it is recommended to use 1x 100nF capacitor and 1x 1-2uF capacitor in parallel. These capacitors (especially 100nF) should be placed as close as possible to supply pins.

 

VCAP (pin 3) is a pin connected to internal voltage regulator output. It is used to stabilize regulator with external capacitor. As a result a pull-down capacitor (with minimum value 470nF) should be connected to this pin.

 

3. Reset management

 

STM8 devices typically have a reset pin. Comparing to them, new STM8S001J3 is not equipped with this pin, due to the small number of pins provided by the SO8N package. There is only an initial reset coming from POR (Power On Reset). As a result no action has to be taken by hardware designer.

 

4. Debugging

 

STM8 MCUs uses a single pin debugging interface named SWIM (Single Wire Interface Module). STM8S001J3 also embeds this solution. SWIM pin (pin 8) has to be connected directly (together with VDD and GND pins) to programming/debugging probe like ST-Link/V2. No external circuitry (including serial/pull-down/pull-up resistors) connected to this is needed.

 

5. Clock management

 

STM8S001J3 like all MCUs from STM8 family can use internal RC clocks to keep the MCU (core memory, all peripherals) running. These are HSI (High Speed Internal) 16MHz and LSI (Low Speed Internal) 128kHz. If system’s designer decide to use these clock sources, than nothing has to be taken into account in hardware design. Alternatively it is possible to use external clock source, which can be applied to OSCIN pin (pin 1). This clock source can have a form of oscillator and both crystal and resonator are not allowed.

 

6. Schematics

 

Based on all guidelines mentioned above we are in position now to draw a simple schematics with STM8S001J3 MCU and minimum number of components around it:

 

  • VDD/VDDA pin connected to 3.3V
  • VSS/VSSA pin connected to GND (0V) •
  • 1uF and 100nF capacitors connected between VDD/VDDA pin and GND
  • 1uF capacitor connected between VCAP pin and GND
  • Two pin headers connected to MCU’s pins, which allow easy integration of MCU with external components of the system, for example by using breadboard

7. Layout

 

Based on schematics we can design a layout. MCU is located in center position of PCB. Capacitors are placed as close as possible to supply pins and VCAP pin. They are housed in SMD 0805 package. On the left and right side of PCB there are pin headers with pitch 2.54 mm.

 

The complete BOM (Bill Of Materials) consists of PCB, MCU, 3 capacitors and 2 pin headers.

 

After assembly process we finally get a board with STM8S001J3, which we can use for purpose of evaluation, prototyping or even final application.

 

 

Extension baord - Story

MCU board described above can be inserted into breadboard, so additional components of application can be easily connected to it and user can built a prototype system. An alternative solution for breadboard is a dedicated extension board. Below we demonstrate an example design of such extension board.

 

1. UART connectivity

 

One of peripherals embedded in STM8S001J3 is a UART interface. A popular solution used for UART evaluation is UART-USB bridge. Thanks to such device a UART data can be easily transferred between MCU and PC, in both directions.

 

For purpose of this project a FTDI FT230XS device was selected to act as a UART-USB bridge. In typical schematics USBDP and USBDM pins are connected by serial resistors to USB connector. Additionally TXD and RXD pins are connected directly to MCU. Supply voltage equal to 5V comes directly from USB connector. Pull-down capacitors guarantee proper decoupling of this voltage.

 

2. Power supply for MCU

 

A very useful feature offered by some of evaluation boards is selecting of supply voltage applied to MCU, because different systems can require different supply voltage. Taking into account range of supply voltage, which can be applied to STM8S001J3 (from 3 to 5.5V) it is clear, that for this device the most interesting supply voltage levels are 3.3V and 5V, as both of them are very popular. 5V is available directly from USB connector (USB acts as a supply source for whole board). 3.3V is also available, because it is generated on 3V3OUT pin of FT230XS. As a result without any design effort, only by using a simple jumper it is easy to add in the board a feature to change MCU’s supply voltage level.

 

3. LEDs

 

Each evaluation board provides user LEDs. STM8S001J3 has only 5 GPIOs, so it makes sense to connect LED to each of them. Four LEDs together with serial resistors can be connected between GPIOs and GND. Exception has to be made for one GPIO, which is PB4. This pin can work only in Open drain configuration, which means that it can’t set high logical state. For this reason LED with serial resistor has to be connected between GPIO and VDD.

 

4. User push-button

 

Another popular feature of evaluation boards are user push-buttons. One such button was also used in this extension board. It is connected to pin on one side and to GND on the other side. Between pin and button there is a pull-up resistor, which sets default high state on the pin, while pressing the button changes this state to low.

 

5. Current measurement circuitry

 

Many of applications need to meet defined power budget. This means, that MCU has to consume specific amount of current or less. For this purpose many of evaluation boards provide a solution, which allows to measure this current. In this case a simple jumper was used, which is a bridge between 3.3V/5V and MCU’s VDD. When the jumper is removed, an ammeter can be attached instead.

 

6. MCU connector

 

The goal of this evaluation board is to serve as extension board for MCU board introduced in the first part of this document. As a result it is necessary to add to the board a connector, which will allow easy assembly of MCU board.

 

7. Pin connectors

 

Evaluation board typically provides pin connectors, which allow to connect additional components to MCU. This board also provides such connectors. These are: 6-pin GND connector, 6-pin 3.3V connector, 6-pin 5V connector and 5-pin GPIO connector. Additionally there is a connector with SWIM debugging/programming interface.

 

8. Jumpers

 

Extension board embeds UART connectivity, user LEDs and user push-button. As STM8S001J3 has only 5 GPIOs, components mentioned before are connected to the same pins of MCU. In order to use all of these features, a jumpers were used, so UART, LEDs and push-button can be easily connected to MCU or disconnected from MCU.

 

9. Schematics & layout

 

Schematics and layout of PCB, which takes into account all of the features listed above, can look like this:

10. Picture

 

Below photo shows a complete development kit, which contains extension board and MCU board together:

CAD - Enclosures and custom parts

Please find CAD files (created in EAGLE software) of the schematics and layout attached.

In case you would like to know more about guidelines related to hardware design based on STM8S, please refer to STM8S001J3 datasheet or dedicated application note AN2752.

1 person found this helpful

Outcomes