




已阅读5页,还剩23页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
November 2011Doc ID 13675 Rev 71/28 AN2586 Application note Getting started with STM32F10 xxx hardware development Introduction This application note is intended for system designers who require a hardware implementation overview of the development board features such as the power supply, the clock management, the reset control, the boot mode settings and the debug management. It shows how to use the low-density value line, low-density, medium-density value line, medium-density, high-density, XL-density and connectivity line STM32F10 xxx product families and describes the minimum hardware resources required to develop an STM32F10 xxx application. Detailed reference design schematics are also contained in this document with descriptions of the main components, interfaces and modes. Glossary Low-density value line devices are STM32F100 xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. Medium-density value line devices are STM32F100 xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. Medium-density devices are STM32F100 xx, STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. High-density value line devices are STM32F100 xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. XL-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 768 Kbytes and 1 Mbyte. Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers. ContentsAN2586 2/28 Doc ID 13675 Rev 7 Contents 1Power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1.1Independent A/D converter supply and reference voltage . . . . . . . . . . . . 6 1.1.2Battery backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.1.3Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3Reset and power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.1Power on reset (POR) / power down reset (PDR) . . . . . . . . . . . . . . . . . . 8 1.3.2Programmable voltage detector (PVD) . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3.3System reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1HSE OSC clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.1External source (HSE bypass) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.2External crystal/ceramic resonator (HSE crystal) . . . . . . . . . . . . . . . . . 12 2.2LSE OSC clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1External source (LSE bypass) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.2External crystal/ceramic resonator (LSE crystal) . . . . . . . . . . . . . . . . . . 13 2.3Clock security system (CSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3Boot configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1Boot mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2Boot pin connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3Embedded boot loader mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4Debug management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2SWJ debug port (serial wire and JTAG) . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3Pinout and debug port pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3.1SWJ debug port pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3.2Flexible SWJ-DP pin assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3.3Internal pull-up and pull-down resistors on JTAG pins . . . . . . . . . . . . . . 19 4.3.4SWJ debug port connection with standard JTAG connector . . . . . . . . . 19 AN2586Contents Doc ID 13675 Rev 73/28 5Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.1Printed circuit board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2Component position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3Ground and power supply (VSS, VDD) . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.4Decoupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.5Other signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.6Unused I/Os and features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6Reference design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.1Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.2Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.3Boot mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.4SWJ interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.5Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.2Component references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 List of tablesAN2586 4/28 Doc ID 13675 Rev 7 List of tables Table 1.Boot modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 2.Debug port pin assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 3.SWJ I/O pin availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 4.Mandatory components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Table 5.Optional components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Table 6.Reference connection for all packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Table 7.Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 AN2586List of figures Doc ID 13675 Rev 75/28 List of figures Figure 1.Power supply overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Figure 2.Power supply scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figure 3.Power on reset/power down reset waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figure 4.PVD thresholds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 5.Reset circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Figure 6.External clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Figure 7.Crystal/ceramic resonators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Figure 8.External clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Figure 9.Crystal/ceramic resonators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Figure 10.Boot mode selection implementation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Figure 11.Host-to-board connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Figure 12.JTAG connector implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figure 13.Typical layout for VDD/VSS pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Figure 14.STM32F103ZE(T6) microcontroller reference schematic. . . . . . . . . . . . . . . . . . . . . . . . . . 24 Power suppliesAN2586 6/28 Doc ID 13675 Rev 7 1 Power supplies 1.1 Introduction The device requires a 2.0 V to 3.6 V operating voltage supply (VDD). An embedded regulator is used to supply the internal 1.8 V digital power. The real-time clock (RTC) and backup registers can be powered from the VBAT voltage when the main VDD supply is powered off. Figure 1.Power supply overview Note:VDDA and VSSA must be connected to VDD and VSS, respectively. 1.1.1 Independent A/D converter supply and reference voltage To improve conversion accuracy, the ADC has an independent power supply that can be filtered separately, and shielded from noise on the PCB. the ADC voltage supply input is available on a separate VDDA pin an isolated supply ground connection is provided on the VSSA pin When available (depending on package), VREF must be tied to VSSA. On 100-pin and 144-pin packages To ensure a better accuracy on low-voltage inputs, the user can connect a separate external reference voltage ADC input on VREF+. The voltage on VREF+ may range from 2.4 V to VDDA. A/D converter VDD VSS I/O Ring BKP registers Temp. sensor Reset block Standby circuitry PLL (Wakeup logic, IWDG) RTC Voltage regulator Core memories digital peripherals Low voltage detector (VSSA) VREF VDDA domain VDD domain1.8 V domain Backup domain LSE crystal 32 KHz oscillator RCC BDCR register ai14863 (from 2.4 V up to VDDA) VREF+ (VDD) VDDA (VSS) VSSA (VDD) VBAT AN2586Power supplies Doc ID 13675 Rev 77/28 On packages with 64 pins or less The VREF+ and VREF- pins are not available, they are internally connected to the ADC voltage supply (VDDA) and ground (VSSA). 1.1.2 Battery backup To retain the content of the Backup registers when VDD is turned off, the VBAT pin can be connected to an optional standby voltage supplied by a battery or another source. The VBAT pin also powers the RTC unit, allowing the RTC to operate even when the main digital supply (VDD) is turned off. The switch to the VBAT supply is controlled by the power down reset (PDR) circuitry embedded in the Reset block. If no external battery is used in the application, it is highly recommended to connect VBAT externally to VDD. 1.1.3 Voltage regulator The voltage regulator is always enabled after reset. It works in three different modes depending on the application modes. in Run mode, the regulator supplies full power to the 1.8 V domain (core, memories and digital peripherals) in Stop mode, the regulator supplies low power to the 1.8 V domain, preserving the contents of the registers and SRAM in Standby mode, the regulator is powered off. The contents of the registers and SRAM are lost except for those concerned with the Standby circuitry and the Backup domain. 1.2 Power supply schemes The circuit is powered by a stabilized power supply, VDD. Caution: If the ADC is used, the VDD range is limited to 2.4 V to 3.6 V If the ADC is not used, the VDD range is 2.0 V to 3.6 V The VDD pins must be connected to VDD with external decoupling capacitors (one 100 nF Ceramic capacitor for each VDD pin + one Tantalum or Ceramic capacitor (min. 4.7 F typ.10 F). The VBAT pin can be connected to the external battery (1.8 V VBAT 3.6 V). If no external battery is used, it is recommended to connect this pin to VDD with a 100 nF external ceramic decoupling capacitor. The VDDA pin must be connected to two external decoupling capacitors (100 nF Ceramic + 1 F Tantalum or Ceramic). The VREF+ pin can be connected to the VDDA external power supply. If a separate, external reference voltage is applied on VREF+, a 100 nF and a 1 F capacitors must be connected on this pin. In all cases, VREF+ must be kept between 2.4 V and VDDA. Additional precautions can be taken to filter analog noise: VDDA can be connected to VDD through a ferrite bead. The VREF+ pin can be connected to VDDA through a resistor (typ. 47). Power suppliesAN2586 8/28 Doc ID 13675 Rev 7 Figure 2.Power supply scheme 1.Optional. If a separate, external reference voltage is connected on VREF+, the two capacitors (100 nF and 1 F) must be connected. 2.VREF+ is either connected to VDDA or to VREF. 3.N is the number of VDD and VSS inputs. 1.3 Reset and power supply supervisor 1.3.1 Power on reset (POR) / power down reset (PDR) The device has an integrated POR/PDR circuitry that allows proper operation starting from 2 V. The device remains in the Reset mode as long as VDD is below a specified threshold, VPOR/PDR, without the need for an external reset circuit. For more details concerning the power on/power down reset threshold, refer to the electrical characteristics in the low- density, medium-density, high-density, XL-density, and connectivity line STM32F10 xxx datasheets. Figure 3.Power on reset/power down reset waveform VBAT STM32F10 xxx N 100 nF VDD + 1 10 F 100 nF + 1 F 100 nF + 1 F (note 1) Battery VBAT VREF+ VDDA VSSA VREF VDD 1/2/3/./N VSS 1/2/3/./N VREF VDD ai14865b VDD POR PDR 40 mV hysteresis Temporization tRSTTEMPO RESET ai14364 AN2586Power supplies Doc ID 13675 Rev 79/28 1.3.2 Programmable voltage detector (PVD) You can use the PVD to monitor the VDD power supply by comparing it to a threshold selected by the PLS2:0 bits in the Power control register (PWR_CR). The PVD is enabled by setting the PVDE bit. A PVDO flag is available, in the Power control/status register (PWR_CSR), to indicate whether VDD is higher or lower than the PVD threshold. This event is internally connected to EXTI Line16 and can generate an interrupt if enabled through the EXTI registers. The PVD output interrupt can be generated when VDD drops below the PVD threshold and/or when VDD rises above the PVD threshold depending on the EXTI Line16 rising/falling edge configuration. As an example the service routine can perform emergency shutdown tasks. Figure 4.PVD thresholds 1.3.3 System reset A system reset sets all registers to their reset values except for the reset flags in the clock controller CSR register and the registers in the Backup domain (see Figure 1). A system reset is generated when one of the following events occurs: 1.A low level on the NRST pin (external reset) 2. window watchdog end-of-count condition (WWDG reset) 3. Independent watchdog end-of-count condition (IWDG reset) 4. A software reset (SW reset) 5. Low-power management reset The reset source can be identified by checking the reset flags in the Control/Status register, RCC_CSR. VDD 100 mV hysteresis PVD threshold PVD output ai14365 Power suppliesAN2586 10/28 Doc ID 13675 Rev 7 The STM32F1xx does not require an external reset circuit to power-up correctly. Only a pull- down capacitor is recommended to improve EMS performance by protecting the device against parasitic resets. See Figure 5. Charging and discharging a pull-down capacitor through an internal resistor increases the device power consumption. The capacitor recommended value (100 nF) can be reduced to 10 nF to limit this power consumption; Figure 5.Reset circuit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AN2586Clocks Doc ID 13675 Rev 711/28 2 Clocks Three different clock sources can be used to drive the system clock (SYSCLK): HSI oscillator clock (high-speed internal clock signal) HSE oscillator clock (high-speed external clock signal) PLL clock The devices have two secondary clock sources: 40 kHz low-speed internal RC (LSI RC) that drives the independent watchdog and, optionally, the RTC used for Auto-wakeup from the Stop/Standby modes. 32.768 kHz low-speed external crystal (LSE crystal) that optionally drives the real-time clock (RTCCLK) Each clock source can be switched on or off independently when it is not used, to optimize the power consumption. Refer to the STM32F10 xxx or STM32F100 xx reference manual (RM0008 or RM0041, respectively) for a description of the clock tree: RM0008 for STM32F101xx, STM32F102xx, STM32F103xx and STM32F105xx/107xx microcontrollers RM0041 for STM32F100 xx value line microcontrollers 2.1 HSE OSC clock The high-speed external clock signal (HSE) can be generated from two possible clock sources: HSE
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年酒店管理专业技能面试题与应对策略
- 2025年建筑装饰设计师职业资格认证考试预测题详解
- 2025年化工工艺面试热点烷基化工艺答题技巧与答案解析
- 他字的笔顺教学课件
- 2025年农业工程技术与装备考试要点梳理
- 2025年焊接技能认证考试模拟题及答案全解含钎焊
- 2025年特岗教师招聘美术学科面试专业知识点梳理与预测题解析
- 2025年物联网初级工程师高频考题解析
- 2025年酒店经理高级面试实战指南与模拟题解析
- 2025年初级产品经理实战模拟面试题库及解析
- 《钓鱼的艺术教学》课件
- 2025-2030在线语言教育行业发展分析及前景趋势与投资研究报告
- T-CACM 1064-2018 针刀医学临床 通.用要求
- 天津市南开区2025年数学五年级第二学期期末综合测试试题含答案
- 骨干教师培训讲座内容
- 电气行业与市场分析
- 2025年乡村全科助理医师考试题库及答案
- toc培训课件教学课件
- 菌毒种或样本等感染性材料管理制度
- 排水设施养护管理制度
- 基于人工智能的智能投顾系统研究
评论
0/150
提交评论