Download UM0621 User manual
Transcript
UM0621 User manual STM3210E-LK learning kit Introduction The STM3210E-LK is a version of the STM32-LK learning kit for the STM32F103ZET6 (LQFP144) microcontroller. The STM32F103ZET6 is high density STM32 microcontroller based on the Cortex-M3 core, with 512 Kbytes of embedded Flash memory and a rich set of on-chip peripherals. The STM3210E-LK learning kit has an embedded ST-LINK JTAG emulator allowing it to be used as an evaluation and demonstration board with all required functions for: ● Emulation ● Debugging ● Flash programming Interfaces and peripherals provided are: USB, CAN, USART, LCD, ADC, SRAM, NOR Flash, NAND Flash, input keys and joystick. Figure 1. STM3210E-LK board ST-LINK MCU KEY1 JTAG CONNECTOR January 2009 DISPLAY STM32F103ZET6 TARGET MCU RESET Rev 1 KEY2 SRAM JOYSTICK POTENTIOMETER 1/24 www.st.com Contents UM0621 Contents 1 2 3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Product package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.1 Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.2 Evaluation system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Connectors and jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 Embedded ST-LINK driver installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Demonstration program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 Connecting power to the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 Operating the demo program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 6 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7 2/24 6.1 Limitation with reset from IDE during debugging . . . . . . . . . . . . . . . . . . . 14 6.2 Analog/digital conversion (ADC) errors . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.1 Embedded ST-LINK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.2 Inputs and outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.3 LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.4 MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.5 Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7.6 Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.7 SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 7.8 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 UM0621 Contents Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3/24 Overview UM0621 1 Overview 1.1 Features 1.2 ● Supports IAR EWARM IDE ● Supports ARM RVMDK IDE ● Learning kit for STM32F103xCDE series ST Cortex M3 MCU ● Hardware and software architecture reference design ● Embedded ST-LINK for debug and programming STM32 target MCU Product package Table 1. Product package list Item STM3210E-LK board 1 USB A-B type cable 1 DB9F/F RS-232 cable 1 Product CD-ROM 3 Package list 1 Quick start sheet 1 1.3 Functions 1.3.1 Emulator 4/24 Quantity ● Embedded ST-LINK emulator, supports all STM32F10x series Cortex-M3 ● USB 2.0 full speed, USB power supply ● Supports emulation of the on-board hardware and an external user system ● Download speed >2 kB/s ● Adaptive target system JTAG voltage level is 3.3 V ● The emulator can provide 5 V power (>100 mA) to the target system through pin 19 of the JTAG interface UM0621 1.3.2 Overview Evaluation system ● STM32F103ZET6 ST Cortex-M3 ● One 128 KB FSMC SRAM ● One 512 KB FSMC NOR Flash ● One 128 MB FSMC NAND Flash ● One 8 MB SPI Flash ● Two RS232 (DB9) connectors, with jumpers to disconnect them from the STM32 ● One CAN (DB9) connector, with jumpers to disconnect it from the STM32 ● Two B type USB connectors, with jumpers to disconnect them from the STM32 ● One SD card socket, with jumpers to disconnect it from the STM32 ● 8 MHz main clock oscillator with removable oscillator socket for optional 4~16 MHz ● 32 kHz oscillator, fixed ● One 128*64 dot-matrix LCD Module ● One I2C interface EEPROM, with jumpers to disconnect it from the STM32 ● Four LEDs ● One channel potentiometer which can input an analog signal ● One 5-direction joystick ● Two GPIO user keys ● One RESET key ● Power supply selection: ● – Powered by ST-LINK USB (CN1 connector) – Powered by target MCU USB (CN4 connector) IR LED transmitter and receiver 5/24 Connectors and jumpers UM0621 2 Connectors and jumpers Figure 2. Connector and jumper locations (top view) CN1 CN2 CN3 JP4 JP5 JP3 JP1 CN4 CN5 JP6 JP7 JP2 CN6 JP8 CN7 JP16 JP9 JP17 JP18 JP19 JP10 JP20 JP21 JP11 JP12 JP13 JP14 JP22 JP15 CN8 Figure 3. Connector and jumper positions (bottom view) CN9 6/24 UM0621 2.1 Connectors and jumpers Connectors Table 2. Connectors Connector PCB marking CN1 ST-LINK ST-LINK USB connector, provides power when JP1 installed on the left 2 pins CN2 USART1 RS-232 connector 0, connected via JP3 to target MCU CN3 USART2 RS-232 connector 1, connected via JP3 to target MCU CN4 USB USB device connector, connected via JP6 to target MCU CN5 CAN CAN connector (DB9), connected via JP16 to target MCU CN6 JTAG JTAG interface for ST-LINK (reserved for factory test purposes) CN7 MCU External holes around target MCU for 112 I/Os, can be redefined by user CN8 External JTAG ST-LINK JTAG external interface, connected via JP11 to target MCU (for debugging/programming target MCU) CN9 SD Card SD Card socket, connected via JP2 & JP10 to the target MCU Description 7/24 Connectors and jumpers 2.2 UM0621 Jumpers Figure 4 shows all the jumpers on the STM3210E-LK. They are further described in two tables: ● Jumpers listed in Table 3 can be used to connect to or disconnect the peripherals on STM3210E-LK from the STM32 target MCU. ● Jumpers listed in Table 4 can be used to set different operating modes. Figure 4. Jumper settings Table 3. Jumpers for disconnecting peripherals from STM32 Jumper Peripheral JP2 SD card Signals STM32 I/Os Description MSD_D1 PC9 SD CARD Data Input MSD_D0 PC8 Data Signal 0 MSD_CLK PC12 SD CARD Clock MSD_CMD PD2 SD CARD Command MSD_D3 PC11 SD CARD Data signal MSD_D2 PC10 SD CARD Data signal SD_PWR PB5 SD card power control MSD_DET PC2 MSD DET MSD_WP PC3 MSD WP USART1_TX PA9 USART1 Send USART1_RX PA10 USART1 Receive USART2_TX PA2 USART2 Send USART2_RX PA3 USART2 Receive JP10 JP3 8/24 USART UM0621 Connectors and jumpers Table 3. Jumper JP8 JP9 JP11 JP12 JP13 JP14 JP15 JP16 Jumpers for disconnecting peripherals from STM32 (continued) Peripheral MCU power Signals STM32 I/Os Description VBAT VBAT STM32 MCU VBAT VDDA VDDA STM32 MCU VDDA VDD VDD STM32 MCU VDD VREF+ VREF+ STM32 MCU VREF+ VREF- VREF- STM32 MCU VREF- OSC32_IN PC14 32K Oscillator input OSC32_OUT PC15 32K Oscillator output JTDO PB3 Data Input JTCK PA14 JTCK JTMS PA13 JTMS JTDI PA15 JTDI NJTRST PB4 JTRST LD7 PF6 LD7 LD6 PF7 LD6 LD5 PF8 LD5 LD4 PF9 LD4 User_Button PB10 KEY4 Anti_Tamper PC13 KEY2 Wakeup PA0 KEY1 JOY_DOWN PB15 Down JOY_UP PB14 Up JOY_LEFT PB13 Left JOY_RIGHT PB12 Right JOY_SEL PB11 Select Potentiometer PC4 ADC Input CAN_TX PB9 CAN Send CAN_RX PB8 CAN Receive 32 kHz_Osc JTAG LEDs Keys Joystick Potentiometer CAN CAN adjustable slope control (see Table 4 for details) CAN_SP JP17 NOR Flash NOR_CS PG9 NOR Flash Enable JP18 LCD LCD_CS PG12 LCD Enable JP19 NAND NAND_CS PD7 NAND Flash Enable JP20 SRAM SRAM_CS PG10 SRAM Enable 9/24 Connectors and jumpers Table 3. Jumper JP21 JP22 Table 4. Jumper JP1 UM0621 Jumpers for disconnecting peripherals from STM32 (continued) Peripheral EEPROM & Flash IR transmitter JP7 Description I2C_SCK PB6 I2C SCK I2C_SDA PB7 I2C SDA SPI_CS PB2 SPI Enable SPI_MISO PA6 SPI Data Input SPI_SCK PA5 SPI Clock SPI_MOSI PA7 SPI Data Output IR transmitter PB1 IR transmitter Function Configuration Description Fit jumper to 1<->2 (left) Board powered by USB cable connected to CN1 Fit jumper to 2<->3 (right) Board powered by USB cable connected to CN4 JP5 set to “0” STM32 Boot from Flash JP5 set to “1” & JP4 set to “1” STM32 Boot from SRAM JP5 set to “1” & JP4 set to “0” STM32 Boot from bootloader in System Flash Open USB disconnection feature disabled Close USB disconnection feature enabled Open CAN load resistor is disabled Close CAN load resistor is enabled Open Slow speed operation Close Normal operation Power Mode USB disconnection CAN load resistor CAN JP16 adjustable (pins 1 & 2) slope control 10/24 STM32 I/Os Jumpers for setting operating modes JP4 & JP5 Boot option JP6 Signals UM0621 Software installation 3 Software installation 3.1 Embedded ST-LINK driver installation The STM3210E-LK box contains the CDs for both IAR and Keil IDEs. You can select either one according to your requirements. The embedded ST-LINK on STM3210E-LK is supported by the IDE from both IAR and Keil and can be used to debug and program the board. Install one of the IDEs by following the steps listed below: 3.2 1. Install IAR IDE EWARM or Keil IDE RVMDK from the CDs delivered in the STM3210E-LK box. 2. Select ST-LINK as the debugger in the IDE. Demonstration program The ST CD available in the STM3210E-LK box includes the Demo software and Software library with example programs for some on-board peripherals. It will help you get started quickly with STM32. 11/24 Connecting power to the board 4 UM0621 Connecting power to the board To start the demo without any debugging tool, the board must be powered on. There are two ways of doing this. Note: Jumper JP6 must always be installed in either case. To run the demo with an IAR or Keil IDE and ST-LINK, the first method must be used. With this method both the on-board ST-LINK and the STM32F103 target MCU are powered by the USB cable connected to the CN1 connector. Method 1: Two USB cables are needed when using this power-on method. 1. Place jumper JP1 in position 1-2. 2. Power on the board by attaching a USB cable to connector CN1. 3. After power on, the demo program starts. 4. Then, attach another USB cable to connector CN4 to demonstrate the USB mass storage application. Method 2: This method requires only one USB cable. This cable is also used by the USB mass storage application. 12/24 1. Place jumper JP1 in position 2-3. 2. Power on the board by attaching a USB cable to connector CN4. 3. After power on, the demo program starts. UM0621 5 Operating the demo program Operating the demo program To use the demo, refer to the flowchart in Figure 5 and to the following procedure: 1. After power on, the ST logo is displayed on the LCD 2. There are two LCD demos, you can switch between them by pressing KEY1 3. Press KEY1 once to enter mode 1. a) The orange LED (LD6) lights up to indicate mode 1. b) In this mode, you can modify the input voltage to the target MCU’s analog to digital converter by rotating the potentiometer. The converted value is displayed on the LCD. Figure 5. Demo program flowchart Power on ST logo displayed on LCD Peripheral initialization USB enumeration Mass storage: 2 partitions with SD card and external SRAM Press KEY1 LCD mode 1 Orange LED on (LD6) LCD mode 2 Blue LED on (LD4) Cursor on This section is excluded from STM3210E-LK_NO_USB configurations ADC value on LCD Joystick operation Potentiometer rotated This section is excluded from STM3210E-LK_USB configurations 13/24 Operating the demo program 4. Note: UM0621 Press KEY1 a second time to enter mode 2. a) The blue LED (LD4) lights up to indicate mode 2. b) In this mode, you can operate the joystick. – First, press in the joystick. A small block ‘cursor’ is displayed in the center of the LCD screen. – You can move this cursor in 4 directions using the joystick. – Pressing in the joystick makes the cursor return to the center of the screen. Always press in the joystick before moving the cursor in a new direction. 5. Press KEY1 again to enter mode1 again, and so on. 6. After 5 seconds, if no joystick movement or potentiometer change is detected, the LCD goes into screen saver mode and displays the ST logo. You can still see which mode you are in from the status of the LEDs. 7. A USB mass storage device is also implemented by the demo program with two storage partitions on two different media, one on an SD card and one on external SRAM through the FSMC (flexible static memory controller) of the STM32F103E. For RVMDK tool users, there are 3 project targets with different configurations that can be chosen freely in the drop-down menu. These are "STM3210E-LK_FULL", "STM3210E-LKNO_USB" and "STM3210E-LK-USB". The 1st configuration has full functionality and can be used by full version RVMDK users, while the other 2 have limited functionality, as their names suggest, and can be used by evaluation version RVMDK users. For STM3210E-LK_FULL configuration, all parts in the flowchart are present. For STM3210E-LK_NO_USB configuration, parts surrounded by the dotted line rectangle on the left are not present. For STM3210E-LK_USB configuration, parts surrounded by the dotted line rectangle on the right are not present. 14/24 UM0621 Troubleshooting 6 Troubleshooting 6.1 Limitation with reset from IDE during debugging As most IDEs (including IAR) only perform a software reset, they cannot reset the MCU thoroughly. After an IDE reset, parts of the board hardware may be in an uncertain state and this may lead to errors in some cases. For example a reset from the IDE may not reset the LCD properly. Workaround When debugging with IAR or MDK, to restart debugging without re-programming the chip and by using the IAR or MDK debugger reset: 6.2 ● Use break to stop the program and reset the program counter (PC) to main and let it run again. ● To do this press the RESET key on the STM3210E-LK board after stopping the program with a break and before making a program counter (PC) reset. Analog/digital conversion (ADC) errors Correct ADC conversion may be disturbed by USB communication and when an SD card is installed on the board as a removable USB mass storage device. When the SD card is plugged in, this effects the quality of the ADC power source. To prevent this the STM3210ELK board would need additional on-board filtering and power separation. The demo firmware has a software filtering function, if this is not sufficient, use the workaround described below. Workaround Connect power to the STM3210E-LK board using the first method described in Section 4 on page 12. In this case you power on the board using a USB cable on connector CN1 and run the ADC part of the demo before attaching the USB cable to CN4 to run the USB mass storage part of the demo. 15/24 C37 20pF 2 JVCC R31 4K7 R42 4K7 8MHz X3 OSCOUT C41 20pF R28 100K 1 2 3 4 R35 T_RST 100K OSCIN 5 OSCOUT 6 7 STM_RST 8 GND 9 +3V3 AIN_1 10 11 12 C42 104P +3V3 1 +3V3 E_JTDO E_JTMS GND 1 3 5 7 JTAG +3V3 GND VBAT PC13 PC14 PC15 OSC_IN OSC_OUT /RST VSSA VDDA PA0 PA1 U2_TX E_JTCK E_JTDI E_JRST VDD_2 VSS_2 JTMS PA12 PA11 PA10 PA9 PA8 S2_MOSI S2_MISO S2_CK PB12 36 35 34 33 32 31 30 29 28 27 26 25 T_JTMS T_JTCK +3V3 GND E_JTMS USB_DP USB_DM U1_RX U1_TX U8 STM32F10x(48pin) 4 6 8 22 22 R23 1K5 USB_5V Z5V1 VCC STLINKII/USB R24 R25 Z5V1 +3V3 Z5V1 Vin Vout U3 LD1117-3V3 JP1 USB-B eVCC GND GND D+ DVCC CN1 C5 100uF/16V 3 0 4 3 2 1 2 C6 10uF +3V3 eVCCR44 1 51 JTDO 51 nRSTIN R36 R34 D3 D7 D2 D6 D1 D5 T_JTDO T_JRST Z5V1 Z5V1 nJTRST JTDI JTMS JTCK 51 51 51 51 R40 R39 R38 R37 Z5V1 CN6 E_JRST E_JTDO E_JTDI E_JTCK 48 47 46 45 44 43 42 41 40 39 38 37 T_NRST T_JTDI T_JTMS T_JTCK C38 104P 1 3 5 7 9 11 13 15 17 19 IDC-20 C27 104P VTref VCC nJTRST TDI TMS TCK RTCK TDO nRST DBGRQ DBGACK CN8 C33 104P 2 4 6 8 10 12 14 16 18 20 LD2 RED R4 510 T_RST USB_5V JVCC LD1 RED R3 510 R32 51 D4 D8 R41 51 LD3 GREEN R27 510 U1_RX U1_TX ST-LINK T_JTCK T_JTDO T_JTDI T_NRST T_JRST GND Figure 6. VDD_3 VSS_3 PB9 PB8 BOOT0 PB7 PB6 PB5 JNRST JTDO JTDI JTCK Embedded ST-LINK U2_RX U2_CK S1_CK S1_MISO S1_MOSI PB0 PB1 PB2/BOOT1 PB10 PB11 VSS_1 VDD_1 7.1 13 14 15 16 17 18 19 20 21 22 23 24 Schematics LED1 GND +3V3 7 1 Z5V1 LED1 16/24 Z5V1 JVCC Schematics UM0621 eVCC OSCIN UM0621 Schematics 7.2 Inputs and outputs Figure 7. Inputs and outputs KEY3 JP14 10 8 6 4 2 9 7 5 3 1 DOWN UP LEFT RIGHT SELECT 6 4 1 3 SELECT 2 Joystick 5 UP RIGHT LEFT DWON Selection COMMON G G MT008-A Joystick 3 2 VDD KEY1 Wakeup 1 5 3 1 2 Key 3 6 4 2 2 PB10 PC13 PA0 3 User_Button Anti_Tamper WAKEUP LED1 LED2 LED3 LED4 JP12 2 4 6 8 PF6 PF7 PF8 PF9 510 1 3 5 7 R45 100K 4 KEY4 Key 1 4 KEY2 Tamper RS2 4 JP13 1 PB15 JOY_DOWN PB14 JOY_UP PB13 JOY_LEFT PB12 JOY_RIGHT PB11 JOY_SEL UP RIGHT LEFT DOWN LD7 GREEN 1 2 LD6 ORANGE 1 2 LD5 RED 1 2 LD4 BLUE 1 2 LED 17/24 Schematics UM0621 7.3 LCD Figure 8. LCD +3V3 R19 10K JP18 FSMC_NE4 RESET# FSMC_NWE FSMC_NOE LCD 1 2 PG12 1 2 3 4 5 A0 PD5 PD4 D7:0 D0 D1 D2 D3 D4 D5 D6 D7 C52 2.2uF C51 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2.2uF 2.2uF C50 C49 2.2uF +3V3C48 1uF C46 1uF C47 1uF C44 1uF R46 C45 1uF 510 +3V3 COG LCD 18/24 CS RST C/D WR RD D0 D1 D2 D3 D4 D5 D6/SCK D7/SID VSS VOUT CAP3P CAP1N CAP1P CAP2P CAP2N V4 V3 V2 V1 V0 C86 P/S G2 VDD G1 LCD12864 0 0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 PE0 PE2 PE4 PE6 PC14 PF0 PF2 PF4 PF6 PF8 PF10 PC1 PC3 PA1 PA3 PA5 PA7 PC5 PB1 PF11 PF13 PF15 PG1 PE8 PE10 PE12 PE14 PB10 PB12 PB14 PD8 PD10 PD12 PD14 PG2 PG4 PG6 PG8 PC7 PC9 PA9 PA11 PA13 PA15 PC11 PD0 PD2 PD4 PD6 PG9 PG11 PG13 PG15 PB4 PB6 PB8 CN112 1 CN102 1 EXT 85 87 89 91 93 95 97 99 101 103 105 107 109 111 CN7D EXT 57 59 61 63 65 67 69 71 73 75 77 79 81 83 CN7C EXT 29 31 33 35 37 39 41 43 45 47 49 51 53 55 CN7B EXT 1 3 5 7 9 11 13 15 17 19 21 23 25 27 CN7A 86 88 90 92 94 96 98 100 102 104 106 108 110 112 58 60 62 64 66 68 70 72 74 76 78 80 82 84 30 32 34 36 38 40 42 44 46 48 50 52 54 56 2 4 6 8 10 12 14 16 18 20 22 24 26 28 RESET# GND +3V3 BOOT0 86 88 90 92 94 96 98 100 102 104 106 108 110 112 58 60 62 64 66 68 70 72 74 76 78 80 82 84 30 32 34 36 38 40 42 44 46 48 50 52 54 56 2 4 6 8 10 12 14 16 18 20 22 24 26 28 PA14 PC10 PC12 PD1 PD3 PD5 PD7 PG10 PG12 PG14 PB3 PB5 PB7 PB9 PB13 PB15 PD9 PD11 PD13 PD15 PG3 PG5 PG7 PC6 PC8 PA8 PA10 PA12 PA4 PA6 PC4 PB0 PB2 PF12 PF14 PG0 PE7 PE9 PE11 PE13 PE15 PB11 PE1 PE3 PE5 PC13 PC15 PF1 PF3 PF5 PF7 PF9 PC0 PC2 PA0 PA2 MP4 MP3 MP2 MP1 X1 32768Hz 3 2 +3V3 4 1 GND C12 10pF C14 10pF JP9 R47 1M 1K R22 Key B1 RESET# 1 2 +3V3 JP9_1 46 47 48 133 134 135 136 137 139 140 69 70 73 74 75 76 26 27 28 29 44 45 96 97 98 99 111 112 113 7 8 9 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PB8 PB9 PB10 PB11 PB12 PB13 PB14 PB15 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC11 PC12 PC13 PC14 PC15 C23 20pF 10K R21 510 +3V3 C26 104P RESET# 23 X2 8MHz R26 25 24 106 C20 20pF 138 34 35 36 37 40 41 42 43 100 101 102 103 104 105 109 110 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PA8 PA9 PA10 PA11 PA12 PA13 PA14 PA15 BOOT0 USB_Disconnect MicroSDCard_D0 MicroSDCard_D1 MicroSDCard_D2 MicroSDCard_D3 MicroSDCard_CLK Anti_Tamper MSD_DET MSD_WP Potentiometer SPI1_CS TDO/SWO TRST SD_PWR I2C_SCK I2C_SDA CAN_RX CAN_TX User_Button JOY_SEL JOY_RIGHT JOY_LEFT JOY_UP JOY_DOWN SPI1_SCK SPI1_MISO SPI1_MOSI LCD_backlight USART1_TX USART1_RX USB_DM USB_DP TMS/SWDIO TCK/SWCLK TDI WAKEUP USART2_RTS USART2_TX USART2_RX 1 2 STM32F103ZET6 IC149-144-045-B5 NRST OSC_OUT OSC_IN NC BOOT0 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC11 PC12 PC13-ANTI_TAMP PC14-OSC32_IN PC15-OSC32_OUT PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PB8 PB9 PB10 PB11 PB12 PB13 PB14 PB15 PA0-WKUP PA1 PA2 PA3 PA4 PA5 PA6 PA7 PA8 PA9 PA10 PA11 PA12 PA13 PA14 PA15 U6A PD15 PD14 PD13 PD12 PD11 PD10 PD9 PD8 PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PE6 PE5 PE4 PE3 PE2 PE1 PE0 PF15 PF14 PF13 PF12 PF11 PF10 PF9 PF8 PF7 PF6 PF5 PF4 PF3 PF2 PF1 PF0 PG15 PG14 PG13 PG12 PG11 PG10 PG9 PG8 PG7 PG6 PG5 PG4 PG3 PG2 PG1 PG0 86 85 82 81 80 79 78 77 123 122 119 118 117 116 115 114 68 67 66 65 64 63 60 59 58 5 4 3 2 1 142 141 55 54 53 50 49 22 21 20 19 18 15 14 13 12 11 10 132 129 128 127 126 125 124 93 92 91 90 89 88 87 57 56 PD15 PD14 PD13 PD12 PD11 PD10 PD9 PD8 PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PE6 PE5 PE4 PE3 PE2 PE1 PE0 PF15 PF14 PF13 PF12 PF11 PF10 PF9 PF8 PF7 PF6 PF5 PF4 PF3 PF2 PF1 PF0 PG15 PG14 PG13 PG12 PG11 PG10 PG9 PG8 PG7 PG6 PG5 PG4 PG3 PG2 PG1 PG0 D3 D2 D15 D14 D13 D1 D0 D12 D11 D10 D9 D8 D7 D6 D5 D4 A18 A17 A16 A22 A21 A20 A19 A23 A5 A4 A3 A2 A1 A0 A9 A8 A7 A6 A15 A14 A13 A12 A11 A10 A[0..23] D[0..15] MicroSDCard_CMD FSMC_NCE2 FSMC_NWAIT FSMC_NWE FSMC_NOE FSMC_NBL1 FSMC_NBL0 MicroSDCard_Detect LCD_CS LED4 LED3 LED2 LED1 FSMC_INT2 FSMC_NE3 FSMC_NE2 FSMC_NE4 A[0..23] D[0..15] JP8-52 1 JTAG JP11 10K JP5 2 1 31 30 71 107 143 38 16 51 61 83 94 120 130 10K +3V3 JP5-1 2 R6 1 JP4 2 1 VBAT VREF+ VDDA VDD_11 VDD_10 VDD_9 VDD_8 VDD_7 VDD_6 VDD_5 VDD_4 VDD_3 VDD_2 VDD_1 STM32F103ZET6 VREFVSSA VSS_1 VSS_2 VSS_3 VSS_4 VSS_5 VSS_6 VSS_7 VSS_8 VSS_9 VSS_10 VSS_11 U6B PB2 VDD C36 104P C4 104P 6 32 33 131 121 95 84 62 52 17 39 144 108 72 TDO/SWO TCK/SWCLK TMS/SWDIO TDI TRST BOOT0 PB3 PA14 PA13 PA15 PB4 MCU power 2 4 6 8 10 +3V3 JP4-1 2 R5 1 1 3 5 7 9 VREF- JTDO JTCK JTMS JTDI nJTRST C16 104P C21 104P C18 104P C35 104P C17 104P RS3 10K PA14 C24 104P MCU C15 104P C28 104P Vbat VREF+ VDDA +3V3 C34 104P VDD C32 104P VDD C3 104P VDD BT1 CR1220 1JP8 2 1JP8-1 2 1JP8-4 2 1JP8-3 2 1JP8-2 2 C19 104P R29 10K MCU 1 Figure 9. 4 MCU 2 7.4 3 PB3 PA13 PA15 PB4 GND UM0621 Schematics 19/24 C11 104P +3V3 FSMC_NCE2 FSMC_INT2 FSMC_NE2 FSMC_NWE FSMC_NOE FSMC_NE3 PD7 PG6 PG9 PD5 PD4 JP20 JP17 JP19 C2 104P PG10 PE0 PE1 1 2 20/24 1 2 C13 104P R15 10K +3V3 R33 10K +3V3 C29 104P R16 10K +3V3 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 NC NC NC I/O15 I/O14 I/O13 I/O12 I/O11 I/O10 I/O9 I/O8 I/O7 I/O6 I/O5 I/O4 I/O3 I/O2 I/O1 I/O0 VCC VCC C39 104P IS61LV6416 GND GND UB LB OE /W/E/ CE A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 U9 C22 104P 12 34 40 39 41 17 6 1 2 3 4 5 18 19 20 21 24 25 26 27 42 43 44 D[0..15] A[0..23] C40 104P R17 10K +3V3 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 38 37 36 35 32 31 30 29 16 15 14 13 10 9 8 7 22 23 28 +3V3 11 33 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 SST39LF040 CE WE OE A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 U5 I2C_SCK I2C_SDA SPI_CS SPI_MISO SPI_SCK SPI_MOSI 30 7 32 9 6 10 11 5 4 12 1 31 2 3 13 14 15 16 17 18 19 20 24 SPI 12 10 8 6 4 2 D7 D6 D5 D4 D3 D2 D1 D0 +3V3 8 29 28 27 26 25 23 22 21 JP21 PB6 11 PB7 9 PB2 7 PA6 5 PA5 3 PA7 1 GND VCC IO7 IO6 IO5 IO4 IO3 IO2 IO1 IO0 16 17 18 8 9 29 30 31 32 41 42 43 44 WP RB VSS VSS VDD VDD M25P80 HOLD C VCC D S VSS Q W U7 M24C02 7 8 1 2 19 7 13 36 12 37 1 2 3 4 6 5 4 3 GND +3V3 +3V3 NAND512W3A2CN6E NAND512W3A2BN6E CL AL W R E I/O0 I/O1 I/O2 I/O3 I/O4 I/O5 I/O6 I/O7 U4 +3V3 U10 8 VCC A0 7 WP A1 6 SCL A2 5 SDA GND +3V3 C25 104P GND R43 R30 4K7 4K7 +3V3+3V3 A16 A17 D0 D1 D2 D3 D4 D5 D6 D7 R18 10K +3V3 7.5 1 2 FSMC_NBL0 FSMC_NBL1 D[0..15] A[0..23] Schematics UM0621 Memories Figure 10. Memories UM0621 7.6 Schematics Peripherals Figure 11. Peripherals CN4 USB-B VCC DD+ GND SHELL SHELL USB_5V 1 2 3 4 0 0 R10 22 T1 SI2301DS 1 3 +3V3 R8 R9 1K5 1 2 PC7 +3V3 CAN USB_DM USB_DP JP6 2 R7 10K PA11 PA12 22 R14 10K R13 10K 1 3 5 CAN 2 CANSP 4 CANTX 6 CANRX +3V3 GND U2 1 4 3 2 1 6 2 7 3 8 4 9 5 CANL CANH R12 120 TX CANL RXO CANH VCC RX1 GND ASC L9616 6 7 5 8 CANSP PB9 PB8 CN5 DB9-male CAN +3V3 JP16 JP7 Load R1 10K R2 10K +3V3 +3V3 +3V3 2 C43 104P RV1 10K D9 TXD +3V3 PB0 R49 D10 TOP1838 1 3 PC4 3 R48 1K 10K PB1 Potentiometer 2 Potentiometer JP22 SEL 1 JP15 1 2 CAN_TX CAN_RX USB USB_Disconnect 21/24 Schematics 7.7 UM0621 SD Card Figure 12. SD Card +3V3 1 2 T2 SI2301DS 2 3 PB5 SD_PWR 1 R20 10K JP2-1 +3V3 C30 10uF RS1 R11 10K 10K CN9 JP2 MSD_D1 MSD_D0 MSD_CLK MSD_CMD MSD_D3 MSD_D2 PC9 PC8 PC12 PD2 PC11 PC10 2 4 6 8 10 12 1 3 5 7 9 11 1 2 3 4 5 6 7 8 9 PC11 PD2 PC12 PC8 PC9 PC10 MicroSD 10 JP10 PC2 PC3 MSD_DET MSD_WP 2 4 C31 104P 1 3 11 DAT3 CMD VSS1 VDD CLK VSS2 DAT0 DAT1 DAT2 nCD WP shell shell shell shell 12 13 14 15 MicroSD MicroSD card 7.8 UART Figure 13. UART +3V3 C1 104P U1 C7 104P 2 1 C8 104P 3 JP3 USART1_TX USART1_RX USART2_TX USART2_RX PA9 PA10 PA2 PA3 7 5 3 1 11 8 6 4 2 12 10 RS232 9 6 C10 104P 22/24 V+ VCC C1+ C2- C1T1in CN2 DB9-male USART1 C2+ T1out R1out R1in T2in T2out R2out R2in V- GND ST3232ECTR 16 5 C9 104P 4 14 RS232_TX1 13 RS232_RX1 7 8 15 1 6 2 7 3 8 4 9 5 CN3 DB9-male USART2 1 6 2 7 3 8 4 9 5 UM0621 Revision history Revision history Table 5. Document revision history Date Revision 13-Jan-2009 1 Changes Initial release. 23/24 UM0621 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2009 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 24/24