Home

UM0970 User Manual

image

Contents

1. 5 JTDO STM_JTDI STM_JTCK SWIM_RST_IN SWIM SWIM SWIM IN SWIM RST STM JRST cole elo les esl le st srt st USB st SS RSS FIO 02 C8 C9 5 STM32F 103C8T6 20pF 2 3V3 ZE E 3 8MHz 1 gt a E 36 2 VBAT VDD 2 55 gt 13 VSS 2 susee JTMS 24 5 SWIM PULLUP 4 33 USB DP PCIS PAI2 5 OSCIN 5 32 USB DM OSC IN 52 555 OSC OUT 6 31 Ut RX OSC_OUT PALO 52 645 3V3 RST 7 RST PA9 20 UTX 100K oh E SEA ane 2 ST LINK LED ANT 10 Se N25 CS 11 lt 26 T JTCK ux 12 51 E EXE MEAS U2 PBI2 54420 S am 112 2 gt gt kaad iaai ial amd and ami je ex ex E4 lala ZISE lz exe p d 10 43V3 EXT 5V D7 aoe 3V3 Voy 05 BATGOJFILM CNI vec i 2 5 AL USB DP D 22 GND 0 R2 SHELL 100K 5075BMR 05 SM USB 100nF ST LINK SWIM RESET gt 43V3 RE gt 55 x R10 1 680 SWIM IN RIS SWIM ES pa ANY AW ET SS _stJtck SWCLK SB6 585 SWIM RST IN SWIM RST
2. PD3_LCDSEG9 PD2_LCDSEG8 PDO_LCDSEG7 PES LCDSEG6 i PE4_LCDSEG5 IDD Measurement LCDSEG4 gt IDD_WAKEUP PE2_LCDSEG3 lt PEI LCDSEG2 1 LCDSEGI PA7_LCDSEGO PDI LCDCOM3 1 4 PA6_LCDCOM2 PAS LCDCOMI PA4 LCDCOMO 1 PD2 2 PD3 3 PBO 4 PBI 5 PB2 6 PB3 7 PB4 8 PBS 9 PB6 10 7 10 19 STMicroelectronics Title STM8L DISCOVERY 913 Rev B 2 PCB SCH Date 7 15 2010 Sheet of 5 25 e214129 3 0260 26921 dI Figure 14 LCD LCD PB7_LCDSEG17 PB6_LCDSEG16 _PD4 LCDSEGIS PBS LCDSEGIS PD5 LCDSEGI9 gt 4 LCDSEGIA PD6 LCDSEG20 PB3 LCDSEGI3 PD7_LCDSEG21 PB2 LCDSEGI2 PC2 LCDSEG22 4 LCDCOMO PC3 LCDSEG23 PAS LCDCOMI al A GHO08172T COMO COMI 52 ve oe 2 A COM3 COM2 PA7 LCDSEGO 0 LCDSEGI PEI LCDSEG2 gt o PA6_LCDCOM2 PDI LCDCOM3 E LCDSEGII 0 LCDSEGIO PE3_LCDSEG4 gt PD3_LCDSEG9 4 LCDSEGS PE2 LCDSEG3 PES_LCDSEG6 PD0 LCDSEG7 PD2 LCDSEG8 STMicroelectronics Title STM8L DISCOVERY LCD Number MB915 Rev B 2 SCH PCB Date 7 15 2010 Sheet2 5 25 e21412
3. 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 SEG1 2 LCD SEG PE1 Port E1 PE1 TIM1_CH2N LCD SEG2 2 LCD SEG2 PE2 Port E2 PE2 TIM1_CH3N LCD_SEG3 2 LCD_SEG3 17 PE3 Port PE3 LCD_SEG4 2 LCD_SEG4 18 PE4 Port E4 PE4 LCD_SEG5 2 LCD SEG5 Doc ID 17693 Rev 1 ky 0 0970 Extension connection Table 6 P1 pinout continued Pin number P1 Pin number STM8L Board pin name PES Type Main function Port E5 Alternate function PE5 LCD_SEG6 2 ADC1 IN23 COMP2 INP COMP1 INP LCD U5 LCD SEG6 20 PDO Port DO PDO TIM3_CH2 ADC1 TRIG 3 LCD SEG7 2 ADC1_IN2 2 COMP2_INP COMP1_INP LCD_SEG7 21 PD1 Port D1 PD1 TIM3 TRIG LCD COM3 2 ADC1_IN21 COMP2_INP COMP1_INP LCD_COM3 9 40 GND Ground Table 7 P2 pinout Pin number P2 Pin number STM8L Pin name 45V Type Main function Alternate function 5 Volts board power supplied or supply external application when USB connected LCD U5 NC 9 40 48 47
4. 0 0970 2 Features The STM8L DISCOVERY offers the following features STM8L152C6T6 microcontroller 32 KB Flash 2 KB RAM 1 KB EEPROM in 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 Ipp current measurement LCD 28 pin DIP 24 segments 4 commons Extension header for all QFP48 1 05 for quick connection to prototyping board for easy probing Doc ID 17693 Rev 1 5 29 Hardware and layout 0 0970 3 6 29 Hardware and layout The STM8L DISCOVERY is designed around the STM8L152C6T6 microcontroller in a 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 P1 Header LD3 Green LED B1 RST Blue LED LD4 B2
5. i gt measurement Clear CNT event 4 5 T IDD CNT EN Q13 LOW POWER EN T1 pin 3 Q14 IDD WAKEUP Q14n 07 pin 4 oms 150 ms The Low power mode measurement procedure can be used in Halt or Active halt mode if the current does not exceed 30 uA otherwise the Ipp measurement procedure in Run mode should be used up to 30 mA Doc ID 17693 Rev 1 15 29 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 Ipp 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 procedure 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 Setjumper JP1 to OFF position pins 1 and 2 3 Push down B2 USER button power on the board from the USB 4 least 1 second before releasing B2 the LCD displays the Ibias measurement
6. 588 8587 _sm Jtius SWDIO SB10 SB9 RII DISCOVERY 10K d ST LINK CN3 2 Jumpers gt DISCOVERY Selected Jumpers OFF gt ST LINK Selected Wired on Solder Side LDI ST LINK LED R8 AA l 510 RED PWR DI 5V LDI117S33TR BAT60JFILM xi LD2 4 vin Vou 2 M MZ RED paek toi C2 10uF 10uF 100nF 43V3 EXT 3V3 gt STMicroelectronics Title STM8L DISCOVERY ST LINK SWIM only NumberMB915 Rev 2 5 Date 7 15 2010 Sheet5 of OZ60INN 25 e211129 3 Revision history 0 0970 6 28 29 Revision history Table 9 Document revision history Date Revision Changes 24 Sep 2010 1 Initial release Doc ID 17693 Rev 1 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 expre
7. Ti 0 0970 J User Manual STM8L DISCOVERY Introduction The 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 cio RIS 5 1 5 81 September 2010 Doc ID 17693 Rev 1 1 29 www st com Contents 0 0970 Contents 1 QUICK SIAM au uunc UR eee ad oem Renee ee wee 3 1 1 Getting started 3 1 2 System requirements 3 1 3 Development toolchain 4 1 4 Demonstration software 4 1 5 Order code wanes 4 2 5 Re TT 5 3 Hardware and layout 6 3 1 STM8L152C6T6 microcontroller 9 3 2 Embedded vu tea os hd oic ee a ein eg em ao i 11 3 2 1 Using the ST Link to 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 WEDS been Bek ae eee 13 3 5 PUSH BUTIONS 13
8. 3 6 Built in IDD measurement circuit 14 3 6 1 Run mode 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 3 7 Solder bridges isses ox teu nad haw wads 16 3 8 LCD 24 segments 4 commons 17 4 Extension connection 19 5 Electrical schematics 23 6 Revision history 28 2 29 Doc ID 17693 Rev 1 437 0 0970 Quick start 1 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 Before installing and using the product please accept the Evaluation Product License Agreement from www st com stm8l discovery For more information on the STM8L DISCOVERY and for demonstration software visit www st com stm8l discovery 1 1 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 execute
9. 6 8pF 1 4 6 8pF ES MC306 G 6Q 32 768 manufacturer U8 R27 1 2 48 0 Must be close to the Crystal and ON 2 pene 47 PES PEG IDD_WAKEUP 3 3 46 __ 7 PA2 PC7 B5r lt 4 PC6 45 PC6 PA4 5 PA4 5 44 __ 5 5813 S 8 PAS 8061 IDD_CNT EN avo PAT 8 PA6 PC3 al PC3 LCDSEG23 VDD MCU 10082 10052 C16 Re 13 36 NEN TT mmm VLCD PD7 ppc 2 2 0 LCDSEGI_ rr 5 PD6 VDDA PCI VREF 57 PCO 7 2 70 PC2_LCDSEG22 AVSS VSSIO 39 VDD VDDIO VDD MCU User Button User PB 5817 PD7 LCDSEG21 34 PDS PD6 LCDSEG20 gt PEI PDS gt PD5 LCDSEGI9 2 PD4 ni PD4_LCDSEGI8 gt ese eae PE3 PFO 31 PBT IDD_Measurement gt 9 9 4 PB7 0 65 PB7 LCDSEGI7 PES PB6 pg PB6 LCDSEGI6 gt PDO PBS 53 ppa_PBS_LCDSEGIS gt PDI 7 pn PB4 LCDSEGI4 PD2 PB3 s 555 PB3 LCDSEGI3 26 __ 2 lt PD3 PB2 55 sni LCDSEGII gt STMSLIS2C6T6 n VDDA BEAD 615 100nF STMicroelectronics Title STM8L DISCOVERY MCU 915 Re 2 5 Date 7 15 2010 Sheet4 of 25 e214129 3 0260 26921 62 42 Figure 17 ST Link SWIM only R9
10. USER IDD measurement P2 Header LCD 24 segments 4 commons P3 Header Doc ID 17693 Rev 1 0 0970 Hardware and layout Figure 3 Top layout D1 diode l D2 diode p LD2 LD1 power COM 4 zo BBB ze E e RG 525 ST Link Su al I I CN2 SWIM connector E RUNG E CN3 ST Link Discovery 128 selector cio RISRIG ep E 8 LCD 24 segments n 4 1 IDD module 9 aa el niii a i 2 m LN RIOR JP1 TOO Ipp measurement 5V power supply in input 3 3V power supply m us rat Ecz dudit SB1 2 lt 81 P D a X2 crystal s Www Sp 9 822 408 fhe STM8L152C6T6 E zm e C23 e 3 9 e 82 Reset button butt e ser button e e e reset user e n LD3 9 D LED blue LED green JE r C o 2 PCT ky Doc ID 17693 Rev 1 7 29 Hardware and layout 0 0970 Figure 4 Bottom layout SB3 5 7 9 PRG 32 RESERVED E
11. 12 and pin connections in Table 5 Note This LCD also supports six 8 segment digits by only using COMO and COM 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 and COMG pins pin 13 and pin 14 of the LCD then replug it in the socket Characteristics overview e 24segments and 4 commons e Drive method multiplexed 1 4 duty 1 3 bias e Operating voltage 3 V e Operating temperature 0 to 50 C e 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 N F B L BAR2 COLON BAR1 E ic DP BARO D B Doc ID 17693 Rev 1 17 29 Hardware and layout 0 0970 Table 5 LCD connections STM8L152C6T6 LCD Pin name Pin COM3 COM2 1 COMO PA7 LCDSEGO 1 1N 1P 1D 1E PEO LCDSEG1 2 1DP 1COLON 1C 1M PE1 LCDSEG2 3 2N 2P 2D 2E PE2_LCDSEG3 4 2DP 2COLON 2C 2M LCDSEG4 5 3N 3P 3D 3E 4 LCDSEG5 6 3DP 3COLON 3C 3M PE5 LCDSEG6 7 4N 4P 4D 4E PDO LCDSEG7 8 4DP 4COLON 4C 4M PD2 LCDSEG8 9 5 5D 5E PD3_LCDSEG9 10 BAR2 BAR3 5C 5M PBO_LCDSEG10 11 6N 6P 6D 6E P
12. 5 Electrical schematics Figure 13 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 CNT EN IDD Measurement IDD WAKEUP RESET ST LINK SWIM IDD CNT EN ST LINK SCHDOC IDD Measurement Lp 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 LCDSEGIA4 PB3 LCDSEGI3 PB2 LCDSEGI2 LCDSEGII 0 LCDSEGIO PD3 LCDSEG9 PD2 LCDSEG8 0 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 IDD Measurement ST LINK SWIM TEXT SV IDD WAKEUP EXT 5V EXT 3V3 EXT 3V3 MCU SchDoc U_MCU PC3_LCDSEG23 4 2 PA 0 7 PC2 LCDSEG22 1 gt PB 0 7 PD7 LCDSEG21 gt PC 0 7 PD6 LCDSEG20 3 gt PD 0 7 PD5 LCDSEGI9 2 0 7 PD4 LCDSEGI8 gt E gt PFO PB7 LCDSEGI7 PB6_LCDSEG16 71 PB5 LCDSEGIS SS PB4 LCDSEGIA4 PB3 LCDSEGI3 2 RESET PB2_LCDSEG12 gt ST_LINK_SWIM LCDSEGII 0 LCDSEGIO 4
13. ADC1_IN10 COMP1_INP LCD_SEG18 32 PFO Port FO PFO ADC1 IN24 DAC OUT 9 40 GND Doc ID 17693 Rev 1 Ground 21 29 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 PD3 Port D3 PD3 TIM1 TRIG LCD SEG9 2 ADC1_IN1 9 COMP1 INP LCD SEG9 24 PBO Port BO PBO TIM2_CH1 LCD_SEG10 2 ADC1_IN18 COMP1_INP LCD_SEG10 25 Port B1 PB1 TIM3_CH1 LCD_SEG11 2 ADC1_IN17 COMP1_INP LCD_SEG11 26 PB2 Port B2 PB2 TIM2 CH2 LCD SEG12 2 ADC1_IN16 COMP1_INP LCD_SEG12 27 PB3 Port PB3 TIM2_TRIG LCD_SEG13 2 IN15 COMP1_INP LCD_SEG13 28 PB4 Port B4 PB4 SPI1_NSS 3 LCD_SEG14 2 ADC1_IN14 COMP1_INP LCD_SEG14 29 30 5 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 1 2 26921 dI
14. MB915B SB4 6 8 10 DEFAULT 00000000000 sc SB11 12 14 IDD Measurement P2 connector 0600000 P2 P1 connector JP1 IDD SB13 15 N X3 crystal SB17 B2 USER SB16 B1 RESET P3 connector 8 29 Doc ID 17693 Rev 1 3 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 I2C SPI ADC DAC and comparators Figure 5 STM8L152C6T6 package STM8L152C6T6 8 bit microcontroller offers 32 Kbytes of Flash memory 2 Kbytes RAM e Kbytes EEPROM LQFP48 LQFP48 7 x 7 mm 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 pA 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 memo
15. STM8L DISCOVERY Figure 8 STM8L DISCOVERY connections image 09 3 fay Ee tol BB ww st com stm8 discov ery a c5 all ri DISCOVERY discovery reset 3 2 2 Using the ST Link to program debug an external STM8L application It 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 Tvoo TARGET VDDfromapplicaion 2 SWIM SWIM data input output 3 GND Ground 4 SWIM RST SWIM reset 12 29 Doc ID 17693 Rev 1 437 0 0970 Hardware and layout Figure 9 ST Link connections image MI gt oe uJ gt e co 24 reset 2 6 6 6 0 5 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 3V power supply and the power consumption m
16. measure a current when the STM8L152C6T6 is in Low power mode is 1 Configure ADC to measure voltage on the IDD Measurement pin 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 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 The measurement timing is given in Figure 11 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 becomes 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 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 Figure 11 MCU mode Wake up IDD period 1 Wake up event Low power x
17. 5 Power off the board disconnect the USB cable 6 Setjumper 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 are disconnected from P1 2 X2 C19 C20 and R24 provide a clock as shown in schematics 2 crysta d On PA2 PA3 are connected to P1 X2 C19 C20 R24 must not be fitted SB3 5 7 9 DEFAULT On Reserved do not modify SB4 6 8 10 PRG 32 Off Reserved do not modify Off PE6 are available and IDD module cannot be used SB11 12 14 JP1 must be set to OFF IDD Measurement PFO PE6 PC4 are used by IDD module On JP1 must be set to ON SB13 15 Off PC5 PC6 are only connected to P2 but do not remove X3 C21 C23 R27 X3 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 P1 B1 RESET On PA1 RESET signal is used by ST LINK as SWIM_RST and also connected to P1 SB17 Off PC1 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 29 Doc ID 17693 Rev 1 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
18. 9 3 0260 26921 Figure 15 lbp measurement IDD VDD MCU 3V3 2 1 U4 MAX9938FEUK 2 Ue R18 R17 3 H Uo 2 AW AW IDD_Measurement 5 10K 11 0 4 _ e vec luF AES 3V3 74H1G66STR gt 30 5 1 7 PEG 3V3 6 IDD WAKEUP STTSPF20V 5812 U7 U3 C12 3V3 R19 74LX1G04CTR 1 012 VCC 7 Q3 010 014 08 4 69 4 al Q5 CLR IDD_CNT_EN Saal Q7 CI 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 OZ60INN 25 22120 3 60 96 26921 dI Figure 16 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 16 SBI C19 R24 50 20 lt PA4 LCDCOMO 5 LCDCOMI PA6 LCDCOM2 7 LCDSEGO PEI LCDSEG2 lt PE2 LCDSEG3 lt LCDSEG4 4 4 LCDSEGS PES LCDSEG6 lt PDI LCDCOM3 lt PD2_LCDSEG8 lt 0 LCDSEGIO LD3 5 R28 PE7 330 green LD4 PC7 R29 AA 660 blue 23
19. B1 LCDSEG 11 12 BARO BAR1 6C 6M PD1 LCDCOM3 13 COM3 PA6_LCDCOM2 14 COM2 PA5_LCDCOM1 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 4 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 LCDSEG23 28 1H 1Q 1F 1G 18 29 Doc ID 17693 Rev 1 Extension connection 0 0970 4 19 29 Extension connection Male headers P1 P2 and P3 can connect the STM8L DISCOVERY to a standard prototyping wrapping board All 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 Pin number STM8L Board 9 name E 3V3 Main function Alternate function 3 3 V board power supplied or supply external application when USB connected LCD U5 PAO 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 PA4 Port Port A4 PA3 OSC_OUT USART1 _RX 3 SPI1 MOSI 3 PA4 TIM2_BKIN LCD COMO 2 ADC1 IN2 COMP1 INP LCD COMO PA5
20. GND 7 Port 7 Port E6 Ground PE7 LCD_SEG27 2 PE6 LCD_SEG26 2 PVD_IN 46 45 PC7 PC6 Port C7 Port C6 PC7 LCD_SEG25 2 ADC1 IN3 COMP2_INM COMP1_INP PC6 OSC32_OUT SPI1_SCK 3 USART1_RX 3 44 PC5 Port C5 PC5 OSC32_IN 5 _ 55 3 USART1_TX 3 43 PC4 Port C4 Doc ID 17693 Rev 1 PC4 USART1_CK 3 I2C1 SMB CCO LCD SEG24 2y ADC1 INA COMP2 INM COMP1_INP 20 29 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 PC3 USART1_TX 3 LCD_SEG23 2 ADC1_IN5 COMP1_INP COMP2_INM LCD U5 LCD_SEG23 41 PC2 Port C2 PC2 USART1_RX 3 LCD_SEG22 ADC1_IN6 COMP1_INP VREF_OUT LCD_SEG22 38 PC1 Port C1 PC1 4 I2C1_SCL 37 PCO Port CO PCO 4 2C1 SDA 36 PD7 Port D7 PD7 TIM1 CH1N LCD SEG21 2y ADC1 IN7 RTC_ALARM VREF_OUT COMP1_INP LCD_SEG21 35 PD6 Port D6 PD6 TIM1_BKIN LCD_SEG20 2 ADC1_IN8 RTC_CALIB VREF_OUT COMP1_INP LCD_SEG20 34 PD5 Port D5 PDS5 TIM1_CH3 LCD_SEG19 2 ADC1 IN9 COMP1_INP LCD_SEG19 33 PD4 Port D4 PD4 TIM1_CH2 LCD_SEG18 2
21. Rev 1 0 0970 Hardware and layout 3 2 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 toprogram debug the MCU on board e toprogram 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 Note UM0627 contains information about all the ST Link features Usage in 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 GNS jumpers connector SWIM supported Doc ID 17693 Rev 1 11 29 Hardware and layout 0 0970 3 2 1 Using the ST Link to program debug the STM8L on board To program the STM8L on board simply plug in the two jumpers on as shown Figure 8 in red but do not use the CN2 connector as that could disturb communication with the STM8L152C6T6 of the
22. d function as described in Table 1 Table 1 Functions Function LED LD3 4 Bars Value displayed 1 Blink STMB8L Vpp voltage measured 2 Off STM8L consumption measured in Run mode 3 Off STM8L consumption measured Low power mode LCD on 4 Off EH STM8L consumption measured in Low power mode LCD off 5 Off STM8L consumption measured in 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 1 2 System requirements e Windows PC 2000 XP Vista e AlMini B USB cable Doc ID 17693 Rev 1 3 29 Quick start 0 0970 1 3 1 4 1 5 4 29 Development toolchain e AR 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 1 ky
23. 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 2010 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 ky Doc ID 17693 Rev 1 29 29
24. ry access on board 4 channel DMA Autonomy for peripherals independent from core can switch off Flash memory 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 1 9 29 Hardware and layout 0 0970 Figure 6 5 81152 6 6 block diagram OSC_IN osc our lt 12 1 16 MHz oscillator M 16 MHz internal RC gt to3 6V 05032 IN 32 kHz oscillator and Clocks OSC32_OUT css to core and 38 kHz internal RC peripherals Interrupt controller STM8 Core Debug module SWIM SWIM pos 2 channels 15 16 bit Timer 2 32 Kbytes Program memory 1 Kbyte Data EEPROM MOSI MISO SCK NSS RX TX CK Address control and data buses Vssa lt L gt VREFINT out lt T Internal reference voltage 1 5 IWDG 38 kHz clock cour DAC O VoDREF 17 12 bit k VssnE 4 al CIE gt SEGx COMx Vien 25 V to LCD booster 3 10 29 Doc ID 17693
25. ss or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this
26. tween JP1 pin 2 and pin 3 STM8L DISCOVERY lpp measurement circuit T MAX9938FEUK PFO IDD_Measurement p 1 vo c GND VCC 5 3V3 74HIG66STR 5811 3V3 i Tl G STTSPF20V 43 3 gt SEIS Said IDD_WAKEUP gt ay UT U3 eme 3V3 R19 47K 741 1604 1 012 vec is 100nF M 4 06 5 BE 10K PC4 CER gt L n IDD EN 6 5814 za T co E GND M74HC4060TTR R22 252 InF 15K 30K Oscillator frequency 30KHz 3 6 1 3 6 2 14 29 Run mode In Run mode Ipp current is measured using the operational amplifier MAX9938FEUK 04 connected to the 20 shunt resistor R20 In this case IDD_CNT_EN remains high during measurement so R21 remains in short circuit during the measurement because of transitor T1 which remains ON permanently The jumper JP1 must be connected between pins 2 and 3 of JP1 Low power mode In Low power modes Halt or Active halt the operational amplifier MAX9938FEUK 04 is connected to the 2KO shunt resistor R21 controlled by the analogue switch STT5PF20V T1 In this case the counter 74HC4060 enabled by IDD CNT EN manages the measurement timing according to Figure 11 ky Doc ID 17693 Rev 1 0 0970 Hardware and layout 3 6 3 Low power mode Ipp measurement principle The principle used to
27. ust be lower than 100 mA The 5V and 3V3 pins can also be used as an input power supply for the board when the USB connector is not connected to the PC 3 4 LEDs e LD1 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 PCT Blue LED is a user LED connected to the I O PC7 of the STM8L152C6T6 3 5 Push buttons e B1 RST Push button is used to RESET the STM8L152C6T6 e 2 USER User push button connected to the I O PC1 of the STM8L152C6T6 ky Doc ID 17693 Rev 1 13 29 Hardware and layout 0 0970 3 6 Note Figure 10 Built in IDD measurement circuit 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 JP1in ON position STM8L152C6T6 is powered through Ipp measurement circuit default e JP1in OFF position STM8L152C6T6 is powered directly by 3V3 Ipp measurement circuit is bypassed When jumper JP1 is removed the current consumption of the STM8L152C6T6 can be measured by connecting an ammeter between jumper JP1 pin 1 and pin 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 be

Download Pdf Manuals

image

Related Search

Related Contents

FY600 Manuel d`utilisation  OP S130-145 LINGUA INGLESE PER TRADUZIONE.indb  除湿機  Marantz AV8802 Stereo Receiver User Manual  F 19 SERVICE MANUAL    Amana AEZ8581 User's Manual  クレセント TE-21L 取扱説明書    Manual do Usuário HB4058-00.09  

Copyright © All rights reserved.
Failed to retrieve file