Home

UM0970 User Manual - STMicroelectronics

image

Contents

1. 5075BMR 05 SM USB z 22852 zl s s 7 u Bil der fey 2 0 0 T feka fea eile lan Joo len Co C8 ES STM32F103C8T6 3V3 ZE E 3V3 8MHz 1 gt a 5 36 2 VBAT VDD 2 55 vss 2 susee 3 JTMS 24 5 SWIM PULLUP _ 4 33 USB DP PCIS PAI2 5 OSC IN 5 32 USB DM OSC IN ies OSC OUT 6 T 31 1 RX OSC OUT PALO XL H3V3 AM SIM RST T sT Pag jae UL TX ST LINK LED US 1 37 VERA 2 10 150 Sic 27 EJIMS M25 CS II 26 T JTCK un 2 rey E LC mn MAL U2 TX 9 PBI2 Ha 20 9 in a 5 Ja anamma AA A AAA gt gt SIRS 7 7 7 e e ra ESIC Ie ls 10 o 3V3 EXT 5V D7 aoe 05 BAT60JFILM CNI vec H 22 D d USB_DP ID 22 GND 0 R2 SHELL 100K 100 ST LINK SWIM RESET gt 3V3 RE gt x R10 i 680 el SWIM IN RIS SWIM ES ANY NW ET SS _stJtck SWCLK SB6 585 SWIM RST IN SWIM RST A 588 8587 _sm Jtius SWDIO SB10 SB9 RII DISCOVERY 10K d ST LINK CN3 2 Jumpers gt DISCOVERY Selected Jumpers OFF gt
2. 26921 06 70 6 Electrical schematics Figure 14 STM8L DISCOVERY 3 3 PAO RST PAZ PA3 5 1 D 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 19 IDD EN IDD Measurement IDD WAKEUP RESET ST LINK SWIM IDD CNT EN ST_LINK SCHDOC IDD_Measurement UD IDD WAKEUP GH08172 buttons SchDoc U Power PC3_LCDSEG23 gt PC2_LCDSEG22 PD7_LCDSEG21 PD6_LCDSEG20 PD 5 LCDSEGI9 PD4 LCDSEGI8 PB7 LCDSEGI7 PB6 LCDSEGI6 5 LCDSEGIS PB4 LCDSEGI4 PB3 LCDSEGI3 PB2 LCDSEGI2 LCDSEGII 0 LCDSEGIO PD3 LCDSEG9 PD2 LCDSEG8 PDO LCDSEG7 PES LCDSEG6 4 LCDSEGS LCDSEG4 PE2 LCDSEG3 PE LCDSEG2 0 LCDSEGI PA7 LCDSEGO PDI LCDCOM3 PA6 LCDCOM2 PAS LCDCOMI PA4 LCDCOMO IDD measurementSchDoc 1 ST LINK U Power IDD CNT EN RESET ar IDD_Measurement ST_LINK_SWIM EXT SV IDD_WAKEUP 5 EXT 3V3 3 3 MCU SchDoc U_MCU PC3_LCDSEG23 4 2 PA 0 7 PC2 LCDSEG22 1 gt PB 0 7 PD7 LCDSEG21 hl gt PC 0 7 PD6 LCDSEG20 gt PD 0 7 PDS LCDSEGI9 2 0 7 PD4 LCDSEGI8 Dm gt PFO PB7 LCDSEGI7 PB6_LCDSEG16 PBS LCDSEGIS SS 4 LCDSEGIA4 PB3 LCDSEGI3 2 RESET PB2_LCDSEG12 gt ST_LINK_SWIM LCDSEGII PB0 LCDSEGIO Dm PD3 L
3. P3 Header Doc ID 17693 Rev 2 0 0970 Hardware and layout Figure 3 layout D1 diode D2 diode LD1 power COM 4 a zo BBB ze Ro RG EE ST Link Sz i CN2 SWIM connector E E CN3 ST Link Discovery C9 B 5 selector 1 LE 4 U3 R17 LCD 24 segment Inn ve 12 IDD module ae n a i 2 m LN RIOR JP1 TOO 156 measurement 5 power supply 3 3V power supply input input x Cis mi IB rat Sud 82 5 1 2 7 Mp Rr 2 2 X2 crystal R25 UB amp y _ E e e ip STM8L152C6T6 a m e e 3 e 82 B1 Reset button e User button reset user e LD3 9 D LED blue ai 5 wee ooo ky Doc ID 17693 Rev 2 7 30 Hardware and layout 0 0970 Figure 4 Bottom layout 583 5 7 9 32 RESERVED 915 584 6 8 10 DEFAULT se 5 11 12 14 IDD_Measurement P2 connector 0600000 2 1
4. Re 13 36 VLCD PD De 2 2 lt 0 LCDSEGI rr 5 PD6 LD3 5 R28 PE7 AA MW 330 green LD4 R29 ZA 660 blue 9217 o 6 8pF 1 4 6 8pF MC306 G 6Q 32 768 manufacturer U8 R27 48 TET 0 Must be close to the Crystal and ON PAI IDD WAKEUP 46 __ 7 i A PA2 PC7 ip lt 45 PC6 25 75 6 44 PCS SB13 S PA4 PCS 733 3V3 PAS PC4 42 IDD CNT EN PA6 PC3 al PC3 LCDSEG23 VDDA PCI VREF en EED PA7 2 70 PC2_LCDSEG22 AVSS VSSIO 39 VDD VDDIO VDD MCU User Button User 5 17 PD7 LCDSEG21 34 PDS PD6 LCDSEG20 gt PEI PDS gt PDS LCDSEGI9 PE2 PD4 3 PD4_LCDSEGI8 gt eae PE3 PFO 31 PBT IDD_Measurement gt 9 9 4 PB So PB7 LCDSEGI7 5 PB6 opg PB6 LCDSEGI6 gt PDO PBS 53 pey PBS LCDSEGIS gt PDI 7 pn PB4 LCDSEGI4 2 PB3 s pa LCDSEGI3 26 __ 2 lt PB2 55 PBI LCDSEGII gt STMSLIS2C6T6 n VDDA BEAD 615 100nF STMicroelectronics Title STM8L DISCOVERY MCU Number MB915 Re 2 5 Date 7 15 2010 Sheet4 of 25 221 120 3 02601 26921 06 82 Figure 18 ST Link SWIM only R9 e
5. is only connected to P2 B2 USER On PC1 is connected to P2 and push button B2 for user 1 Default state is in bold type 16 30 Doc ID 17693 Rev 2 0 0970 Hardware and layout 3 8 LCD 24 segments 4 commons This LCD allows the STM8L152C6T6 to display any information on six 14 segment digits and 4 BARs using all COMs See the LCD segment mapping in Figure 12 and pin connections in Table 5 Note This LCD also supports six 8 segment digits by only using COMO 1 This configuration allows COM2 and to be used as I O ports In this case the 2 LCD pins must not be plugged into the LCD socket To proceed with this configuration remove the LCD carefully slightly open the COM2 pins 13 pin 14 of the LCD then replug it in the socket Characteristics overview 24 segments and 4 commons e Drive method multiplexed 1 4 duty 1 3 bias Operating voltage 3 V Operating temperature 0 to 50 C Connector 28 pin DIL 2 54 mm pitch Note When the LCD is plugged all I O ports listed in Table 5 are unavailable To use one of these as I O you must remove the LCD Figure 12 LCD segment mapping 1 2 3 4 5 6 ANDAN ANIAN IAN UNT 2 b 5 b Ne M PA FA 2 ZA GOLON BAR1 E
6. 12 bit DAC i ym gare TT gt SEGx Za vio LCD booster 10 30 Doc ID 17693 Rev 2 0 0970 Hardware and layout 3 2 Note Embedded ST Link The ST Link programming and debugging tool is integrated on the STM8L DISCOVERY The embedded ST Link can be used in 2 different ways according to the jumper states see Table 2 e to program debug the MCU on board e to program debug an MCU in an external application board using a cable connected to SWIM connector CN2 For information about debugging and programming features refer to ST Link UM0627 UM0627 contains information about all the ST Link features Usage this situation is restricted to STM8 devices and SWIM support Figure 7 Typical configuration Hardware requirements USB cable type A to mini B Computer with Windows 2000 XP or Vista OS Development toolchain IAR Embedded Workbench for STM8L STMicroelectronics ST Visual Develop STVD Table 2 Jumper states Jumper state Description Both CN3 jumpers ON ST Link functions enabled for on board programming default ST Link functions enabled for external application through CN2 Both CNS jumpers OFF connector SWIM supported Doc ID 17693 Rev 2 11 30 Hardware and layout 0 0970 3 2 1 3 2 2 12 30 Using the ST Link to program debug the STM8L on board To program the STM8L on board simply plug in the two ju
7. When jumper JP1 is removed the current consumption of the STM8L152C6T6 can be measured by connecting an ammeter between jumper JP1 pin 1 and 2 For Ipp measurement by the MCU itself the circuit below is implemented on the STM8L DISCOVERY Solder bridges SB11 SB12 and SB14 must be closed and a jumper must be plugged between JP1 pin 2 and pin 3 Figure 10 STM8L DISCOVERY lpp measurement circuit IDD VDD_MCU off _ U4 MAX9938FEUK us R18 R17 ct 3 13 vo ANY ANY IDD Measurement gt 1 10K __ 0 SB 2 d a GND VCC TY 3V3 74 100666 30 5 ar TI 3V3 6 TA 5 3 IDD_WAKEUP gt G srrsPrz2ov ent Ni ST TSE 5812 E Em U7 U3 C12 3V3 R19 100nF ATK 7ALXIGO4CTR 1 012 16 He WE Lo je 4 13 10K 4 5 96 99 2 5 05 CLR SB14 IDD EN gi 10 av 9 74 4060 13 R23 InF 15K 330K ooo SES oog Hi N Oscillator frequency 30KHz 3 6 1 3 6 2 14 30 Run mode In Run mode lpp current is measured using the operational amplifier MAX9938FEUK U4 connected to the 2 shunt resistor R20 In this case IDD_CNT_EN remains high during measurement so R21 remains in short circuit during the measurement because of transistor T1 which remains ON permanently The jumper JP1 must be connected between pins 2 and
8. LCD_SEG22 12 38 PC1 Port C1 PC1 4 I2C1_SCL 13 37 PCO PCO 4 2C1 SDA 36 PD7 Port D7 PD7 TIM1_CHIN LCD_SEG21 2 ADC1_IN7 RTC_ALARM VREF_OUT COMP1_INP LCD_SEG21 35 PD6 Port D6 PD6 TIM1 BKIN LCD SEG20 2y ADC1_IN8 RTC_CALIB VREF_OUT COMP1_INP LCD_SEG20 34 PD5 Port D5 PD5 TIM1 CH3 LCD SEG19 2y ADC1 IN9 COMP1 LCD 5 19 33 PD4 Port D4 PD4 TIM1_CH2 LCD_SEG18 2 ADC1_IN10 COMP1_INP LCD_SEG18 32 PFO Port FO PFO ADC1 IN24 DAC OUT 9 40 GND Doc ID 17693 Rev 2 Ground 21 30 Extension connection 0 0970 Table 8 Pin number P3 Pin number STM8L 22 Pin name PD2 Main function Port D2 Alternate function PD2 TIM1_CH1 LCD_SEG8 2 ADC1_IN20 COMP1_INP LCD U5 LCD SEG8 23 Port D3 PD3 TIM1 TRIG LCD SEG9 2 ADC1_IN1 9 COMP1 INP LCD SEG9 24 PBO Port 2 1 LCD_SEG10 2 ADC1_IN18 COMP1_INP LCD_SEG10 25 1 Port B1 1 1 LCD SEG11 2 1 IN17 COMP1 INP LCD SEG11 26 PB2 Port 2 2 2 CH2 LCD SEG12 2 ADC1_IN16 COMP1_INP LCD SEG12 27 PB3 Port P
9. Ti 0 0970 J User Manual STM8L DISCOVERY Introduction STM8L DISCOVERY helps you to discover the STM8L ultralow power features and to develop and share your applications It is based on an STM8L152C6T6 and includes an ST Link embedded debug tool interface LCD 24 segments 4 commons LEDs and push buttons Figure 1 STM8L DISCOVERY board Eu TA RIS 1 vw w st com stm8l discovery June 2011 Doc ID 17693 Rev 2 1 30 www st com Contents 0 0970 Contents 1 UIC Start anne it eine ee i ls tr ic 3 1 1 Getting started RM 3 1 2 System requirements 3 1 3 Development toolchain 4 1 4 Demonstration software 4 1 5 Order COOS a s dae E Robb EY Fe ees 4 2 ul M rrr 5 3 Hardware and layout 6 3 1 STM8L152C6T6 microcontroller 9 3 2 Embedded STLINK aten ear dace d E e eed de 11 3 2 1 Using the ST Link 10 program debug the STM8L on board 12 3 2 2 Using the ST Link to program debug an external STM8L application 12 3 3 Power supply and power selection 13 3 4 BEDS E E EE 13 3 5 PUSMIDUTIONS MUTET 13 3 6 Built in IDD measurement circuit 14 3 6 1 RUN MODS ic nem Mo ne
10. ST LINK Selected Wired on Solder Side LDI ST LINK LED R8 AA l 510 RED PWR DI 5V LD1117S33TR BAT60JFILM LD2 oen va 2 NW RED paek toi C2 10uF 10uF 100nF 3V3 EXT 3V3 gt STMicroelectronics Title STM8L DISCOVERY ST LINK SWIM only Number MB915 Rev B 2 PCB SCH Date 7 15 2010 Sheet5 of 0 60 25 e21129 3 Revision history 0 0970 7 29 30 Revision history Table 9 Document revision history Date Revision Changes 24 Sep 2010 1 Initial release 15 Jun 2011 2 Section 5 Mechanical drawing added Note added to Section d d measurement range added to Section 3 6 1 and Section 3 6 2 Doc ID 17693 Rev 2 0 0970 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 impl
11. STM8L name function Alternate function LCD U5 PE5 LCD_SEG6 2 ADC1_IN23 16 19 PE5 Port E5 COMP2 INP LCD SEG6 1 INP PDO TIM3 CH2 ADC1_TRIG 3 LCD_SEG7 2 17 20 PDO Port DO ADC1_IN2 2 LCD_SEG7 COMP2_INP COMP1_INP PD1 TIM3_TRIG LCD_COM3 2 18 21 PD1 VO 01 ADC1 21 LCD COM3 2 INP 1 INP 19 9 40 GND Ground Table 7 P2 pinout Pin number Pin number 5 P2 STM8L Pin name function Alternate function LCD U5 5 Volts board power 1 5V supplied or supply external application when USB connected 2 3 9 40 GND Ground 4 48 PE7 Port E7 PE7 LCD_SEG27 2 PE6 LCD_SEG26 2 5 47 PE6 Port PVD IN PC7 LCD_SEG25 2 ADC1 IN3 6 46 PC7 Port C7 COMP2 INM 1 INP PC6 OSC32 OUT 7 45 PC6 Port C6 SPl1 SCKJ 3 USART1_RX 3 PC5 OSC32_IN 8 44 PC5 VO Port C5 5 _ 55 3 USART1 TX 3 PC4 USART1_CK 3 12C1_SMB CCO 9 43 PC4 PortC4 LCD SEG24 2 ADC1 INA COMP2 INM 1 INP Doc ID 17693 Rev 2 20 30 0 0970 Extension connection Table 7 P2 pinout continued Pin number P2 Pin number STM8L 42 Pin name PC3 Main function Port C3 Alternate function PCS USART1 TX 3 LCD SEG23 2 ADC1 IN5 COMP1 INP 2 LCD U5 LCD SEG23 41 PC2 Port C2 PC2 USART1_RX 3 LCD SEG22 ADC1_IN6 COMP1_INP VREF_OUT
12. 3 of JP1 The measurement range in this case can be up to 30 mA Low power mode In Low power modes Halt or Active halt Ipp current is measured using the operational amplifier MAX9938FEUK U4 connected to the 2KQ shunt resistor R21 controlled by the analogue switch STT5PF20V 1 In this case the counter 74HC4060 U3 enabled by IDD_CNT_EN manages the measurement timing according to Figure 11 The measurement range in this case can be up to 30 Doc ID 17693 Rev 2 437 0 0970 Hardware and layout 3 6 3 Figure 11 MCU mode Low power mode lpp measurement principle The principle used to measure a current when the STM8L152C6T6 is in Low power mode is 1 Configure ADC to measure voltage on the IDD Measurement Configure PE6 to serve as wakeup pin Enter Low power mode after setting IDD_CNT_EN PC4 signal low IDD_WAKEUP rising edge wakes up the MCU after around 300 ms Start ADC conversion as soon as possible after wakeup in order to measure the voltage corresponding to Low power mode on capacitor C11 6 Reset the counter by programming IDD_CNT_EN high in less than 70 ms after the wakeup to avoid the R21 2 KQ resistor being connected later in Run mode OF The measurement timing is given in Figure 11 In Low power modes the 2 resistor is connected when T1 goes off after entering Low power mode Q13 output of the counter allows connection of the 2 resistor when the current Ipp becom
13. JP1 IDD SB13 15 crystal 5817 B2 USER 5 16 1 8 30 Doc ID 17693 Rev 2 0 0970 Hardware and layout 3 1 STM8L152C6T6 microcontroller This 8 bit ultralow power MCU has 32 KB Flash 2 KB RAM 1 KB data EEPROM RTC LCD timers USART 2 SPI ADC DAC and comparators Figure 5 STM8L152C6T6 package STM8L152C6T6 8 bit microcontroller offers 7 wu 32 Kbytes of Flash memory Fag 2 Kbytes RAM LQFP48 e 1 Kbytes EEPROM LQFP48 7 x 7mm This device provides the following benefits Ultralow power proprietary 130 nm technology Speed and power consumption independent of MCU power supply Ultralow leakage Ultralow power design clock gating low power Flash with power off capability Reduced overall Run and Wait mode current consumption by turning off clocks of unused peripherals or Flash Sub 1 hardware RTC and AWU system unit Ultralow power modes for applications requesting regular wake up Range of Low power modes up to 4 Suitable for many applications from complete switch off to continuous monitoring at ultralow frequency Advanced and flexible clock system multiple internal and external clock sources Switch and adjust frequency and clock sources on the fly depending on application needs Direct memory access on board 4 channel DMA Autonomy for peripherals independent from core can switch off Flash mem
14. Pin number STM8L Board name E 3V3 Main function Alternate function 3 3 V board power supplied or supply external application when USB connected LCD U5 Port AO PAO USART1_CK 3 SWIM BEEP IR 7 9 40 GND Ground PA1 PA2 Reset Port 2 NRST PA1 1 PA2 OSC IN USART1 TX 3 SPI1_MISO 3 PA3 4 Port Port A4 PA3 OSC_OUT USART1 _RX 3 SP 1 MOSIJ 3 4 2 BKIN LCD COMO 2 ADC1 IN2 COMP1 INP LCD COMO 5 Port A5 BKIN LCD_COM1 2 ADC1_IN1 COMP1_INP LCD COM PA6 PA7 Port A6 Port A7 PA6 ADC1_TRIG 3 LCD _COM2 2 ADC1_INO COMP1_INP PA7 LCD SEGO 2 4 LCD COM2 LCD SEGO PEO Port EO PEO 4 LCD SEG 2 LCD PE1 Port E1 1 CH2N LCD SEG2 2 LCD SEG2 PE2 Port E2 2 CH3N LCD SEG3 2 LCD 5 14 17 PES Port PE3 LCD SEG4 2 LCD SEG4 15 18 4 Port E4 PE4 LCD SEG5 2 LCD SEG5 Doc ID 17693 Rev 2 ky 0 0970 Extension connection Table 6 P1 pinout continued Pin number Pin number Board 8 Main P1
15. SCH PCB Date 7 15 2010 Sheet2 of 5 25 221 120 3 02601 26921 06 92 Figure 16 IDD VDD MCU 3V3 2 1 4 MAX9938FEUK 3 2 Ue R18 R17 L VO 2 AW NW SBI IDD Measurement 5 5 10K 11 0 4 _ e vec luF AES 3V3 74H1G66STR PE6 3V3 SB12 IDD WAKEUP U7 U3 C12 3V3 R19 74LX1G04CTR 1 012 503 010 04 08 4 d 69 4 al Q5 CLR IDD_CNT_EN Saal Q7 co 11 GND 4 4060 R23 30K Oscillator frequency 30KHz STMicroelectronics Title STM8L DISCOVERY IDD_Measurement Number MB915 Rev B 2 SCH PCB Date 7 15 2010 Sheet 3 0 60 25 291419913 06 42 26921 01200 Figure 17 STM8L MCU ST_LINK_SWIM RESET Must be close to the Crystal and ON PD 0 7 0 7 gt PFO gt kj Fitted C20 il 20 m x2 SBI C19 R24 50 20 lt PA4 LCDCOMO 5 LCDCOMI PA6 LCDCOM2 7 LCDSEGO PEI LCDSEG2 lt PE2 LCDSEG3 lt LCDSEG4 lt 4 LCDSEGS PES LCDSEG6 lt PDI LCDCOM3 lt PD2_LCDSEG8 lt 0 LCDSEGIO VDD MCU ECB 10082 10052 C16
16. cl LI gt X Doc ID 17693 Rev 2 17 30 Hardware and layout UM 0970 18 30 Table 5 LCD connections STM8L152C6T6 LCD Pin name Pin COM3 COM2 COM1 COMO PA7_LCDSEGO 1 1 10 PEO LCDSEG 1 2 1DP 1COLON 1 1 PE1_LCDSEG2 3 2N 2P 2D 2E 2 LCDSEG3 4 2DP 2COLON 2C 2M LCDSEG4 5 3N 3D 4 LCDSEG5 6 3COLON 3C 3M PE5 LCDSEG6 7 4N 4P 4D 4E PDO_LCDSEG7 8 4DP 4COLON 4C 4M PD2_LCDSEG8 9 5N 5P 5D 5E PD3_LCDSEG9 10 BAR2 BAR3 5C 5M PBO_LCDSEG10 11 6N 6P 6D 6E PB1 LCDSEG 11 12 BARO BAR1 6C 6M PD1 LCDCOM3 13 COM3 PA6_LCDCOM2 14 COM2 LCDCOM 1 15 COM1 PA4 LCDCOMO 16 COMO PB2 LCDSEG12 17 6J 6K 6A 6B PB3_LCDSEG13 18 6H 6Q 6F 6G PB4 LCDSEG14 19 5J 5K 5A 5B PB5 LCDSEG15 20 5H 5Q 5F 5G PB6_LCDSEG16 21 4J 4K 4A 4B PB7_LCDSEG17 22 4H 4Q 4F 4G PD4 LCDSEG18 23 3J 3K 3A 3B PD5 LCDSEG19 24 3H 3Q 3F 3G PD6 LCDSEG20 25 2J 2K 2A 2B PD7_LCDSEG21 26 2H 2Q 2F 2G PC2_LCDSEG22 27 1J 1K 1A 1B PC3_LCDSEG23 28 1H 1Q 1F 1G Doc ID 17693 Rev 2 Extension connection 0 0970 4 19 30 Extension connection Male headers P1 P2 and P3 can connect the STM8L DISCOVERY to a standard prototyping wrapping board GPI Os of STM8L152C6T6 are available on it P1 P2 and P3 can also be probed by an oscilloscope logical analyzer or voltmeter Table 6 P1 pinout Pin number P1
17. 6 microcontroller 32 KB Flash 2 1 KB EEPROM 48 pin LQFP On board ST Link with selection mode switch to use the kit as a stand alone ST Link with SWIM connector for programming and debugging Two red LEDs LD1 for USB communication LD2 for 3 3 V power on Designed to be powered by USB or an external supply of 5 V or 3 3 V Can supply target application with 5 volts and 3 volts Two user LEDs LD3 and LD4 green and blue Two push buttons User and Reset current measurement LCD 28 pin DIP 24 segments 4 commons Extension header for all 48 for quick connection to prototyping board for easy probing Doc ID 17693 Rev 2 5 30 Hardware and layout 0 0970 3 6 30 Hardware and layout STM8L DISCOVERY is designed around the STM8L152C6T6 microcontroller in 48 pin LQFP package Figure 2 illustrates the connections between the STM8L152C6T6 and its peripherals ST Link push button LED LCD and connectors Figure 3 and Figure 4 help you to locate these features on the STM8L DISCOVERY Figure 2 Hardware block diagram Mini USB Embedded ST LINK SWIM STM8L152C6T6 1 LD3 Green LED B1 RST Blue LED LD4 B2 USER IDD measurement P2 Header LCD 24 segments 4 commons
18. B3 TIM2_TRIG LCD_SEG13 2 ADC1_IN15 COMP1_INP LCD_SEG13 28 PB4 Port B4 PB4 SPI1_NSS 3 LCD SEG14 2 ADC1_IN14 COMP1_INP LCD_SEG14 29 30 PBS PB6 Port B5 Port B6 PB5 SPI1_SCK 3 LCD SEG15 2 ADC1_IN13 COMP1_INP PB6 SPI1_MOSI 3 LCD_SEG16 2 ADC1_IN12 COMP1_INP LCD_SEG15 LCD_SEG16 31 PB7 Port B7 PB7 SPI1_MISO 3 LCD_SEG17 2 ADC1_IN11 COMP1_INP LCD_SEG17 Doc ID 17693 Rev 2 0 0970 Mechanical drawing Mechanical drawing Figure 13 STM8L DISCOVERY 5 64879 STEL Ss _ uw cZ G 600 46 0000600000060000006 LET e BB e eam Mie ek e Em af ee A 2 mm 2 mem a N m o ie Sa e le e P e HH e 2 5 m om m e e N d t Be a e e foo a 8 r z mu 2206 E 000000000000000000 6879 6 35 mm 5 08 45 72 Cmm Doc ID 17693 Rev 2 mm 5 B5 mm 6 23 30
19. CDSEG9 PD2_LCDSEG8 PDO LCDSEG7 PES LCDSEG6 i PE4_LCDSEG5 IDD_Measurement PE3_LCDSEG4 gt IDD_WAKEUP PE2_LCDSEG3 lt PEI LCDSEG2 7 1 LCDSEGI PA7_LCDSEGO PDI LCDCOM3 PA6_LCDCOM2 PAS LCDCOMI PA4 LCDCOMO 1 PD2 2 PD3 3 PBO 4 5 2 6 7 PB4 8 PBS 9 10 7 10 19 STMicroelectronics Title STM8L DISCOVERY 913 Rev B 2 PCB SCH Date 7 15 2010 Sheet of 5 0 60 25 e21129 3 06 62 26921 15 LCD PB7_LCDSEG17 PB6_LCDSEG16 _PD4 LCDSEGIS lt 5 LCDSEGIS PD5 LCDSEGI9 4 LCDSEGIA PD6 LCDSEG20 PB3 LCDSEGI3 PD7_LCDSEG21 PB2 LCDSEGI2 PC2 LCDSEG22 4 LCDCOMO PC3 LCDSEG23 _ PAS LCDCOMI st e e vm N N N N N A A N SES GHO08172T 4 1 2 4 UA gt 0 y E k B 0 4 P gt en gt 2 G 7 5 0 PEO LCDSEGI PEI LCDSEG2 gt o PA6_LCDCOM2 PDI LCDCOM3 E LCDSEGII PBO LCDSEGIO LCDSEG4 gt PD3_LCDSEG9 4 LCDSEGS PE2 LCDSEG3 PES 5 6 LCDSEG7 PD2 LCDSEG8 STMicroelectronics Title STM8L DISCOVERY LCD Number MB915 Rev B 2
20. L consumption measured Run mode 4 Off 3 Off STM8L consumption measured Low power mode LCD on STM8L consumption measured in Low power mode LCD off 5 Off STM8L consumption measured Halt mode LCD off To study or modify the DISCOVER project related to this demo visit www st com stm8l discovery and follow the tutorial Discover the STM8L features download and execute programs proposed in the list of projects This site also contains examples from which you can develop your own applications System requirements Windows 2000 XP Vista e A Mini B USB cable Doc ID 17693 Rev 2 3 30 Quick start UM0970 1 3 1 4 1 5 4 30 Development toolchain e IAR Embedded Workbench for STM8 e STMicroelectronics ST Visual Develop STVD Demonstration software Demonstration software is preloaded in the board s Flash memory This demonstration uses the built in IDD measurement feature of the STM8L DISCOVERY to automatically measure and display on the LCD the consumption of the MCU in run and low power modes The latest versions of this demonstration source code and associated documentation can be downloaded from www st com stm8l discovery Order code To order the STM8L ultralow power Discovery use the order code STM8L DISCOVERY Doc ID 17693 Rev 2 ky 0 0970 2 Features The STM8L DISCOVERY offers the following features STM8L152C6T
21. e is part of the demonstration software and can be launched if required The procedure for Ibias measurement implemented in the Demo is 1 Power off the board disconnect the USB cable 2 Set jumper JP1 to OFF position pins 1 and 2 3 Push down B2 USER button power on the board from the USB 4 Wait at least 1 second before releasing B2 the LCD displays the Ibias measurement 5 Power off the board disconnect the USB cable 6 Set jumper JP1 to ON position pins 2 and 3 The Ibias value is now stored The bias current is then subtracted from the Ipp measurement performed in Low power mode 3 7 Solder bridges Table 4 Solder bridge Bridge State Description off PA2 PA3 are disconnected from P1 SB1 2 X2 C19 C20 and R24 provide a clock as shown in schematics X2 crystal On PA2 PA3 are connected to P1 X2 C19 C20 R24 must not be fitted 583 5 7 9 DEFAULT On Reserved do not modify SB4 6 8 10 PRG 32 Off Reserved do not modify off PFO PE6 PC4 are available and IDD module cannot be used SB11 12 14 JP1 must be set to OFF IDD_Measurement On PFO PE6 PC4 are used by IDD module JP1 must be set to ON SB13 15 Off PC5 PC6 are only connected to P2 but do not remove C21 C23 R27 crystal On PC5 PC6 are connected to P2 X3 C21 C23 and R27 provide 32 KHz clock SB16 Off PA1 RESET signal is only connected to 1 B1 RESET On PA1 RESET signal is used ST_LINK as SWIM_RST and also connected to 1 SB17 Off
22. e it hae Rl ns ERU ACC EH oe 14 3 6 2 Low power mode 14 3 6 3 Low power mode lpp measurement principle 15 3 6 4 Ibias current measurement procedure 16 37 Solder 0965 i ro tintua EEr en a 16 3 8 LCD 24 segments 4 commons 17 4 Extension connection 19 5 Mechanical drawing 23 6 Electrical schematics 24 7 Revision history 29 2 30 Doc ID 17693 Rev 2 437 0 0970 Quick start 1 1 1 2 Quick start The STM8L DISCOVERY is a low cost and easy to use development kit to quickly evaluate and start a development with an STM8L ultralow power microcontroller For more information on the STM8L DISCOVERY and for demonstration software visit www st com stm8l discovery Getting started 1 Check jumper positions on the board JP1 and CN3 ON Discovery selected 2 Connect the STM8L DISCOVERY board to a PC with a USB cable to power the board Red LED LD2 PWR then lights up 3 Function 1 is executed and each click on user button B2 changes the executed function as described in Table 7 Table 1 Functions Function LED 103 4 Bars Value displayed 1 Blink STMBL Vpp voltage measured 2 Off STM8
23. es very low Figure 11 shows how the counter and T1 ensure that 150 ms after IDD CNT EN falling edge the shunt resistor R21 is connected between VDD MCU and the power supply in order to reduce the measurement range to 30 uA full scale instead of 30 mA in Run mode Then after another 150 ms for current stabilization R21 is shorted the IDD measurement is stored in C11 and the MCU is woken up After wakeup the MCU can measure the IDD current corresponding to the Low power mode stored in C11 STM8L DISCOVERY Ipp Low power mode measurement timing diagram Wake up IDD period measurement Wake up Low power 5 Clear CNT x event T IDD CNT EN Q13 LOW POWER EN T1 pin 3 Q14 IDD WAKEUP Q14n 07 pin 4 Doc ID 17693 Rev 2 15 30 Hardware and layout 0 0970 3 6 4 Ibias current measurement procedure In Low power mode the bias current of operational amplifier input U4 pin 4 is not negligible compared to lpp current typical Ibias is 240 nA To obtain a reliable STM8L152 Ipp measurement it is mandatory to subtract the bias current from the Ipp low power measurement since this current is not sinked by the MCU Ibias is measured during production test and stored in the MCU EPROM The demonstration software Discover uses this value to display the correct Ipp The Ibias measurement procedur
24. hall 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 2011 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 30 30 Doc ID 17693 Rev 2 437
25. ied 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 s
26. mpers on CN3 as shown Figure 8 in red but do not use the CN2 connector as that could disturb communication with the STM8L152C6T6 of the STM8L DISCOVERY Figure 8 STM8L DISCOVERY connections image Jumpers on CN3 EM cua MB915B R29 Nme o OPE Using the ST Link to program debug external STM8L application is very easy to use the ST Link to program the STM8L on an external application Simply remove the 2 jumpers from CN3 as shown in Figure 9 and connect your application to the CN2 debug connector according to Table 3 Table 3 Debug connector CN2 SWIM Pin CN2 Designation 1 VDD TARGET VDD from application 2 SWIM SWIM data input output 3 GND Ground 4 SWIM RST SWIM reset Doc ID 17693 Rev 2 437 0 0970 Hardware and layout Figure 9 ST Link connections image No jumpers on CN3 3 3 Power supply and power selection The power supply is provided either by the host PC through the USB cable or by external power supply 5 V or 3 3 V The D1 and D2 protection diodes allow the 5V and 3V3 pins to be used independently as input or output power supplies see Figure 3 The 5V and 3V3 pins can be used as an output power supply for use by an application board connected on pin headers P1 to P3 In such a case the 3V3 pin provides only a power supply and the power consumption must be lower than 100 mA The 5V and 3V3 pins can also be used as an i
27. nput power supply for the board when the USB connector is not connected to the PC Note If an external power supply is used it must conform to EN 60950 1 SELV safety extra low voltage LPS limited power source definitions If the 5V and 3V3 pins are used as an input power supply the STM8L DISCOVERY board must be powered by a power supply unit or auxiliary equipment complying with standard EN 60950 1 2006 A1 1 2009 and must be safety extra low voltage SELV with limited power capability 3 4 LEDs 101 COM Red LED indicates communication in progress between PC and ST Link e LD2 PWR Red LED indicates that the board is powered e LD3 PET Green LED is a user LED connected to the I O of the STM8L152C6T6 e LD4 PC7 Blue LED is a user LED connected to the PC7 of the STM8L152C6T6 3 5 Push buttons e B1 RST Push button is used to RESET the STM8L152C6T6 e B2USER User push button connected to the I O PC1 of the STM8L152C6T6 ky Doc ID 17693 Rev 2 13 30 Hardware and layout 0 0970 3 6 Note Built in IDD measurement circuit The STM8L DISCOVERY built in Ipp measurement circuit allows the consumption of the STM8L152C6T6 to be measured and displayed on the LCD Glass while the MCU is in Run or Low power saving modes e JP1 in ON position STM8L152C6T6 is powered through Ipp measurement circuit default e JP1 in OFF position STM8L152C6T6 is powered directly by 3V3 Ipp measurement circuit is bypassed
28. ory and CPU large current consumption contributors while keeping peripherals active Ultralow power and ultrasafe reset system POR PDR additional optional activation BOR Integrated safety and security for application Ultrafast wakeup from lowest Low power mode 4 us Fast switching from Static and Dynamic power modes Analog functional down to 1 8 V programming down to 1 65 V Full functionality over the complete Vpp range For more information see the STM8L152C6T6 datasheet Doc ID 15962 on the ST website Doc ID 17693 Rev 2 9 30 Hardware and layout 0 0970 Figure 6 5 81152 6 6 block diagram OSC IN osc our lt Vesa 1 65 V to to 3 6 V controller OSC32_IN IN lt and Clocks OSC32_OUT css to core and peripherals Interrupt controller STM8 Core Debug module SWIM LI SWIM 2 channels lt i gt 16 bit Timer2 2 channels EY 16 bit Timer3 3 channels lt 16 bit Timer 1 Eisen mnc SLE Tmer 1 Kbyte Data EEPROM IR lt Infrared interface DMA1 4 channels SCL SDA lt T e lt 10 gt _____ gt gt lt 4 gt USART1 Vppa Vesa Vppa Vssa Address contro and data buses ADC1 INx F Vppner KL 5 12 bit ADC1 VssnEF A4 Temp sensor VREFINT out 1 Internal reference voltage COMP1_INP 2 COMP2 INM gt ALARM CALIB DAC OU lt

Download Pdf Manuals

image

Related Search

Related Contents

0 a 6000 W x 1W Factor de poder : 0.01 a 1.00 x 0.01 P ACV : 0  Manual de instalação e instruções de uso SILENT-100  HUILE PAG  WeAllSew « http://weallsew.com  Silverstone RVS02 USB powered  MEDUMAT Transport - WEINMANN Emergency    PULVERIZADOR AGRÍCOLA ATTACK – 600  KE0102CT 取扱説明書    

Copyright © All rights reserved.
Failed to retrieve file