![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is information on a product in full production. march 2014 docid15274 rev 7 1/104 stm32f105xx stm32f107xx connectivity line, arm ? -based 32-bit mcu with 64/256 kb flash, usb otg, ethernet, 10 timers, 2 cans, 2 adcs, 14 communication interfaces datasheet - production data features ? core: arm ? 32-bit cortex ? -m3 cpu ? 72 mhz maximum frequency, 1.25 dmips/mhz (dhrystone 2.1) performance at 0 wait state memory access ? single-cycle multiplication and hardware division ? memories ? 64 to 256 kbytes of flash memory ? 64 kbytes of general-purpose sram ? clock, reset and supply management ? 2.0 to 3.6 v application supply and i/os ? por, pdr, and programmable voltage detector (pvd) ? 3-to-25 mhz cr ystal oscillator ? internal 8 mhz factory-trimmed rc ? internal 40 khz rc with calibration ? 32 khz oscillator for rtc with calibration ? low power ? sleep, stop and standby modes ? vbat supply for rtc and backup registers ? 2 12-bit, 1 s a/d converters (16 channels) ? conversion range: 0 to 3.6 v ? sample and hold capability ? temperature sensor ? up to 2 msps in interleaved mode ? 2 12-bit d/a converters ? dma: 12-channel dma controller ? supported peripherals: timers, adcs, dac, i2ss, spis, i2cs and usarts ? debug mode ? serial wire debug (swd) & jtag interfaces ?cortex ? -m3 embedded trace macrocell? ? up to 80 fast i/o ports ? 51/80 i/os, all mappable on 16 external interrupt vectors and almost all 5 v-tolerant ? crc calculation unit, 96-bit unique id ? up to 10 timers with pinout remap capability ? up to four 16-bit timers, each with up to 4 ic/oc/pwm or pulse counter and quadrature (incremental) encoder input ? 1 16-bit motor control pwm timer with dead-time generation and emergency stop ? 2 watchdog timers (independent and window) ? systick timer: a 24-bit downcounter ? 2 16-bit basic timers to drive the dac ? up to 14 communication interfaces with pinout remap capability ? up to 2 i2c interfaces (smbus/pmbus) ? up to 5 usarts (iso 7816 interface, lin, irda capability, modem control) ? up to 3 spis (18 mbit/s), 2 with a multiplexed i2s interface that offers audio class accuracy via advanced pll schemes ? 2 can interfaces (2.0b active) with 512 bytes of dedicated sram ? usb 2.0 full-speed device/host/otg controller with on-chip phy that supports hnp/srp/id with 1.25 kbytes of dedicated sram ? 10/100 ethernet mac with dedicated dma and sram (4 kbytes): ieee1588 hardware support, mii/rmii available on all packages table 1. device summary reference part number stm32f105xx stm32f105r8, stm32f105v8 stm32f105rb, stm32f105vb stm32f105rc, stm32f105vc stm32f107xx stm32f107rb, stm32f107vb stm32f107rc, stm32f107vc lqfp100 14 14 mm lqfp64 10 10 mm fbga lfbga100 10 10 mm www.st.com
contents stm32f105xx, stm32f107xx 2/104 docid15274 rev 7 contents 1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1 device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 full compatibility throughout the family . . . . . . . . . . . . . . . . . . . . . . . . . . .11 2.3 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.1 arm cortex-m3 core with embedded flash and sram . . . . . . . . . . . . 13 2.3.2 embedded flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3.3 crc (cyclic redundancy check) calculation unit . . . . . . . . . . . . . . . . . . 13 2.3.4 embedded sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3.5 nested vectored interrupt controller (nvic) . . . . . . . . . . . . . . . . . . . . . . 13 2.3.6 external interrupt/event controller (exti) . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.7 clocks and startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.8 boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.9 power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.10 power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.11 voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.12 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.13 dma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.14 rtc (real-time clock) and backup register s . . . . . . . . . . . . . . . . . . . . . . 16 2.3.15 timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3.16 i2c bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3.17 universal synchronous/asynchronous receiver transmitters (usarts) . 18 2.3.18 serial peripheral interface (spi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.19 inter-integrated sound (i 2 s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.20 ethernet mac interf ace with dedicated dma an d ieee 1588 support . 19 2.3.21 controller area network (can) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.22 universal serial bus on-the-go full-speed (usb otg fs) . . . . . . . . . . . 20 2.3.23 gpios (general-purpose inputs/outputs) . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.24 remap capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.25 adcs (analog-to-digital converters) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.26 dac (digital-to-analog converter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.27 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.3.28 serial wire jtag debug port (swj-dp) . . . . . . . . . . . . . . . . . . . . . . . . . 22 docid15274 rev 7 3/104 stm32f105xx, stm32f107xx contents 4 2.3.29 embedded trace macrocell? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3 pinouts and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4 memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5 electrical characteristi cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1 parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.1 minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.2 typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.3 typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.4 loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.5 pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.6 power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.1.7 current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.2 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5.3 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.3.1 general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.3.2 operating conditions at power-up / powe r-down . . . . . . . . . . . . . . . . . . 37 5.3.3 embedded reset and power control bloc k characteristics . . . . . . . . . . . 37 5.3.4 embedded reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5.3.5 supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5.3.6 external clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.3.7 internal clock source charac teristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 5.3.8 pll, pll2 and pll3 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.3.9 memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.3.10 emc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.3.11 absolute maximum ratings (electrical sensitivity) . . . . . . . . . . . . . . . . . 55 5.3.12 i/o current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.3.13 i/o port characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.3.14 nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.3.15 tim timer characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.3.16 communications interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.3.17 12-bit adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 5.3.18 dac electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.3.19 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 contents stm32f105xx, stm32f107xx 4/104 docid15274 rev 7 6 package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6.1 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6.2 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.2.1 reference document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.2.2 selecting the product temperature range . . . . . . . . . . . . . . . . . . . . . . . 88 7 part numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 appendix a application block diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 a.1 usb otg fs interface solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 a.2 ethernet interface solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 a.3 complete audio player solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 a.4 usb otg fs interface + ethernet/i 2 s interface solutions . . . . . . . . . . . . 97 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 docid15274 rev 7 5/104 stm32f105xx, stm32f107xx list of tables 6 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. stm32f105xx and stm32f107xx features and peri pheral counts . . . . . . . . . . . . . . . . . . 10 table 3. stm32f105xx and stm32f107xx family versus stm32f103xx family . . . . . . . . . . . . . . 11 table 4. timer feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 5. pin definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 6. voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 7. current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 8. thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 9. general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 10. operating conditions at power-up / power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 11. embedded reset and power control block characterist ics. . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 12. embedded internal reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 8 table 13. maximum current consumption in run mode, code with data processing running from flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 table 14. maximum current consumption in run mode, code with data processing running from ram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 table 15. maximum current consumption in sleep mode, code running from flash or ram. . . . . . . 40 table 16. typical and maximum current consumptions in stop and standby modes . . . . . . . . . . . . 40 table 17. typical current consumption in run mode, code with data processing running from flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 18. typical current consumption in sleep mode, code running from flash or ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 19. peripheral current consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 20. high-speed external user clock characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 21. low-speed external user clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 22. hse 3-25 mhz oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 8 table 23. lse oscillator characteristics (f lse = 32.768 khz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 24. hsi oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 25. lsi oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 26. low-power mode wakeup timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 27. pll characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 28. pll2 and pll3 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 29. flash memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 30. flash memory endurance and data retention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 31. ems characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 32. emi characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 33. esd absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 34. electrical sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 35. i/o current injection susceptibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 36. i/o static characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 37. output voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 38. i/o ac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 39. nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 table 40. timx characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 41. i 2 c characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 42. scl frequency (f pclk1 = 36 mhz.,v dd = 3.3 v) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 43. spi characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 table 44. i 2 s characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 list of tables stm32f105xx, stm32f107xx 6/104 docid15274 rev 7 table 45. usb otg fs startup time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 46. usb otg fs dc electrical characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 47. usb otg fs electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 table 48. ethernet dc electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 49. dynamic characteristics: ethernet mac signals for smi. . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 50. dynamic characteristics: ethernet mac signals for rmii . . . . . . . . . . . . . . . . . . . . . . . . . . 73 table 51. dynamic characteristics: ethernet mac signals for mii . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 52. adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 53. r ain max for f adc = 14 mhz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 table 54. adc accuracy - limited test conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 55. adc accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 56. dac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 table 57. ts characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 table 58. lfbga100 - 10 x 10 mm low profile fine pitch ball grid array package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 table 59. lqpf100 ? 100-pin low-profile quad flat package mechanical data . . . . . . . . . . . . . . . . . 85 table 60. lqfp64 ? 64 pin low-profile quad flat package mechanical data. . . . . . . . . . . . . . . . . . . . 86 table 61. package thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 table 62. ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 table 63. pll configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 64. applicative current consumpt ion in run mode, code with data processing running from flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 table 65. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 docid15274 rev 7 7/104 stm32f105xx, stm32f107xx list of figures 8 list of figures figure 1. stm32f105xx and stm32f107xx connectivity li ne block diagram . . . . . . . . . . . . . . . . . 12 figure 2. stm32f105xxx and stm32f107xxx connectivity line bga100 ballout top view. . . . . . . . 23 figure 3. stm32f105xxx and stm32f107xxx connectivity line lqfp100 pinout . . . . . . . . . . . . . . 24 figure 4. stm32f105xxx and stm32f107xxx connectivity line lqfp64 pinout . . . . . . . . . . . . . . . 25 figure 5. memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 6. pin loading conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 7. pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 8. power supply scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 9. current consumption measurement scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 10. typical current consumption on v bat with rtc on vs. temperature at different v bat values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 11. typical current consumption in stop mode with regulator in run mode versus temperature at different v dd values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 12. typical current consumption in stop mode with regulator in low-power mode versus temperature at different v dd values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 13. typical current consumption in standby mode versus temperature at different v dd values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 14. high-speed external clock source ac timing diagra m . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 15. low-speed external clock source ac timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 16. typical application with an 8 mhz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 17. typical application with a 32.768 khz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 18. standard i/o input characterist ics - cmos port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 figure 19. standard i/o input characteristics - ttl port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 8 figure 20. 5 v tolerant i/o inpu t characteristics - cmos port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 figure 21. 5 v tolerant i/o input characteristics - ttl port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 figure 22. i/o ac characteristics definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 23. recommended nrst pin protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 24. i 2 c bus ac waveforms and measurement ci rcuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 figure 25. spi timing diagram - slave mode and cpha = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 figure 26. spi timing diagram - slave mode and cpha = 1 (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 figure 27. spi timing diagram - master mode (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 28. i 2 s slave timing diagram (philips protocol) (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 figure 29. i 2 s master timing diag ram (philips protocol) (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 figure 30. usb otg fs timings: definition of data signal rise and fall time . . . . . . . . . . . . . . . . . . . . 71 figure 31. ethernet smi timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 figure 32. ethernet rmii timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 figure 33. ethernet mii timing di agram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 figure 34. adc accuracy characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 figure 35. typical connection diagram using the adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 figure 36. power supply and reference decoupling (v ref+ not connected to v dda ). . . . . . . . . . . . . . 78 figure 37. power supply and reference decoupling (v ref+ connected to v dda ). . . . . . . . . . . . . . . . . 78 figure 38. 12-bit buffered /non-buffered dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 figure 39. lfbga100 - 10 x 10 mm low profile fine pitch ball grid array package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 figure 40. recommended pcb design rules (0.80/0.75 mm pi tch bga) . . . . . . . . . . . . . . . . . . . . . . 84 figure 41. lqfp100, 100-pin low-profile quad flat package ou tline . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 42. recommended footprint (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 43. lqfp64 ? 64 pin low-profile quad flat package out line . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 list of figures stm32f105xx, stm32f107xx 8/104 docid15274 rev 7 figure 44. recommended footprint (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 figure 45. lqfp100 p d max vs. t a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 figure 46. usb otg fs device mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 figure 47. host connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 figure 48. otg connection (any protocol). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 figure 49. mii mode using a 25 mhz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 figure 50. rmii with a 50 mhz oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 figure 51. rmii with a 25 mhz crystal and phy with pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 figure 52. rmii with a 25 mhz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 figure 53. complete audio player solution 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 figure 54. complete audio player solution 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 figure 55. usb o44tg fs + ethernet solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 7 figure 56. usb otg fs + i 2 s (audio) solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 docid15274 rev 7 9/104 stm32f105xx, stm32f107xx introduction 103 1 introduction this datasheet provides the descriptio n of the stm32f105xx and stm32f107xx connectivity line microcontrollers. for mo re details on the whole stmicroelectronics stm32f10xxx family, please refer to section 2.2: full compatib ility throughou t the family . the stm32f105xx and stm32f107xx datasheet should be read in conjunction with the stm32f10xxx reference manual. for information on programming, erasing and protection of the internal flash memory please refer to the stm32f10xxx flash programming manual. the reference and flash programming manuals are both available from the stmicroelectronics website www.st.com. for information on the cortex ? -m3 core please refer to the cortex ? -m3 technical reference manual, available from the www.arm.com website. 2 description the stm32f105xx and stm32f107xx connectivi ty line family incorporates the high- performance arm ? cortex ? -m3 32-bit risc core operating at a 72 mhz frequency, high- speed embedded memories (flash memory up to 256 kbytes and sram 64 kbytes), and an extensive range of enhanced i/os and peripherals connected to two apb buses. all devices offer two 12-bit adcs, four general-purp ose 16-bit timers plus a pwm timer, as well as standard and advanced communication interfaces: up to two i 2 cs, three spis, two i2ss, five usarts, an usb otg fs and two cans. ethernet is available on the stm32f107xx only. the stm32f105xx and stm32f107xx connectivity line family operates in the ?40 to +105 c temperature range, from a 2.0 to 3.6 v power supply. a comprehensive set of power-saving mode allows the design of low-power applications. the stm32f105xx and stm32f107xx connectivi ty line family offers devices in three different package types: from 64 pins to 100 pins. depending on the device chosen, different sets of peripherals are included, the description below gives an overview of the complete range of peripherals proposed in this family. these features make the stm32f105xx and stm32f107xx connectivity line microcontroller family suitable for a wide rang e of applications such as motor drives and application control, medical and handheld e quipment, industrial applications, plcs, inverters, printers, and scanners, alarm systems, video intercom, hvac and home audio equipment. description stm32f105xx, stm32f107xx 10/104 docid15274 rev 7 2.1 device overview figure 1 shows the general block diagram of the device family. table 2. stm32f105xx and stm32f107xx features and peripheral counts peripherals (1) stm32f105rx stm32f107rx stm32f105vx stm32f107vx flash memory in kbytes 64 128 256 128 256 64 128 256 128 256 sram in kbytes 64 package lqfp64 lqfp 100 lqfp 100, bga 100 lqfp 100 lqfp 100 lqfp 100, bga 100 ethernet no yes no yes timers general- purpose 4 advanced- control 1 basic 2 communicat ion interfaces spi(i 2 s) (2) 3(2) 3(2) 3(2) 3(2) i 2 c2121 usart 5 usb otg fs yes can 2 gpios 51 80 12-bit adc number of channels 2 16 12-bit dac number of channels 2 2 cpu frequency 72 mhz operating voltage 2.0 to 3.6 v operating temperatures ambient temperatures: ?40 to +85 c /?40 to +105 c junction temperature: ?40 to + 125 c 1. please refer to table 5: pin definitions for peripheral availability when the i/o pi ns are shared by the peripherals required by the application. 2. the spi2 and spi3 interfaces give the flexibility to work in either the spi mode or the i 2 s audio mode. docid15274 rev 7 11/104 stm32f105xx, stm32f107xx description 103 2.2 full compatibility throughout the family the stm32f105xx and stm32f107xx constitu te the connectivity line family whose members are fully pin-to-pin, software and feature compatible. the stm32f105xx and stm32f107xx are a drop-in replacement for the low-density (stm32f103x4/6), medium-density (stm32f103x8/b) and high-density (stm32f103xc/d/e) performance line devices, a llowing the user to try different memory densities and peripherals providing a greate r degree of freedom during the development cycle. table 3. stm32f105xx and stm32f107xx family versus stm32f103xx family (1) stm32 device low-density stm32f103xx devices medium-density stm32f103xx devices high-density stm32f103xx devices stm32f105xx stm32f107xx flash size (kb) 16 32 32 64 128 256 384 512 64 128 256 128 256 ram size (kb) 6 10 10 202048646464646464 64 144 pins 5 usarts 4 16-bit timers, 2 basic timers, 3 spis, 2 i 2 ss, 2 i2cs, usb, can, 2 pwm timers 3 adcs, 2 dacs, 1 sdio, fsmc (100- and 144-pin packages (2) ) 100 pins 3 usarts 3 16-bit timers 2 spis, 2 i 2 cs, usb, can, 1 pwm timer 2 adcs 5 usarts, 4 16-bit timers, 2 basic timers, 3 spis, 2 i 2 ss, 2 i2cs, usb otg fs, 2 cans, 1 pwm timer, 2 adcs, 2 dacs 5 usarts, 4 16-bit timers, 2 basic timers, 3 spis, 2 i 2 s, 1 i2c, usb otg fs, 2 cans, 1 pwm timer, 2 adcs, 2 dacs, ethernet 64 pins 2 usarts 2 16-bit timers 1 spi, 1 i 2 c, usb, can, 1 pwm timer 2 adcs 2 usarts 2 16-bit timers 1 spi, 1 i 2 c, usb, can, 1 pwm timer 2 adcs 48 pins 36 pins 1. please refer to table 5: pin definitions for peripheral availability when the i/o pi ns are shared by the peripherals required by the application. 2. ports f and g are not available in devices delivered in 100-pin packages. description stm32f105xx, stm32f107xx 12/104 docid15274 rev 7 2.3 overview figure 1. stm32f105xx and stm32f107xx connectivity line block diagram 1. t a = ?40 c to +85 c (suffix 6, see table 62 ) or ?40 c to +105 c (suffix 7, see table 62 ), junction temperature up to 105 c or 125 c, respectively. 2. af = alternate function on i/o port pin. pa[ 15:0] ext.it wwdg 12bi t adc1 16 adc12_ins common to adc1 & adc2 jtdi jtck/ s wclk jtm s / s wdio njtr s t jtdo nr s t v dd = 2 to 3 .6 v 8 0 af pb[ 15:0] pc[15:0] ahb to apb2 can1_rx as af 2x( 8 x16b it) wkup gpio port a p gpio port b p f max : 72 mhz v ss s cl, s da, s mba i2c2 gp dma1 tim2 tim 3 xt al osc 3 -25 mhz xtal 3 2khz o s c_in o s c_out c_o o s c 3 2_out o s c 3 2_in apb1 : f max = 3 6 mhz hclk as af flash 256 kb voltage reg. 3 . 3 v to 1. 8 v v dd1 8 power backup interface as a f tim4 bus matri x 64 bit interface rtc rc h s cortex-m 3 cpu ibus dbus obl flashl s ram 512b u s art1 u s art2 s pi2 / i2 s 2 (1) bx can1 7 channels bac kup register 4 channels tim1 4 compl. channels s cl, s da, s mba i2c1 as af rx,tx, ct s , rt s , u s art 3 temp sensor pd[15:0] pe[15:0] bkin, etr input as af 4 channels , etr 4 channels , etr 4 channels , etr fclk rc l s s tandby iwdg @v dd @v bat por / pdr s upply supervision @v dda v dda v ss a @vdda v bat =1. 8 v to 3 .6 v ck as af rx,tx, ct s , rt s , ck as af rx,tx, ct s , rt s , ck as af apb2 : f max = 72 mhz nvic s pi1 mo s i,mi s o, s ck,n ss as af 12bit adc2 if if interface pvd reset int @v dd ahb to apb1 awu por tamper-rtc/ alarm/ s econd out s ystem 2x( 8 x16b it) s pi 3 / i2 s3 uart4 rx,tx as af uart5 rx,tx as af tim5 4 channel s, etr reset & clock control 12bit dac1 if if if 12bit dac 2 @vdda u s b otg f s s of vbu s id dm dp s ram 64 kb gp dma2 5 channels tim6 tim7 can1_tx as af s w/jtag tpiu etm trace/trig traceclk traced[0: 3 ] as af as af as af as af as a f ethernet mac 10/100 s ram 1.25 kb dpram 2 kb dpram 2 kb mii_txd[ 3 :0]/rmii_txd[1:0] mii_tx_clk/rmii_tx_clk mii_tx_en/rmii_tx_en mii_rxd[ 3 :0]/rmii_rxd[1:0] mii_rx_er/rmii_rx_er mii_rx_clk/rmii_ref_clk mii_rx_dv/rmii_cr s _dv mii_cr s mii_col/rmii_col mdc mdio pp s _out bx can2 can2_rx as af can2_tx a s af ai15411 dac_out1 as af dac_out2 as af @v dda pll gpio port c gpio port d gpio port e v ref+ v ref? mo s i/ s d, mi s o, mck, s ck/ck, n ss /w s as af mo s i/ s d, mi s o, mck, s ck/ck, n ss /w s as af pclk1 pclk2 pll2 pll 3 pll 3 dma ethernet ahb docid15274 rev 7 13/104 stm32f105xx, stm32f107xx description 103 2.3.1 arm cortex-m3 core wi th embedded flash and sram the arm cortex-m3 processor is the latest generation of arm processors for embedded systems. it has been developed to provide a low-cost platform that meets the needs of mcu implementation, with a reduced pin count and low-power consumption, while delivering outstanding computational performance and an advanced system response to interrupts. the arm cortex-m3 32-bit risc processor features exceptional code-efficiency, delivering the high-performance expected from an arm core in the memory size usually associated with 8- and 16-bit devices. with its embedded arm core, stm32f105xx and stm32f107xx connectivity line family is compatible with all arm tools and software. figure 1 shows the general block diagram of the device family. 2.3.2 embedded flash memory 64 to 256 kbytes of embedded flash is available for storing programs and data. 2.3.3 crc (cyclic redundan cy check) calculation unit the crc (cyclic redundancy check) calculation unit is used to get a crc code from a 32-bit data word and a fixed generator polynomial. among other applications, crc-based techniques are used to verify data transmission or storage integrity. in the scope of the en/iec 60335-1 standard, they offer a means of verifying the flash memory integrity. the crc calculation unit helps compute a signature of the software during runtime, to be compared with a reference signature generated at link- time and stored at a given memory location. 2.3.4 embedded sram 64 kbytes of embedded sram accessed (read/wr ite) at cpu clock speed with 0 wait states. 2.3.5 nested vectored interrupt controller (nvic) the stm32f105xx and stm32f107xx connectivity line embeds a nested vectored interrupt controller able to handle up to 67 maskable interrupt channels (not including the 16 interrupt lines of cortex-m3) and 16 priority levels. ? closely coupled nvic gives lo w latency interrupt processing ? interrupt entry vector table address passed directly to the core ? closely coupled nvic core interface ? allows early processing of interrupts ? processing of late arriving higher priority interrupts ? support for tail-chaining ? processor state automatically saved ? interrupt entry restored on interrupt exit with no instruction overhead this hardware block provides flexible interrupt management features with minimal interrupt latency. description stm32f105xx, stm32f107xx 14/104 docid15274 rev 7 2.3.6 external interrupt /event controller (exti) the external interrupt/event controller consists of 20 edge detector lines used to generate interrupt/event requests. each line can be independently configured to select the trigger event (rising edge, falling edge, both) and can be masked independently. a pending register maintains the status of the interrupt requests. the exti can detect an external line with a pulse width shorter than the in ternal apb2 clock period. up to 80 gpios can be connected to the 16 external interrupt lines. 2.3.7 clocks and startup system clock selection is perfor med on startup, however, the in ternal rc 8 mhz oscillator is selected as default cpu clock on reset. an external 3-25 mhz clock can be selected, in which case it is monitored for fa ilure. if failure is detected, th e system automatically switches back to the internal rc oscillator. a software interrupt is genera ted if enabled. similarly, full interrupt management of the pll clock entry is available when necessary (for example with failure of an indirectly used external oscillator). a single 25 mhz crystal can clock the entire system including the ethernet and usb otg fs peripherals. several prescalers and plls allow the configuration of the ahb frequency, the high speed apb (apb2) and the low speed apb (apb1) doma ins. the maximum frequency of the ahb and the high speed apb domains is 72 mhz. the maximum allowed frequency of the low speed apb do main is 36 mhz. refer to figure 55: usb o44tg fs + ethernet solution on page 97 . the advanced clock controller clocks the core and all peripherals using a single crystal or oscillator. in order to achieve audio class perfor mance, an audio crystal can be used. in this case, the i 2 s master clock can generate all standard sampling frequencies from 8 khz to 96 khz with less than 0.5% accuracy error. refer to figure 56: usb otg fs + i 2 s (audio) solution on page 97 . to configure the plls, please refer to table 63 on page 98 , which provides pll configurations according to the application type. 2.3.8 boot modes at startup, boot pins are used to select one of three boot options: ? boot from user flash ? boot from system memory ? boot from embedded sram the boot loader is located in system memory. it is used to reprogram the flash memory by using usart1, usart2 (remapped), can2 (remapped) or usb otg fs in device mode (dfu: device firmware upgrade). for remapped signals refer to table 5: pin definitions . the usart peripheral op erates with the internal 8 mhz oscillator (hsi), however the can and usb otg fs can only function if an ex ternal 8 mhz, 14.7456 mhz or 25 mhz clock (hse) is present. for full details about the boot loader, please refer to an2606. docid15274 rev 7 15/104 stm32f105xx, stm32f107xx description 103 2.3.9 power supply schemes ? v dd = 2.0 to 3.6 v: external power supply for i/os and the internal regulator. provided externally through v dd pins. ? v ssa , v dda = 2.0 to 3.6 v: external analog power supplies for adc, reset blocks, rcs and pll (minimum voltage to be applied to v dda is 2.4 v when the adc is used). v dda and v ssa must be connected to v dd and v ss , respectively. ? v bat = 1.8 to 3.6 v: power supply for rtc, external clock 32 khz oscillator and backup registers (through power switch) when v dd is not present. 2.3.10 power supply supervisor the device has an integrated power-on reset (por)/power-down reset (pdr) circuitry. it is always active, and ensures proper operation starting from/down to 2 v. the device remains in reset mode when v dd is below a specified threshold, v por/pdr , without the need for an external reset circuit. the device features an embedded programmable voltage detector (pvd) that monitors the v dd /v dda power supply and compares it to the v pvd threshold. an interrupt can be generated when v dd /v dda drops below the v pvd threshold and/or when v dd /v dda is higher than the v pvd threshold. the interrupt service routine can then generate a warning message and/or put the mcu into a safe state. the pvd is enabled by software. 2.3.11 voltage regulator the regulator has three operation modes: main (mr), low power (lpr) and power down. ? mr is used in the nominal regulation mode (run) ? lpr is used in the stop modes. ? power down is used in standby mode: the re gulator output is in high impedance: the kernel circuitry is powered do wn, inducing zero consumption (but the contents of the registers and sram are lost) this regulator is always enabled after reset. it is disabled in standby mode. 2.3.12 low-power modes the stm32f105xx and stm32f107xx connectivit y line supports three low-power modes to achieve the best compromise between low po wer consumption, short startup time and available wakeup sources: ? sleep mode in sleep mode, only the cpu is stopped. all peripherals continue to operate and can wake up the cpu when an interrupt/event occurs. ? stop mode stop mode achieves the lowest power consumption while retaining the content of sram and registers. all clocks in the 1.8 v domain are stopped, the pll, the hsi rc and the hse crystal oscillators are disabled . the voltage regulator can also be put either in normal or in low-power mode. the device can be woken up from stop mode by any of the exti line. the exti line source can be one of the 16 external lines, the pvd output, the rtc alarm or the usb otg fs wakeup. description stm32f105xx, stm32f107xx 16/104 docid15274 rev 7 ? standby mode the standby mode is used to achieve the lowest power consumption. the internal voltage regulator is switched off so that the entire 1.8 v domain is powered off. the pll, the hsi rc and the hse crystal oscillato rs are also switched off. after entering standby mode, sram and register contents are lost except for registers in the backup domain and standby circuitry. the device exits standby mode when an external reset (nrst pin), an iwdg reset, a rising edge on the wkup pin, or an rtc alarm occurs. note: the rtc, the iwdg, and the corresponding clock sources are not stopped by entering stop or standby mode. 2.3.13 dma the flexible 12-channel general-purpose dmas (7 channels for dma1 and 5 channels for dma2) are able to manage memory-to-memory , peripheral-to-memory and memory-to- peripheral transfers. the two dma controllers support circular buffer management, removing the need for user code interventio n when the controller reaches the end of the buffer. each channel is connected to dedicated hardw are dma requests, with support for software trigger on each channel. configuration is made by software and transfer sizes between source and destination are independent. the dma can be used with the main peripherals: spi, i 2 c, usart, general-purpose, basic and advanced control timers timx, dac, i 2 s and adc. in the stm32f107xx, there is a dma controlle r dedicated for use with the ethernet (see section 2.3.20: ethe rnet mac interface with dedicated dma and ieee 1588 support for more information). 2.3.14 rtc (real-time cl ock) and backup registers the rtc and the backup registers are supplied through a switch that takes power either on v dd supply when present or through the v bat pin. the backup registers are forty-two 16-bit registers used to store 84 bytes of user application data when v dd power is not present. they are not reset by a system or power re set, and they are not reset when the device wakes up from the standby mode. the real-time clock provides a set of continuously running counters which can be used with suitable software to provide a clock calendar function, and provides an alarm interrupt and a periodic interrupt. it is clocked by a 32.768 khz external crystal, resonator or oscillator, the internal low power rc oscillator or the high -speed external clock divided by 128. the internal low-speed rc has a typical frequency of 40 khz. the rtc can be calibrated using an external 512 hz output to compensate for any natural quartz deviation. the rtc features a 32-bit programmable counter for long term measurement using the compare register to generate an alarm. a 20-bit prescaler is us ed for the time base clock and is by default configured to generate a time base of 1 second from a clock at 32.768 khz. for more information, please refer to an2604: ? stm32f101xx and stm32f103xx rtc calibration ?, available from www.st.com . docid15274 rev 7 17/104 stm32f105xx, stm32f107xx description 103 2.3.15 timers and watchdogs the stm32f105xx and stm32f107xx devices include an advanced-control timer, four general-purpose timers, two basic timers, two watchdog timers and a systick timer. table 4 compares the features of the general-purpose and basic timers. advanced-control timer (tim1) the advanced control timer (tim1) can be seen as a three-phase pwm multiplexed on 6 channels. it has complementary pwm outputs with programmable inserted dead-times. it can also be seen as a complete general-purpose timer. the 4 independent channels can be used for: ? input capture ? output compare ? pwm generation (edge or center-aligned modes) ? one-pulse mode output if configured as a standard 16-bit timer, it has the same features as the timx timer. if configured as the 16-bit pw m generator, it has full modu lation capability (0-100%). the counter can be frozen in debug mode. many features are shared with those of the standard tim timers which have the same architecture. the advanced control timer can th erefore work together with the tim timers via the timer link feature for synchronization or event chaining. general-purpose timers (timx) there are up to 4 synchronizable standard timers (tim2, tim3, tim4 and tim5) embedded in the stm32f105xx and stm32f107xx connectiv ity line devices. these timers are based on a 16-bit auto-reload up/down counter, a 16-bit prescaler and feature 4 independent channels each for input capture/output comp are, pwm or one pulse mode output. this gives up to 16 input captures / output compares / pwms on the largest packages. they can work together with the advanced control timer vi a the timer link feature for synchronization or event chaining. the counter can be frozen in debug mode. table 4. timer feature comparison timer counter resolution counter type prescaler factor dma request generation capture/compare channels complementary outputs tim1 16-bit up, down, up/down any integer between 1 and 65536 yes 4 yes timx (tim2, tim3, tim4, tim5) 16-bit up, down, up/down any integer between 1 and 65536 yes 4 no tim6, tim7 16-bit up any integer between 1 and 65536 yes 0 no description stm32f105xx, stm32f107xx 18/104 docid15274 rev 7 any of the standard timers can be used to ge nerate pwm outputs. each of the timers has independent dma request generations. basic timers tim6 and tim7 these timers are mainly used for dac trigge r generation. they can also be used as a generic 16-bit time base. independent watchdog the independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. it is clocked from an independent 40 khz internal rc and as it operates independently from the main clock, it can operate in stop and stan dby modes. it can be used either as a watchdog to reset the device when a problem occurs, or as a free running timer for application timeout management. it is hardware or software configurable through the option bytes. the counter can be frozen in debug mode. window watchdog the window watchdog is based on a 7-bit downcounter that can be set as free running. it can be used as a watchdog to reset the device when a problem occurs. it is clocked from the main clock. it has an early warning interrupt capab ility and the counter can be frozen in debug mode. systick timer this timer is dedicated to real-time operating systems, but could also be used as a standard down counter. it features: ? a 24-bit down counter ? autoreload capability ? maskable system interrupt generation when the counter reaches 0. ? programmable clock source 2.3.16 i2c bus up to two i2c bus interfaces can operate in multimaster and slave mo des. they can support standard and fast modes. they support 7/10-bit addressing mode and 7-bit dual addressing mode (as slave). a hardware crc generation/verification is embedded. they can be served by dma and they support smbus 2.0/pmbus. 2.3.17 universal synchr onous/asynchronous receiver transmitters (usarts) the stm32f105xx and stm32f107xx connectivity line embeds three universal synchronous/asynchronous receiver transmitters (usart1, usart2 and usart3) and two universal asynchronous receiver transmitters (uart4 and uart5). these five interfaces provide asynchronou s communication, irda sir endec support, multiprocessor communication mode, single-wire half-duplex communication mode and have lin master/s lave capability. the usart1 interface is able to communicate at speeds of up to 4.5 mbit/s. the other available interfaces communicate at up to 2.25 mbit/s. docid15274 rev 7 19/104 stm32f105xx, stm32f107xx description 103 usart1, usart2 and usart3 also provide hardware management of the cts and rts signals, smart card mode (i so 7816 compliant) and spi-like communication capability. all interfaces can be served by the dma controller except for uart5. 2.3.18 serial peripheral interface (spi) up to three spis are able to communicate up to 18 mbits/s in slave and master modes in full-duplex and simplex communication modes. the 3-bit prescaler gives 8 master mode frequencies and the frame is configurable to 8 bits or 16 bits. the hardware crc generation/verification suppo rts basic sd card/mmc/sdhc (a) modes. all spis can be served by the dma controller. 2.3.19 inter-integrated sound (i 2 s) two standard i 2 s interfaces (multiplexed with spi2 an d spi3) are available, that can be operated in master or slave mode. these interf aces can be configured to operate with 16/32 bit resolution, as input or output channels. audio sampling frequencies from 8 khz up to 96 khz are supported. when either or both of the i 2 s interfaces is/are configured in master mode, the master clock can be output to the external dac/codec at 256 times the sampling frequency with less than 0.5% accuracy error owing to the advanced clock controller (see section 2.3.7: clocks and startup ). please refer to the ?audio frequency precision? tables provided in the ?serial peripheral interface (spi)? section of the stm32f10xxx reference manual. 2.3.20 ethernet mac in terface with dedicated dma and ieee 1588 support peripheral not available on stm32f105xx devices. the stm32f107xx devices prov ide an ieee-802.3-20 02-compliant media access controller (mac) for ethernet lan communications through an industry-standard media-independent interface (mii) or a reduced media-indepe ndent interface (rmii). the stm32f107xx requires an external physical interface devic e (phy) to connect to the physical lan bus (twisted-pair, fiber, etc.). the phy is connect ed to the stm32f107xx mii port using as many as 17 signals (mii) or 9 signals (rmii) and ca n be clocked using the 25 mhz (mii) or 50 mhz (rmii) output from the stm32f107xx. the stm32f107xx includes the following features: ? supports 10 and 100 mbit/s rates ? dedicated dma controller allowing high-speed transfers between the dedicated sram and the descriptors (see the stm32f105xx/stm32f107xx reference manual for details) ? tagged mac frame support (vlan support) ? half-duplex (csma/cd) and full-duplex operation ? mac control sublayer (control frames) support a. sdhc = secure digital high capacity. description stm32f105xx, stm32f107xx 20/104 docid15274 rev 7 ? 32-bit crc generation and removal ? several address filtering modes for physic al and multicast address (multicast and group addresses) ? 32-bit status code for each transmitted or received frame ? internal fifos to buffer transmit and receive frames. the transmit fifo and the receive fifo are both 2 kbytes , that is 4 kbytes in total ? supports hardware ptp (precision time protocol) in accordance with ieee 1588 with the timestamp comparator connected to the tim2 trigger input ? triggers interrupt when system time becomes greater than target time 2.3.21 controller area network (can) the two cans are compliant with the 2.0a and b (a ctive) specifications with a bitrate up to 1 mbit/s. they can receive and transmit standar d frames with 11-bit id entifiers as well as extended frames with 29-bit identifiers. each can has three transmit mailboxes, two receive fifos with 3 stages and 28 shared scalable filter banks (all of them c an be used even if one can is used). the 256 bytes of sram which are allocated for each can (512 bytes in total) are not shared with any other peripheral. 2.3.22 universal seri al bus on-the-go full-speed (usb otg fs) the stm32f105xx and stm32f107xx connectivity line devices embed a usb otg full- speed (12 mb/s) device/host/otg peripheral with integrated transceivers. the usb otg fs peripheral is compliant with the u sb 2.0 specification and with the otg 1.0 specification. it has software-configurable endpoint setting and supports suspend/resume. the usb otg full-speed controller requires a dedicated 48 mhz clock that is generated by a pll connected to the hse osc illator. the major features are: ? 1.25 kb of sram used exclusively by the endpoints (not shared with any other peripheral) ? 4 bidirectional endpoints ? hnp/snp/ip inside (no need for any external resistor) ? for otg/host modes, a power switch is needed in case bus-powered devices are connected ? the sof output can be used to synchron ize the external audio dac clock in isochronous mode ? in accordance with the usb 2.0 specification, the supported transfer speeds are: ? in host mode: full speed and low speed ? in device mode: full speed 2.3.23 gpios (general- purpose inputs/outputs) each of the gpio pins can be configured by so ftware as output (push-pull or open-drain), as input (with or without pull-up or pull-down) or as peripheral alternate function. most of the gpio pins are shared with digital or analog alternate functions. all gpios are high current- capable. the i/os alternate function configuration c an be locked if needed following a specific sequence in order to avoid spurious writing to the i/os registers. i/os on apb2 with up to 18 mhz toggling speed docid15274 rev 7 21/104 stm32f105xx, stm32f107xx description 103 2.3.24 remap capability this feature allows the use of a maximum number of peripherals in a given application. indeed, alternate functions are available not on ly on the default pins but also on other specific pins onto which they are remappabl e. this has the advantage of making board design and port usage much more flexible. for details refer to table 5: pin definitions ; it shows the list of remappable alternate functions and the pins onto which they can be remapped. see the stm32f10xxx reference manual for software considerations. 2.3.25 adcs (analog-to-digital converters) two 12-bit analog-to-digital converters are embedded into stm32f105xx and stm32f107xx connectivity line devices and each adc shares up to 16 external channels, performing conversions in single-shot or scan modes. in scan mode, automatic conversion is performed on a selected group of analog inputs. additional logic functions embedded in the adc interface allow: ? simultaneous sample and hold ? interleaved sample and hold ? single shunt the adc can be served by the dma controller. an analog watchdog feature allows very precis e monitoring of the converted voltage of one, some or all selected channels. an interrupt is generated when the converted voltage is outside the programmed thresholds. the events generated by the standard timers (timx) and the advanced-control timer (tim1) can be internally connected to the adc start tr igger and injection trigger, respectively, to allow the application to synchronize a/d conversion and timers. 2.3.26 dac (digital-to-analog converter) the two 12-bit buffered dac channels can be used to convert two digital signals into two analog voltage signal outputs. the chosen design structure is composed of integrated resistor strings and an amplifier in inverting configuration. this dual digital interface supports the following features: ? two dac converters: one for each output channel ? 8-bit or 12-bit monotonic output ? left or right data alignment in 12-bit mode ? synchronized update capability ? noise-wave generation ? triangular-wave generation ? dual dac channel independent or simultaneous conversions ? dma capability for each channel ? external triggers for conversion ? input voltage reference v ref+ description stm32f105xx, stm32f107xx 22/104 docid15274 rev 7 eight dac trigger inputs are used in the st m32f105xx and stm32f107xx connectivity line family. the dac channels are triggered through the timer update outputs that are also connected to different dma channels. 2.3.27 temperature sensor the temperature sensor has to generate a voltage that varies linearly with temperature. the conversion range is between 2 v < v dda < 3.6 v. the temperature sensor is internally connected to the adc1_in16 input channel whic h is used to convert the sensor output voltage into a digital value. 2.3.28 serial wire jtag debug port (swj-dp) the arm swj-dp interface is embedded, and is a combined jtag and serial wire debug port that enables either a serial wire debug or a jtag probe to be connected to the target. the jtag tms and tck pins are shared re spectively with swdio and swclk and a specific sequence on the tms pin is us ed to switch between jtag-dp and sw-dp. 2.3.29 embedded trace macrocell? the arm ? embedded trace macrocell provides a gr eater visibility of the instruction and data flow inside the cpu core by streaming compressed data at a very high rate from the stm32f10xxx through a small number of etm pins to an external hardware trace port analyzer (tpa) device. the tpa is connected to a host computer using usb, ethernet, or any other high-speed channel. real-time instru ction and data flow activity can be recorded and then formatted for display on the host computer running debugger software. tpa hardware is commercially available from co mmon development tool vendors. it operates with third party debugger software tools. docid15274 rev 7 23/104 stm32f105xx, stm32f107xx pinouts and pin description 103 3 pinouts and pin description figure 2. stm32f105xxx and stm32f107xxx connectivity line bga100 ballout top view ai16001c pe10 pc14- osc32_in pc5 pa5 pc3 pb4 pe15 pb2 pc4 pa4 h pe14 pe11 pe7 d pd4 pd3 pb8 pe3 c pd0 pc12 pe5 pb5 pc0 pe2 b pc11 pd2 pc15- osc32_out pb7 pb6 a 8 7 6 5 4 3 2 1 v ss_5 osc_in osc_out v dd_5 g f e pc1 v ref? pc13- tamper-rtc pb9 pa15 pb3 pe4 pe1 pe0 v ss_1 pd1 pe6 nrst pc2 v ss_3 v ss_4 nc v dd_3 v dd_4 pb15 v bat pd5 pd6 boot0 pd7 v ss_2 v ssa pa1 v dd_2 v dd_1 pb14 pa0-wkup 10 9 k j pd10 pd11 pa8 pa9 pa10 pa11 pa12 pc10 pa13 pa14 pc9 pc7 pc6 pd15 pc8 pd14 pe12 pb1 pa7 pb11 pe8 pb0 pa6 pb10 pe13 pe9 v dda pb13 v ref+ pa3 pb12 pa2 pd8 pd9 pd13 pd12 pinouts and pin description stm32f105xx, stm32f107xx 24/104 docid15274 rev 7 figure 3. stm32f105xxx and stm32f107xxx connectivity line lqfp100 pinout 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 vdd_2 vss_2 nc pa 1 3 pa 1 2 pa 1 1 pa 1 0 pa 9 pa 8 pc9 pc8 pc7 pc6 pd15 pd14 pd13 pd12 pd11 pd10 pd9 pd8 pb15 pb14 pb13 pb12 pa 3 vss_4 vdd_4 pa 4 pa 5 pa 6 pa 7 pc4 pc5 pb0 pb1 pb2 pe7 pe8 pe9 pe10 pe11 pe12 pe13 pe14 pe15 pb10 pb11 vss_1 vdd_1 vdd_3 vss_3 pe1 pe0 pb9 pb8 boot0 pb7 pb6 pb5 pb4 pb3 pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 pc12 pc11 pc10 pa15 pa14 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 pe2 pe3 pe4 pe5 pe6 vbat pc13-tamper-rtc pc14-osc32_in pc15-osc32_out vss_5 vdd_5 osc_in osc_out nrst pc0 pc1 pc2 pc3 vssa vref- vref+ vdda pa 0 - w k u p pa 1 pa 2 a i14391 lqfp100 docid15274 rev 7 25/104 stm32f105xx, stm32f107xx pinouts and pin description 103 figure 4. stm32f105xxx and stm32f107xx x connectivity line lqfp64 pinout 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 17 18 19 20 21 22 23 24 29 30 31 32 25 26 27 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 v bat pc13-tamper-rtc pc14-osc32_in pc15-osc32_out pd0 osc_in pd1 osc_out nrst pc0 pc1 pc2 pc3 v ssa v dda pa 0 - w k u p pa 1 pa 2 v dd_3 v ss_3 pb9 pb8 boot0 pb7 pb6 pb5 pb4 pb3 pd2 pc12 pc11 pc10 pa 1 5 pa 1 4 v dd_2 v ss_2 pa 1 3 pa 1 2 pa 1 1 pa 1 0 pa 9 pa 8 pc9 pc8 pc7 pc6 pb15 pb14 pb13 pb12 pa 3 v ss_4 v dd_4 pa 4 pa 5 pa 6 pa 7 pc4 pc5 pb0 pb1 pb2 pb10 pb11 v ss_1 v dd_1 lqfp64 a i14392 pinouts and pin description stm32f105xx, stm32f107xx 26/104 docid15274 rev 7 table 5. pin definitions pins pin name type (1) i / o level (2) main function (3) (after reset) alternate functions (4) bga100 lqfp64 lqfp100 default remap a3 - 1 pe2 i/o ft pe2 traceck - b3 - 2 pe3 i/o ft pe3 traced0 - c3 - 3 pe4 i/o ft pe4 traced1 - d3 - 4 pe5 i/o ft pe5 traced2 - e3 - 5 pe6 i/o ft pe6 traced3 - b2 1 6 v bat s - v bat - - a2 2 7 pc13-tamper- rtc (5) i/o - pc13 (6) tamper-rtc - a1 3 8 pc14- osc32_in (5) i/o - pc14 (6) osc32_in - b1 4 9 pc15- osc32_out (5) i/o - pc15 (6) osc32_out - c2 - 10 v ss_5 s - v ss_5 - - d2 - 11 v dd_5 s - v dd_5 - - c1 5 12 osc_in i - osc_in - - d1 6 13 osc_out o - osc_out - - e1 7 14 nrst i/o - nrst - - f1 8 15 pc0 i/o - pc0 adc12_in10 - f2 9 16 pc1 i/o - pc1 adc12_in11/ eth_mii_mdc/ eth_rmii_mdc - e2 10 17 pc2 i/o - pc2 adc12_in12/ eth_mii_txd2 - f3 11 18 pc3 i/o - pc3 adc12_in13/ eth_mii_tx_clk - g1 12 19 v ssa s - v ssa - - h1 - 20 v ref- s - v ref- - - j1 - 21 v ref+ s - v ref+ - - k1 13 22 v dda s - v dda - - g2 14 23 pa0-wkup i/o - pa0 wkup/usart2_cts (7) adc12_in0/tim2_ch1_etr tim5_ch1/ eth_mii_crs_wkup - docid15274 rev 7 27/104 stm32f105xx, stm32f107xx pinouts and pin description 103 h2 15 24 pa1 i/o - pa1 usart2_rts (7) / adc12_in1/ tim5_ch2 /tim2_ch2 (7) / eth_mii_rx_clk/ eth_rmii_ref_clk - j2 16 25 pa2 i/o - pa2 usart2_tx (7) / tim5_ch3/adc12_in2/ tim2_ch3 (7) / eth_mii_mdio/ eth_rmii_mdio - k2 17 26 pa3 i/o - pa3 usart2_rx (7) / tim5_ch4/adc12_in3 / tim2_ch4 (7) / eth_mii_col - e4 18 27 v ss_4 s - v ss_4 - - f4 19 28 v dd_4 s - v dd_4 - - g3 20 29 pa4 i/o - pa4 spi1_nss (7) /dac_out1 / usart2_ck (7) / adc12_in4 spi3_nss/i2s3_ws h3 21 30 pa5 i/o - pa5 spi1_sck (7) / dac_out2 / adc12_in5 - j3 22 31 pa6 i/o - pa6 spi1_miso (7) /adc12_in6 / tim3_ch1 (7) tim1_bkin k3 23 32 pa7 i/o - pa7 spi1_mosi (7) /adc12_in7 / tim3_ch2 (7) / eth_mii_rx_dv (8) / eth_rmii_crs_dv tim1_ch1n g4 24 33 pc4 i/o - pc4 adc12_in14/ eth_mii_rxd0 (8) / eth_rmii_rxd0 - h4 25 34 pc5 i/o - pc5 adc12_in15/ eth_mii_rxd1 (8) / eth_rmii_rxd1 - j4 26 35 pb0 i/o - pb0 adc12_in8/tim3_ch3/ eth_mii_rxd2 (8) tim1_ch2n k4 27 36 pb1 i/o - pb1 adc12_in9/tim3_ch4 (7) / eth_mii_rxd3 (8) tim1_ch3n g5 28 37 pb2 i/o ft pb2/boot1 - - h5 - 38 pe7 i/o ft pe7 - tim1_etr j5 - 39 pe8 i/o ft pe8 - tim1_ch1n table 5. pin definitions (continued) pins pin name type (1) i / o level (2) main function (3) (after reset) alternate functions (4) bga100 lqfp64 lqfp100 default remap pinouts and pin description stm32f105xx, stm32f107xx 28/104 docid15274 rev 7 k5 - 40 pe9 i/o ft pe9 - tim1_ch1 --- v ss_7 s - - - - --- v dd_7 s - - - - g6 - 41 pe10 i/o ft pe10 - tim1_ch2n h6 - 42 pe11 i/o ft pe11 - tim1_ch2 j6 - 43 pe12 i/o ft pe12 - tim1_ch3n k6 - 44 pe13 i/o ft pe13 - tim1_ch3 g7 - 45 pe14 i/o ft pe14 - tim1_ch4 h7 - 46 pe15 i/o ft pe15 - tim1_bkin j7 29 47 pb10 i/o ft pb10 i2c2_scl (8) /usart3_tx (7) / eth_mii_rx_er tim2_ch3 k7 30 48 pb11 i/o ft pb11 i2c2_sda (8) /usart3_rx (7) / eth_mii_tx_en/ eth_rmii_tx_en tim2_ch4 e7 31 49 v ss_1 s - v ss_1 - - f7 32 50 v dd_1 s - v dd_1 - - k8 33 51 pb12 i/o ft pb12 spi2_nss (8) /i2s2_ws (8) / i2c2_ smba (8) / usart3_ck (7) / tim1_bkin (7) / can2_rx/ eth_mii_txd0/ eth_rmii_txd0 - j8 34 52 pb13 i/o ft pb13 spi2_sck (8) / i2s2_ck (8) / usart3_cts (7) / tim1_ch1n/can2_tx/ eth_mii_txd1/ eth_rmii_txd1 - h8 35 53 pb14 i/o ft pb14 spi2_miso (8) / tim1_ch2n / usart3_rts (7) - g8 36 54 pb15 i/o ft pb15 spi2_mosi (8) / i2s2_sd (8) / tim1_ch3n (7) - k9 - 55 pd8 i/o ft pd8 - usart3_tx/ eth_mii_rx_dv/ eth_rmii_crs_dv table 5. pin definitions (continued) pins pin name type (1) i / o level (2) main function (3) (after reset) alternate functions (4) bga100 lqfp64 lqfp100 default remap docid15274 rev 7 29/104 stm32f105xx, stm32f107xx pinouts and pin description 103 j9 - 56 pd9 i/o ft pd9 - usart3_rx/ eth_mii_rxd0/ eth_rmii_rxd0 h9 - 57 pd10 i/o ft pd10 - usart3_ck/ eth_mii_rxd1/ eth_rmii_rxd1 g9 - 58 pd11 i/o ft pd11 - usart3_cts/ eth_mii_rxd2 k10 - 59 pd12 i/o ft pd12 - tim4_ch1 / usart3_rts/ eth_mii_rxd3 j10 - 60 pd13 i/o ft pd13 - tim4_ch2 h10 - 61 pd14 i/o ft pd14 - tim4_ch3 g10 - 62 pd15 i/o ft pd15 - tim4_ch4 f10 37 63 pc6 i/o ft pc6 i2s2_mck/ tim3_ch1 e10 38 64 pc7 i/o ft pc7 i2s3_mck tim3_ch2 f9 39 65 pc8 i/o ft pc8 - tim3_ch3 e9 40 66 pc9 i/o ft pc9 - tim3_ch4 d9 41 67 pa8 i/o ft pa8 usart1_ck/otg_fs_sof / tim1_ch1 (8) /mco - c9 42 68 pa9 i/o ft pa9 usart1_tx (7) / tim1_ch2 (7) / otg_fs_vbus - d10 43 69 pa10 i/o ft pa10 usart1_rx (7) / tim1_ch3 (7) /otg_fs_id - c10 44 70 pa11 i/o ft pa11 usart1_cts / can1_rx / tim1_ch4 (7) /otg_fs_dm - b10 45 71 pa12 i/o ft pa12 usart1_rts / otg_fs_dp / can1_tx (7) / tim1_etr (7) - a10 46 72 pa13 i/o ft jtms-swdio - pa13 f8 - 73 not connected - e6 47 74 v ss_2 s - v ss_2 - - f6 48 75 v dd_2 s - v dd_2 - - a9 49 76 pa14 i/o ft jtck-swclk - pa14 table 5. pin definitions (continued) pins pin name type (1) i / o level (2) main function (3) (after reset) alternate functions (4) bga100 lqfp64 lqfp100 default remap pinouts and pin description stm32f105xx, stm32f107xx 30/104 docid15274 rev 7 a8 50 77 pa15 i/o ft jtdi spi3_nss / i2s3_ws tim2_ch1_etr / pa15 spi1_nss b9 51 78 pc10 i/o ft pc10 uart4_tx usart3_tx/ spi3_sck/i2s3_ck b8 52 79 pc11 i/o ft pc11 uart4_rx usart3_rx/ spi3_miso c8 53 80 pc12 i/o ft pc12 uart5_tx usart3_ck/ spi3_mosi/i2s3_sd --81 pd0 i/o ft pd0 - osc_in (9) / can1_rx --82 pd1 i/o ft pd1 - osc_out (9) / can1_tx b7 54 83 pd2 i/o ft pd2 tim3_etr / uart5_rx c7 - 84 pd3 i/o ft pd3 - usart2_cts d7 - 85 pd4 i/o ft pd4 - usart2_rts b6 - 86 pd5 i/o ft pd5 - usart2_tx c6 - 87 pd6 i/o ft pd6 - usart2_rx d6 - 88 pd7 i/o ft pd7 - usart2_ck a7 55 89 pb3 i/o ft jtdo spi3_sck / i2s3_ck pb3 / traceswo/ tim2_ch2 / spi1_sck a6 56 90 pb4 i/o ft njtrst spi3_miso pb4 / tim3_ch1/ spi1_miso c5 57 91 pb5 i/o - pb5 i2c1_ smba / spi3_mosi / eth_mii_pps_out / i2s3_sd eth_rmii_pps_out tim3_ch2/spi1_mosi/ can2_rx b5 58 92 pb6 i/o ft pb6 i2c1_scl (7) /tim4_ch1 (7) usart1_tx/can2_tx a5 59 93 pb7 i/o ft pb7 i2c1_sda (7) /tim4_ch2 (7) usart1_rx d5 60 94 boot0 i - boot0 - - b4 61 95 pb8 i/o ft pb8 tim4_ch3 (7) / eth_mii_txd3 i2c1_scl/can1_rx a4 62 96 pb9 i/o ft pb9 tim4_ch4 (7) i2c1_sda / can1_tx d4 - 97 pe0 i/o ft pe0 tim4_etr - c4 - 98 pe1 i/o ft pe1 - - e5 63 99 v ss_3 s - v ss_3 - - f5 64 100 v dd_3 s - v dd_3 - - table 5. pin definitions (continued) pins pin name type (1) i / o level (2) main function (3) (after reset) alternate functions (4) bga100 lqfp64 lqfp100 default remap docid15274 rev 7 31/104 stm32f105xx, stm32f107xx pinouts and pin description 103 1. i = input, o = output, s = supply, hiz = high impedance. 2. ft = 5 v tolerant. all i/os are v dd capable. 3. function availability depends on the chosen device. 4. if several peripherals share the same i/o pin, to avoid conf lict between these alternate func tions only one peripheral should be enabled at a time through the peripheral clock enable bit (in the corresponding rcc peripheral clock enable register). 5. pc13, pc14 and pc15 are supplied through the power switch, and so their use in output mode is limited: they can be used only in output 2 mhz mode with a maximum load of 30 pf and only one pin can be put in output mode at a time. 6. main function after the first backup domain power-up. later on, it depends on the contents of the backup registers even after reset (because these registers are not reset by the main reset). for details on how to manage these ios, refer to the battery backup domain and bkp register description sections in the stm32f10xxx reference manual, available from the stmicroelectronics website: www.st.com. 7. this alternate function can be remapped by software to some other port pins (if available on the used package). for more details, refer to the alternate function i/o and debug configuration section in t he stm32f10xxx refere nce manual, available from the stmicroelectroni cs website: www.st.com. 8. spi2/i2s2 and i2c2 are not available when the ethernet is being used. 9. for the lqfp64 package, the pins number 5 and 6 are c onfigured as osc_in/osc_out after reset, however the functionality of pd0 and pd1 can be remapped by software on these pins. for the lqfp100 and bga100 packages, pd0 and pd1 are available by default, so there is no need for remappi ng. for more details, refer to alternate function i/o and debug configuration section in the stm32f10xxx reference manual. memory mapping stm32f105xx, stm32f107xx 32/104 docid15274 rev 7 4 memory mapping the memory map is shown in figure 5 . figure 5. memory map 512-mbyte block 7 cortex-m 3 's internal peripherals 512-mbyte block 6 not used 512-mbyte block 5 not used 512-mbyte block 4 not used 512-mbyte block 3 not used 512-mbyte block 2 peripherals 512-mbyte block 1 s ram 0x0000 0000 0x1fff ffff 0x2000 0000 0x 3 fff ffff 0x4000 0000 0x5fff ffff 0x6000 0000 0x7fff ffff 0x 8 000 0000 0xafff ffff 0xb000 0000 0xbfff ffff 0xc000 0000 0xdfff ffff 0xe000 0000 0xffff ffff 512-mbyte block 0 code flash 0x0 8 04 0000 0x1fff afff 0x1fff b000 - 0x1fff f7ff 0x0 8 00 0000 0x0 8 0 3 ffff 0x0004 0000 0x07ff ffff 0x0000 0000 0x000 3 ffff s ystem memory reserved reserved aliased to flash or system memory depending on boot pins s ram (aliased by bit-banding) reserved 0x2000 0000 0x2000 ffff 0x2001 0000 0x 3 fff ffff rtc wwdg 0x4000 2 8 00 - 0x4000 2bff iwdg reserved s pi2/i2 s 2 s pi 3 /i2 s3 reserved 0x4000 2c00 - 0x4000 2fff 0x4000 3 000 - 0x4000 33 ff 0x4000 3 400 - 0x4000 3 7ff 0x4000 38 00 - 0x4000 3 bff 0x4000 3 c00 - 0x4000 3 fff 0x4000 4000 - 0x4000 4 3 ff u s art2 0x4000 4400 - 0x4000 47ff u s art 3 0x4000 4 8 00 - 0x4000 4bff uart4 0x4000 4c00 - 0x4000 4fff uart5 0x4000 5000 - 0x4000 5 3 ff i2c1 0x4000 5400 - 0x4000 57ff i2c2 0x4000 5 8 00 - 0x4000 5bff reserved 0x4000 5c00 - 0x4000 6 3 ff 0x4000 6400 - 0x4000 67ff bxcan1 bxcan2 0x4000 6 8 00 - 0x4000 6bff bkp 0x4000 6c00 - 0x4000 6fff pwr 0x4000 7000 - 0x4000 7 3 ff dac 0x4000 7400 - 0x4000 77ff afio 0x4001 0000 - 0x4001 3 fff exti 0x4001 0400 - 0x4001 07ff port a 0x4001 0 8 00 - 0x4001 0bff port b 0x4001 0c00 - 0x4001 0fff port c 0x4001 1000 - 0x4001 1 3 ff port d 0x4001 1400 - 0x4001 17ff port e 0x4001 1 8 00 - 0x4001 1bff reserved 0x4001 1c00 - 0x4001 2 3 ff adc1 0x4001 2400 - 0x4001 27ff adc2 0x4001 2 8 00 - 0x4001 2bff tim1 0x4001 2c00 - 0x4001 2fff s pi1 0x4001 3 000 - 0x4001 33 ff reserved 0x4001 3 400 - 0x4001 3 7ff u s art1 0x4001 38 00 - 0x4001 3 bff reserved 0x4001 3 c00 - 0x4001 ffff dma2 0x4002 0400 - 0x4002 07ff reserved 0x4002 1400 - 0x4002 1fff flash interface 0x4002 2000 - 0x4002 2 3 ff reserved 0x4002 2400 - 0x4002 2fff crc 0x4002 3 000 - 0x4002 33 ff reserved 0x4002 3 400 - 0x4002 7fff ethernet 0x4002 8 000 - 0x4002 9fff reserved 0x400 3 0000 - 0x4fff ffff u s b otg f s 0x5000 0000 - 0x500 3 ffff reserved 0x5000 0400 - 0x5fff ffff ai15412b 0x4002 0 8 00 - 0x4002 0fff 0x4002 1000 - 0x4002 1 3 ff reserved rcc dma1 0x4002 0000 - 0x4002 0 3 ff reserved 0x4000 7 8 00 - 0x4000 ffff apb2 ahb 0x4000 1 8 00 - 0x4000 27ff 0x4000 0 8 00 - 0x4000 0bff 0x4000 0c00 - 0x4000 0fff 0x4000 1000 - 0x4000 1 3 ff 0x4000 1400 - 0x4000 17ff 0x4000 0000 - 0x4000 0 3 ff 0x4000 0400 - 0x4000 07ff reserved tim7 tim6 tim5 tim4 tim 3 tim2 apb1 option bytes 0x1fff f 8 00 - 0x1fff ffff docid15274 rev 7 33/104 stm32f105xx, stm32f107xx electrical characteristics 103 5 electrical characteristics 5.1 parameter conditions unless otherwise specified, all voltages are referenced to v ss . 5.1.1 minimum and maximum values unless otherwise specified the minimum and ma ximum values are guaranteed in the worst conditions of ambient temperature, supply voltage and frequencies by tests in production on 100% of the devices with an ambient temperature at t a = 25 c and t a = t a max (given by the selected temperature range). data based on characterization results, design simulation and/or technology characteristics are indicated in the table footnotes and are not tested in production. based on characterization, the minimum and maximum values refer to sample tests and represent the mean value plus or minus three times the standard deviation (mean3 ). 5.1.2 typical values unless otherwise specified, typical data are based on t a = 25 c, v dd = 3.3 v (for the 2v v dd 3.6 v voltage range). they are given only as design guidelines and are not tested. typical adc accuracy values are determined by characterization of a batch of samples from a standard diffusion lot over the full temperature range, where 95% of the devices have an error less than or equal to the value indicated (mean2 ) . 5.1.3 typical curves unless otherwise specified, all typical curves are given only as design guidelines and are not tested. 5.1.4 loading capacitor the loading conditions used for pin parameter measurement are shown in figure 6 . 5.1.5 pin input voltage the input voltage measurement on a pin of the device is described in figure 7 . figure 6. pin loading conditions figure 7. pin input voltage a i15664 c = 50 pf stm32f10xxx pin a i15665 stm32f10xxx pin v in electrical characteristics stm32f105xx, stm32f107xx 34/104 docid15274 rev 7 5.1.6 power supply scheme figure 8. power supply scheme caution: in figure 8 , the 4.7 f capacitor must be connected to v dd3 . 5.1.7 current consumption measurement figure 9. current consumption measurement scheme a i14125d v dd 1/2/3/4/5 an a lo g: rc s , pll, ... po wer s wi tch v bat gp i/o s out in kernel logic (cpu, digit a l & memorie s ) b a ck u p circ u itry (osc32k,rtc, b a ck u p regi s ter s ) w a ke- u p logic 5 100 nf + 1 4.7 f 1.8-3.6v reg u l a tor v ss 1/2/3/4/5 v dda v ref+ v ref- v ssa adc/ dac level s hifter io logic v dd 10 nf + 1 f v ref 10 nf + 1 f v dd a i14126 v bat v dd v dda i dd _v bat i dd docid15274 rev 7 35/104 stm32f105xx, stm32f107xx electrical characteristics 103 5.2 absolute maximum ratings stresses above the absolute maximum ratings listed in table 6: voltage characteristics , table 7: current characteristics , and table 8: thermal characteristics may cause permanent damage to the device. these are stress ratings only and functional ope ration of the device at these conditions is not im plied. exposure to maximum rating conditions for extended periods may affect device reliability. table 6. voltage characteristics symbol ratings min max unit v dd ?v ss external main supply voltage (including v dda and v dd ) (1) 1. all main power (v dd , v dda ) and ground (v ss , v ssa ) pins must always be connected to the external power supply, in the permitted range. ?0.3 4.0 v v in (2) 2. v in maximum must always be respected. refer to table 7: current characteristics for the maximum allowed injected current values. input voltage on five volt tolerant pin v ss ? 0.3 v dd + 4.0 input voltage on any other pin v ss ? 0.3 4.0 | v ddx | variations between different v dd power pins - 50 mv |v ssx ? v ss | variations between all the different ground pins - 50 v esd(hbm) electrostatic discharge voltage (human body model) see section 5.3.11: absolute maximum ratings (electrical sensitivity) - table 7. current characteristics symbol ratings max. unit i vdd total current into v dd /v dda power lines (source) (1) 1. all main power (v dd , v dda ) and ground (v ss , v ssa ) pins must always be connected to the external power supply, in the permitted range. 150 ma i vss total current out of v ss ground lines (sink) (1) 150 i io output current sunk by any i/o and control pin 25 output current source by any i/os and control pin ? 25 i inj(pin) (2) 2. negative injection disturbs the analog performance of the device. see note: on page 76 . injected current on five volt tolerant pins (3) 3. positive injection is not possible on thes e i/os. a negative injection is induced by v in docid15274 rev 7 37/104 stm32f105xx, stm32f107xx electrical characteristics 103 5.3.2 operating conditions at power-up / power-down subject to general operating conditions for t a . table 10. operating conditions at power-up / power-down 5.3.3 embedded reset and power control block characteristics the parameters given in table 11 are derived from tests performed under ambient temperature and v dd supply voltage conditions summarized in table 9 . symbol parameter conditions min max unit t vdd v dd rise time rate - 0 s/v v dd fall time rate 20 table 11. embedded reset and power control block characteristics symbol parameter conditions min typ max unit v pvd programmable voltage detector level selection pls[2:0]=000 (rising edge) 2.1 2.18 2.26 v pls[2:0]=000 (falling edge) 2 2.08 2.16 v pls[2:0]=001 (rising edge) 2.19 2.28 2.37 v pls[2:0]=001 (falling edge) 2.09 2.18 2.27 v pls[2:0]=010 (rising edge) 2.28 2.38 2.48 v pls[2:0]=010 (falling edge) 2.18 2.28 2.38 v pls[2:0]=011 (rising edge) 2.38 2.48 2.58 v pls[2:0]=011 (falling edge) 2.28 2.38 2.48 v pls[2:0]=100 (rising edge) 2.47 2.58 2.69 v pls[2:0]=100 (falling edge) 2.37 2.48 2.59 v pls[2:0]=101 (rising edge) 2.57 2.68 2.79 v pls[2:0]=101 (falling edge) 2.47 2.58 2.69 v pls[2:0]=110 (rising edge) 2.66 2.78 2.9 v pls[2:0]=110 (falling edge) 2.56 2.68 2.8 v pls[2:0]=111 (rising edge) 2.76 2.88 3 v pls[2:0]=111 (falling edge) 2.66 2.78 2.9 v v pvdhyst (2) pvd hysteresis - - 100 - mv v por/pdr power on/power down reset threshold falling edge 1.8 (1) 1. the product behavior is guaranteed by design down to the minimum v por/pdr value. 1.88 1.96 v rising edge 1.84 1.92 2.0 v v pdrhyst (2) pdr hysteresis - - 40 - mv t rsttempo (2) 2. guaranteed by design, not tested in production. reset temporization - 1 2.5 4.5 ms electrical characteristics stm32f105xx, stm32f107xx 38/104 docid15274 rev 7 5.3.4 embedded reference voltage the parameters given in table 12 are derived from tests performed under ambient temperature and v dd supply voltage conditions summarized in table 9 . 5.3.5 supply current characteristics the current consumption is a function of several parameters and factors such as the operating voltage, ambient temperature, i/o pi n loading, device software configuration, operating frequencies, i/o pin switching rate, program location in memory and executed binary code. the current consumption is measured as described in figure 9: current consumption measurement scheme . all run-mode current consumption measurements given in this section are performed with a reduced code that gives a consumption equivalent to dhrystone 2.1 code. maximum current consumption the mcu is placed under the following conditions: ? all i/o pins are in input mode with a static value at v dd or v ss (no load) ? all peripherals are disabled ex cept when explicitly mentioned ? the flash memory access time is adjusted to the f hclk frequency (0 wait state from 0 to 24 mhz, 1 wait state from 24 to 48 mhz and 2 wait states above) ? prefetch in on (reminder: this bit must be set before clock setting and bus prescaling) ? when the peripherals are enabled f pclk1 = f hclk /2, f pclk2 = f hclk the parameters given in table 13 , table 14 and table 15 are derived from tests performed under ambient temperature and v dd supply voltage conditions summarized in table 9 . table 12. embedded internal reference voltage symbol parameter conditions min typ max unit v refint internal reference voltage ?40 c < t a < +105 c 1.16 1.20 1.26 v ?40 c < t a < +85 c 1.16 1.20 1.24 v t s_vrefint (1) 1. shortest sampling time can be determined in the application by multiple iterations. adc sampling time when reading the internal reference voltage - - 5.1 17.1 (2) 2. guaranteed by design, not tested in production. s v rerint (2) internal reference voltage spread over the temperature range v dd = 3 v 10 mv - - 10 mv t coeff (2) temperature coefficient - - - 100 ppm/c docid15274 rev 7 39/104 stm32f105xx, stm32f107xx electrical characteristics 103 table 13. maximum current consumption in run mode, code with data processing running from flash symbol parameter conditions f hclk max (1) 1. based on characterization, not tested in production. unit t a = 85 c t a = 105 c i dd supply current in run mode external clock (2) , all peripherals enabled 2. external clock is 8 mhz and pll is on when f hclk > 8 mhz. 72 mhz 68 68.4 ma 48 mhz 49 49.2 36 mhz 38.7 38.9 24 mhz 27.3 27.9 16 mhz 20.2 20.5 8 mhz 10.2 10.8 external clock (2) , all peripherals disabled 72 mhz 32.7 32.9 48 mhz 25 25.2 36 mhz 20.3 20.6 24 mhz 14.8 15.1 16 mhz 11.2 11.7 8 mhz 6.6 7.2 table 14. maximum current consumption in run mode, code with data processing running from ram symbol parameter conditions f hclk max (1) 1. based on characterization, tested in production at v dd max, f hclk max.. unit t a = 85 c t a = 105 c i dd supply current in run mode external clock (2) , all peripherals enabled 2. external clock is 8 mhz and pll is on when f hclk > 8 mhz. 72 mhz 65.5 66 ma 48 mhz 45.4 46 36 mhz 35.5 36.1 24 mhz 25.2 25.6 16 mhz 18 18.5 8 mhz 10.5 11 external clock (2) , all peripherals disabled 72 mhz 31.4 31.9 48 mhz 27.8 28.2 36 mhz 17.6 18.3 24 mhz 13.1 13.8 16 mhz 10.2 10.9 8 mhz 6.1 7.8 electrical characteristics stm32f105xx, stm32f107xx 40/104 docid15274 rev 7 table 15. maximum current consumption in sleep mode, code running from flash or ram symbol parameter conditions f hclk max (1) unit t a = 85 c t a = 105 c i dd supply current in sleep mode external clock (2) , all peripherals enabled 72 mhz 48.4 49 ma 48 mhz 33.9 34.4 36 mhz 26.7 27.2 24 mhz 19.3 19.8 16 mhz 14.2 14.8 8 mhz 8.7 9.1 external clock (2) , all peripherals disabled 72 mhz 10.1 10.6 48 mhz 8.3 8.75 36 mhz 7.5 8 24 mhz 6.6 7.1 16 mhz 6 6.5 8 mhz 2.5 3 1. based on characterization, tested in production at v dd max and f hclk max with peripherals enabled. 2. external clock is 8 mhz and pll is on when f hclk > 8 mhz. table 16. typical and maximum current consumptions in stop and standby modes symbol parameter conditions typ (1) max unit v dd /v bat = 2.0 v v dd /v bat = 2.4 v v dd /v bat = 3.3 v t a = 85 c t a = 105 c i dd supply current in stop mode regulator in run mode, low-speed and high-speed internal rc oscillators and high-speed oscillator off (no independent watchdog) - 32 33 600 1300 a regulator in low power mode, low- speed and high-speed internal rc oscillators and high-speed oscillator off (no independent watchdog) - 25 26 590 1280 supply current in standby mode low-speed internal rc oscillator and independent watchdog on - 3 3.8 - - low-speed internal rc oscillator on, independent watchdog off - 2.8 3.6 - - low-speed internal rc oscillator and independent watchdog off, low- speed oscillator and rtc off - 1.9 2.1 5 (2) 6.5 (2) i dd_vbat backup domain supply current low-speed oscillator and rtc on 1.1 1.2 1.4 2.1 (2) 2.3 (2) 1. typical values are measured at t a = 25 c. 2. based on characterization, not tested in production. docid15274 rev 7 41/104 stm32f105xx, stm32f107xx electrical characteristics 103 figure 10. typical current consumption on v bat with rtc on vs. temperature at different v bat values figure 11. typical current consumption in stop mode with regulator in run mode versus temperature at different v dd values 0 0.5 1 1.5 2 2.5 ?40 c 25 c 70 c 8 5 c 105 c temperature (c) consumption ( a) 1. 8 v 2 v 2.4 v 3 . 3 v 3 .6 v ai17 3 29 0.00 100.00 200.00 3 00.00 400.00 500.00 600.00 700.00 8 00.00 900.00 ?40 c 25 c 8 5 c 105 c temperature (c) consumption ( a) 3 .6 v 3 . 3 v 3 v 2.7 v 2.4 v ai17122 electrical characteristics stm32f105xx, stm32f107xx 42/104 docid15274 rev 7 figure 12. typical current consumption in stop mode with regulator in low-power mode versus temperature at different v dd values figure 13. typical current consumption in standby mode versus temperature at different v dd values typical current consumption the mcu is placed under the following conditions: ? all i/o pins are in input mode with a static value at v dd or v ss (no load). ? all peripherals are disabled except if it is explicitly mentioned. ? the flash access time is adjusted to f hclk frequency (0 wait state from 0 to 24 mhz, 1 wait state from 24 to 48 mhz and 2 wait states above). ? ambient temperature and v dd supply voltage conditions summarized in table 9 . ? prefetch is on (reminder: this bit must be set before clock setting and bus prescaling) when the peripherals are enabled f pclk1 = f hclk /4, f pclk 2 = f hclk /2, f adcclk = f pclk2 /4 0.00 100.00 200.00 3 00.00 400.00 500.00 600.00 700.00 8 00.00 900.00 ?40 c 25 c 8 5 c 105 c temperature (c) consumption (a) 3 .6 v 3 . 3 v 3 v 2.7 v 2.4 v ai1712 3 0.00 0.50 1.00 1.50 2.00 2.50 3 .00 3 .50 4.00 4.50 ?40 c 25 c 8 5 c 105 c temperature (c) consumption (a) 3 .6 v 3 . 3 v 3 v 2.7 v 2.4 v ai17124 docid15274 rev 7 43/104 stm32f105xx, stm32f107xx electrical characteristics 103 table 17. typical current consumption in run mode, code with data processing running from flash symbol parameter conditions f hclk typ (1) 1. typical values are measures at t a = 25 c, v dd = 3.3 v. unit all peripherals enabled (2) 2. add an additional power consumption of 0.8 ma per adc for the analog part. in applications, this consumption occurs only while the adc is on (adon bit is set in the adc_cr2 register). all peripherals disabled i dd supply current in run mode external clock (3) 3. external clock is 8 mhz and pll is on when f hclk > 8 mhz. 72 mhz 47.3 28.3 ma 48 mhz 32 19.6 36 mhz 24.6 15.4 24 mhz 16.8 10.6 16 mhz 11.8 7.4 8 mhz 5.9 3.7 4 mhz 3.7 2.9 2 mhz 2.5 2 1 mhz 1.8 1.53 500 khz 1.5 1.3 125 khz 1.3 1.2 running on high speed internal rc (hsi), ahb prescaler used to reduce the frequency 36 mhz 23.9 14.8 ma 24 mhz 16.1 9.7 16 mhz 11.1 6.7 8 mhz 5.6 3.8 4 mhz 3.1 2.1 2 mhz 1.8 1.3 1 mhz 1.16 0.9 500 khz 0.8 0.67 125 khz 0.6 0.5 electrical characteristics stm32f105xx, stm32f107xx 44/104 docid15274 rev 7 on-chip peripheral current consumption the current consumption of the on -chip peripherals is given in table 19 . the mcu is placed under the following conditions: ? all i/o pins are in input mode with a static value at v dd or v ss (no load) ? all peripherals are disabled unless otherwise mentioned ? the given value is calculated by measuring the current consumption ? with all peripherals clocked off ? with one peripheral clocked on (with only the clock applied) ? ambient operating temperature and v dd supply voltage conditions summarized in table 6 table 18. typical current consumption in sleep mode, code running from flash or ram symbol parameter conditions f hclk typ (1) 1. typical values are measures at t a = 25 c, v dd = 3.3 v. unit all peripherals enabled (2) 2. add an additional power consumption of 0.8 ma per adc for the analog part. in applications, this consumption occurs only while the adc is on (adon bit is set in the adc_cr2 register). all peripherals disabled i dd supply current in sleep mode external clock (3) 3. external clock is 8 mhz and pll is on when f hclk > 8 mhz. 72 mhz 28.2 6 ma 48 mhz 19 4.2 36 mhz 14.7 3.4 24 mhz 10.1 2.5 16 mhz 6.7 2 8 mhz 3.2 1.3 4 mhz 2.3 1.2 2 mhz 1.7 1.16 1 mhz 1.5 1.1 500 khz 1.3 1.05 125 khz 1.2 1.05 running on high speed internal rc (hsi), ahb prescaler used to reduce the frequency 36 mhz 13.7 2.6 24 mhz 9.3 1.8 16 mhz 6.3 1.3 8 mhz 2.7 0.6 4 mhz 1.6 0.5 2 mhz 1 0.46 1 mhz 0.8 0.44 500 khz 0.6 0.43 125 khz 0.5 0.42 docid15274 rev 7 45/104 stm32f105xx, stm32f107xx electrical characteristics 103 table 19. peripheral current consumption (1) 1. f hclk = 72 mhz, f apb1 = f hclk /2, f apb2 = f hclk , default prescaler value for each peripheral. peripheral typical consumption at 25 c unit ahb eth_mac 5.2 ma otg_fs 7.7 apb1 tim2 1.5 tim3 1.5 tim4 1.5 tim5 1.5 tim6 0.6 tim7 0.3 spi2 0.2 usart2 0.5 usart3 0.5 uart4 0.5 uart5 0.5 i2c1 0.5 i2c2 0.5 can1 0.8 can2 0.8 dac 0.4 apb2 gpio a 0.5 ma gpio b 0.5 gpio c 0.5 gpio d 0.5 gpio e 0.5 adc1 (2) 2. specific conditions for adc: f hclk = 56 mhz, f apb1 = f hclk /2, f apb2 = f hclk , f adcclk = f apb2/4 , adon bit in the adc_cr2 register is set to 1. 2.1 adc2 (2) 2.0 tim1 1.7 spi1 0.4 usart1 0.9 electrical characteristics stm32f105xx, stm32f107xx 46/104 docid15274 rev 7 5.3.6 external clock source characteristics high-speed external user clock generated from an external source the characteristics given in table 20 result from tests performed using an high-speed external clock source, and under ambient temperature and supply voltage conditions summarized in table 9 . low-speed external user clock generated from an external source the characteristics given in table 21 result from tests performed using an low-speed external clock source, and under ambient temperature and supply voltage conditions summarized in table 9 . table 20. high-speed external user clock characteristics symbol parameter conditions min typ max unit f hse_ext external user clock source frequency (1) - 1850mhz v hseh osc_in input pin high level voltage 0.7v dd - v dd v v hsel osc_in input pin low level voltage v ss - 0.3v dd t w(hse) t w(hse) osc_in high or low time (1) 1. guaranteed by design, not tested in production. 5 - - ns t r(hse) t f(hse) osc_in rise or fall time (1) - - 20 c in(hse) osc_in input capacitance (1) - - 5 - pf ducy (hse) duty cycle - 45 - 55 % i l osc_in input leakage current v ss v in v dd - - 1 a table 21. low-speed external user clock characteristics symbol parameter conditions min typ max unit f lse_ext user external clock source frequency (1) 1. guaranteed by design, not tested in production. - 32.768 1000 khz v lseh osc32_in input pin high level voltage 0.7v dd - v dd v v lsel osc32_in input pin low level voltage v ss - 0.3v dd t w(lse) t w(lse) osc32_in high or low time (1) 450 - - ns t r(lse) t f(lse) osc32_in rise or fall time (1) - - 50 c in(lse) osc32_in input capacitance (1) - - 5 pf ducy (lse) duty cycle - 30 - 70 % i l osc32_in input leakage current v ss v in v dd - - 1 a docid15274 rev 7 47/104 stm32f105xx, stm32f107xx electrical characteristics 103 figure 14. high-speed external clock source ac timing diagram figure 15. low-speed external clock source ac timing diagram high-speed external clock generated from a crystal/ceramic resonator the high-speed external (hse) clock can be supplied with a 3 to 25 mhz crystal/ceramic resonator oscillator. all th e information given in this paragraph are based on characterization results obtained with typical external components specified in table 22 . in the application, the resonator and the load capacitors have to be placed as close as possible to the oscillator pins in order to minimize output distortion an d startup stabilization time. refer to the crystal resonator manufacturer for more details on the resonator characteristics (frequenc y, package, accuracy). a i14127 b os c _i n extern a l stm32f10xxx clock s o u rce v hseh t f(hse) t w(hse) i l 90% 10% t hse t t r(hse) t w(hse) f hse_ext v hsel a i14140c osc32_in extern a l stm32f10xxx clock s o u rce v lseh t f(lse) t w(lse) i l 90% 10% t lse t t r(lse) t w(lse) f lse_ext v lsel electrical characteristics stm32f105xx, stm32f107xx 48/104 docid15274 rev 7 for c l1 and c l2 , it is recommended to use high-quality external ceramic capacitors in the 5 pf to 25 pf range (typ.), designed for high- frequency applications, and selected to match the requirements of the crystal or resonator (see figure 16 ). c l1 and c l2 are usually the same size. the crystal manufacturer typically specifies a load capacitance which is the series combination of c l1 and c l2 . pcb and mcu pin capacitance must be included (10 pf can be used as a rough estimate of the comb ined pin and board capacitance) when sizing c l1 and c l2 . refer to the application note an28 67 ?oscillator design guide for st microcontrollers? available from the st website www.st.com. figure 16. typical application with an 8 mhz crystal 1. r ext value depends on the cr ystal characteristics. low-speed external clock generated from a crystal/ceramic resonator the low-speed external (lse) clock can be supplied with a 32.768 khz crystal/ceramic resonator oscillator. all th e information given in this paragraph are based on characterization results obtained with typical external components specified in table 23 . in the application, the resonator and the load capacitors have to be placed as close as possible to the oscillator pins in order to minimize output distortion an d startup stabilization table 22. hse 3-25 mhz oscillator characteristics (1) (2) 1. resonator characteristics given by the crystal/ceramic resonator manufacturer. 2. based on characterization, not tested in production. symbol parameter conditions min typ max unit f osc_in oscillator frequency - 3 25 mhz r f feedback resistor - - 200 - k c recommended load capacitance versus equivalent serial resistance of the crystal (r s ) (3) 3. the relatively low value of the rf resistor offers a good protection against issues resulting from use in a humid environment, due to the induced leakage and the bias condition change. however, it is recommended to take this point into account if the mcu is used in tough humidity conditions. r s = 30 - 30 - pf i 2 hse driving current v dd = 3.3 v, v in =v ss with 30 pf load - - 1 ma g m oscillator transconductance startup 25 - - ma/v t su(hse (4) 4. t su(hse) is the startup time measured from the moment it is enabled (by software) to a stabilized 8 mhz oscillation is reached. this value is measured for a standard crystal resonator and it can vary significantly with the crystal manufacturer startup time v dd is stabilized - 2 - ms a i14128 b osc_ou t osc_in f hse c l1 r f stm32f10xxx 8 mh z re s on a tor re s on a tor with integr a ted c a p a citor s bi as controlled g a in r ext (1) c l2 docid15274 rev 7 49/104 stm32f105xx, stm32f107xx electrical characteristics 103 time. refer to the crystal resonator manufacturer for more details on the resonator characteristics (frequenc y, package, accuracy). note: for c l1 and c l2 it is recommended to use high-quality external ceramic capacitors in the 5 pf to 15 pf range selected to match the requirements of the crystal or resonator (see figure 17 ). c l1 and c l2, are usually the same size. the crystal manufacturer typically specifies a load capacitance which is the series combination of c l1 and c l2 . load capacitance c l has the following formula: c l = c l1 x c l2 / ( c l1 + c l2 ) + c stray where c stray is the pin capacitance and board or trace pcb-related capacitance. typically, it is between 2 pf and 7 pf. caution: to avoid exceeding the maximum value of c l1 and c l2 (15 pf) it is strongly recommended to use a resonator with a load capacitance c l 7 pf. never use a resonator with a load capacitance of 12.5 pf. example: if you choose a resonator with a load capacitance of c l = 6 pf, and c stray = 2 pf, then c l1 = c l2 = 8 pf. table 23. lse oscillator characteristics (f lse = 32.768 khz) (1) symbol parameter conditions min typ max unit r f feedback resistor - - 5 - m c (2) recommended load capacitance versus equivalent serial resistance of the crystal (r s ) (3) r s = 30 k - - 15 pf i 2 lse driving current v dd = 3.3 v, v in = v ss - - 1.4 a g m oscillator transconductance - 5 - - a/v t su(lse) (4) startup time v dd is stabilized t a = 50 c - 1.5 - s t a = 25 c - 2.5 - t a = 10 c - 4 - t a = 0 c - 6 - t a = -10 c - 10 - t a = -20 c - 17 - t a = -30 c - 32 - t a = -40 c - 60 - 1. based on characterization, not tested in production. 2. refer to the note and caution paragraphs below the table, and to the application note an2867 ?oscillator design guide for st microcontrollers?. 3. the oscillator selection can be optimized in terms of supply current using an high quality resonator with small r s value for example msiv-tin32.768khz. refer to cr ystal manufacturer for more details 4. t su(lse) is the startup time measured from the moment it is enabl ed (by software) to a stabiliz ed 32.768 khz oscillation is reached. this value is measured for a standard crystal and it can vary significantly wi th the crystal manufacturer electrical characteristics stm32f105xx, stm32f107xx 50/104 docid15274 rev 7 figure 17. typical applicati on with a 32.768 khz crystal a i14129 b osc32_ou t osc32_in f lse c l1 r f stm32f10xxx 32.768 kh z re s on a tor re s on a tor with integr a ted c a p a citor s bi as controlled g a in c l2 docid15274 rev 7 51/104 stm32f105xx, stm32f107xx electrical characteristics 103 5.3.7 internal clock source characteristics the parameters given in table 24 are derived from tests performed under ambient temperature and v dd supply voltage conditions summarized in table 9 . high-speed internal (hsi) rc oscillator low-speed internal (lsi) rc oscillator wakeup time from low-power mode the wakeup times given in table 26 is measured on a wakeup phase with a 8-mhz hsi rc oscillator. the clock source used to wake up the device depends from the curren t operating mode: ? stop or standby mode: the clo ck source is the rc oscillator ? sleep mode: the clock source is the clock that was set before entering sleep mode. table 24. hsi oscillator characteristics (1) 1. v dd = 3.3 v, t a = ?40 to 105 c unless otherwise specified. symbol parameter conditions min typ max unit f hsi frequency - - 8 mhz ducy (hsi) duty cycle - 45 - 55 % acc hsi accuracy of the hsi oscillator user-trimmed with the rcc_cr register (2) 2. refer to application note an2868 ?stm32f10xxx internal rc oscillator (hsi) calibrat ion? available from the st website www.st.com. - - 1 (3) 3. guaranteed by design, not tested in production. % factory- calibrated (4) 4. based on characterization, not tested in production. t a = ?40 to 105 c ?2 - 2.5 % t a = ?10 to 85 c ?1.5 - 2.2 % t a = 0 to 70 c ?1.3 - 2 % t a = 25 c ?1.1 - 1.8 % t su(hsi) (4) hsi oscillator startup time -1 - 2s i dd(hsi) (4) hsi oscillator power consumption - - 80 100 a table 25. lsi oscillator characteristics (1) 1. v dd = 3 v, t a = ?40 to 105 c unless otherwise specified. symbol parameter min typ max unit f lsi (2) 2. based on characterization, not tested in production. frequency 30 40 60 khz t su(lsi) (3) 3. guaranteed by design, not tested in production. lsi oscillator startup time - - 85 s i dd(lsi) (3) lsi oscillator power consumption - 0.65 1.2 a electrical characteristics stm32f105xx, stm32f107xx 52/104 docid15274 rev 7 all timings are derived from tests performed under ambient temperature and v dd supply voltage conditions summarized in table 9 . 5.3.8 pll, pll2 and pll3 characteristics the parameters given in table 27 and table 28 are derived from tests performed under temperature and v dd supply voltage conditions summarized in table 9 . table 26. low-power mode wakeup timings symbol parameter typ unit t wusleep (1) 1. the wakeup times are measured from the wakeup event to the point in which the user application code reads the first instruction. wakeup from sleep mode 1.8 s t wustop (1) wakeup from stop mode (regulator in run mode) 3.6 s wakeup from stop mode (regulator in low power mode) 5.4 t wustdby (1) wakeup from standby mode 50 s table 27. pll characteristics symbol parameter min (1) 1. based on characterization, not tested in production. max (1) unit f pll_in pll input clock (2) 2. take care of using the appropriate multiplier factors so as to have pll input cloc k values compatible with the range defined by f pll_out . 312mhz pulse width at high level 30 - ns f pll_out pll multiplier output clock 18 72 mhz f vco_out pll vco output 36 144 mhz t lock pll lock time - 350 s jitter cycle-to-cycle jitter - 300 ps table 28. pll2 and pll3 characteristics symbol parameter min (1) 1. based on characterization, not tested in production. max (1) unit f pll_in pll input clock (2) 2. take care of using the appropriate multiplier factors so as to have pll input clock values compatible with the range defined by f pll_out . 35mhz pulse width at high level 30 - ns f pll_out pll multiplier output clock 40 74 mhz f vco_out pll vco output 80 148 mhz t lock pll lock time - 350 s jitter cycle-to-cycle jitter - 400 ps docid15274 rev 7 53/104 stm32f105xx, stm32f107xx electrical characteristics 103 5.3.9 memory characteristics flash memory the characteristics are given at t a = ? 40 to 105 c unless otherwise specified. table 30. flash memory endurance and data retention 5.3.10 emc characteristics susceptibility tests are perf ormed on a sample basis duri ng device characterization. table 29. flash memory characteristics symbol parameter conditions min (1) typ max (1) 1. guaranteed by design, not tested in production. unit t prog 16-bit programming time t a = ?40 to +105 c 40 52.5 70 s t erase page (1 kb) erase time t a = ?40 to +105 c 20 - 40 ms t me mass erase time t a = ?40 to +105 c 20 - 40 ms i dd supply current read mode f hclk = 72 mhz with 2 wait states, v dd = 3.3 v - - 20 ma write / erase modes f hclk = 72 mhz, v dd = 3.3 v - - 5 ma power-down mode / halt, v dd = 3.0 to 3.6 v - - 50 a v prog programming voltage - 2 - 3.6 v symbol parameter conditions value unit min (1) 1. based on characterization, not tested in production. typ max n end endurance t a = ?40 to +85 c (6 suffix versions) t a = ?40 to +105 c (7 suffix versions) 10 - - kcycles t ret data retention 1 kcycle (2) at t a = 85 c 2. cycling performed over the whole temperature range. 30 - - years 1 kcycle (2) at t a = 105 c 10 - - 10 kcycles (2) at t a = 55 c 20 - - electrical characteristics stm32f105xx, stm32f107xx 54/104 docid15274 rev 7 functional ems (electromagnetic susceptibility) while a simple application is executed on t he device (toggling 2 leds through i/o ports). the device is stressed by two electromagnetic events until a failure o ccurs. the failure is indicated by the leds: ? electrostatic discharge (esd) (positive and negative) is applied to all device pins until a functional disturbance occurs. this test is compliant with the iec 61000-4-2 standard. ? ftb : a burst of fast transient voltage (p ositive and negative) is applied to v dd and v ss through a 100 pf capacitor, until a functional disturbance occurs. this test is compliant with the iec 61000-4-4 standard. a device reset allows normal operations to be resumed. the test results are given in table 31 . they are based on the ems levels and classes defined in application note an1709. designing hardened software to avoid noise problems emc characterization and optimization are per formed at component level with a typical application environment and simplified mcu soft ware. it should be noted that good emc performance is highly dependent on the user application and the software in particular. therefore it is recommended that the user applies emc software optimization and prequalification tests in re lation with the emc level requested for his application. software recommendations the software flowchart must include the m anagement of runaway conditions such as: ? corrupted program counter ? unexpected reset ? critical data corruption (control registers...) prequalification trials most of the common failures (unexpected reset and program counter corruption) can be reproduced by manually forci ng a low state on the nrst pin or the oscillator pins for 1 second. to complete these trials, esd stress can be applie d directly on the device, over the range of specification values. when unexpected behavior is detected, the software can be hardened to prevent unrecoverable errors occurring (see application note an1015). table 31. ems characteristics symbol parameter conditions level/ class v fesd voltage limits to be applied on any i/o pin to induce a functional disturbance v dd = 3.3 v, lqfp100, t a = +25 c, f hclk = 75 mhz, conforms to iec 61000-4-2 2b v eftb fast transient voltage burst limits to be applied through 100 pf on v dd and v ss pins to induce a functional disturbance v dd = 3.3 v, lqfp100, t a = +25 c, f hclk = 75 mhz, conforms to iec 61000-4-2 4a docid15274 rev 7 55/104 stm32f105xx, stm32f107xx electrical characteristics 103 electromagnetic interference (emi) the electromagnetic field emitted by the device are monitored while a simple application is executed (toggling 2 leds thro ugh the i/o ports). this emissi on test is compliant with sae iec61967-2 standard which specifies the test board and the pin loading. 5.3.11 absolute maximum ratings (electrical sensitivity) based on three different tests (esd, lu) using specific measurement methods, the device is stressed in order to determ ine its performance in terms of electrical sensitivity. electrostatic discharge (esd) electrostatic discharges (a positive then a negative pulse separated by 1 second) are applied to the pins of each sample according to each pin combinati on. the sample size depends on the number of supply pins in the device (3 parts (n+1) supply pins). this test conforms to the jesd22-a114/c101 standard. static latch-up two complementary static te sts are required on six pa rts to assess the latch-up performance: ? a supply overvoltage is applied to each power supply pin ? a current injection is applied to each input, output and configurable i/o pin these tests are compliant with eia/jesd 78a ic latch-up standard. table 32. emi characteristics symbol parameter conditions monitored frequency band max vs. [f hse /f hclk ] unit 8/48 mhz 8/72 mhz s emi peak level v dd = 3.3 v, t a = 25 c, lqfp100 package compliant with iec61967-2 0.1 to 30 mhz 9 9 dbv 30 to 130 mhz 26 13 130 mhz to 1ghz 25 31 sae emi level 4 4 - table 33. esd absolute maximum ratings symbol ratings conditions class maximum value (1) unit v esd(hbm) electrostatic discharge voltage (human body model) t a = +25 c conforming to jesd22-a114 22000 v v esd(cdm) electrostatic discharge voltage (charge device model) t a = +25 c conforming to jesd22-c101 ii 500 1. based on characterization results, not tested in production. electrical characteristics stm32f105xx, stm32f107xx 56/104 docid15274 rev 7 5.3.12 i/o current in jection characteristics as a general rule, current injection to the i/o pins, due to external voltage below v ss or above v dd (for standard, 3 v-capable i/o pins) should be avoided during normal product operation. however, in order to give an indica tion of the robustness of the microcontroller in cases when abnormal injection ac cidentally happens, susceptib ility tests are pe rformed on a sample basis during device characterization. functional susceptibilty to i/o current injection while a simple application is executed on the de vice, the device is stressed by injecting current into the i/o pins programmed in floating input mode . while current is injected into the i/o pin, one at a time, the device is checked for functional failures. the failure is indicated by an out of range parameter: adc error above a certain limit (>5 lsb tue), out of spec current injection on adja cent pins or other functional failure (for example reset, oscillator frequency deviation). the test results are given in table 35 5.3.13 i/o port characteristics general input/output characteristics unless otherwise specified, the parameters given in table 36 are derived from tests performed under the conditions summarized in table 9 . all i/os are cmos and ttl compliant. table 34. electric al sensitivities symbol parameter c onditions class lu static latch-up class t a = +105 c conforming to jesd78a ii level a table 35. i/o current injection susceptibility symbol description functional susceptibility unit negative injection positive injection i inj injected current on osc_in32, osc_out32, pa4, pa5, pc13 -0 +0 ma injected current on all ft pins -5 +0 injected current on any other pin -5 +5 table 36. i/o static characteristics symbol parameter conditions min typ max unit v il standard io input low level voltage - ?0.3 - 0.28*(v dd -2 v)+0.8 v v io ft (1) input low level voltage - ?0.3 - 0.32*(v dd -2v)+0.75 v v docid15274 rev 7 57/104 stm32f105xx, stm32f107xx electrical characteristics 103 all i/os are cmos and ttl compliant (no software configuration required). their characteristics cover more than the strict cmos-technology or ttl parameters. the coverage of these requirements is shown in figure 18 and figure 19 for standard i/os, and in figure 20 and figure 21 for 5 v tolerant i/os. v ih standard io input high level voltage - 0.41*(v dd -2 v)+1.3 v - v dd +0.3 v io ft (1) input high level voltage v dd > 2 v 0.42*(v dd -2 v)+1 v - 5.5 v v dd 2 v 5.2 v hys standard io schmitt trigger voltage hysteresis (2) - 200 - - mv io ft schmitt trigger voltage hysteresis (2) - 5% v dd (3) - - mv i lkg input leakage current (4) v ss v in v dd standard i/os - - 1 a v in = 5 v, i/o ft - - 3 r pu weak pull- up equivalent resistor (5) all pins except for pa10 v in = v ss 30 40 50 k pa10 8 11 15 r pd weak pull- down equivalent resistor (5) all pins except for pa10 v in = v dd 30 40 50 k pa10 8 11 15 c io i/o pin capacitance - - 5 - pf 1. ft = five-volt tolerant. in order to sustain a voltage higher than v dd +0.3 the internal pull-up/pull-down resistors must be disabled. 2. hysteresis voltage between schmitt trigger switching leve ls. based on characterization, not tested in production. 3. with a minimum of 100 mv. 4. leakage could be higher than max. if negative current is injected on adjacent pins. 5. pull-up and pull-down resistors are designed with a true re sistance in series with a switchable pmos/nmos. this mos/nmos contribution to the series resistance is minimum (~10% order) . table 36. i/o static characteristics (continued) symbol parameter conditions min typ max unit electrical characteristics stm32f105xx, stm32f107xx 58/104 docid15274 rev 7 figure 18. standard i/o input characteristics - cmos port figure 19. standard i/o input characteristics - ttl port a i b 6 $ $ 6 ) n p u t r a n g e n o t g u a r a n t e e d 6 ) ( 6 $ $ # - / 3 s t a n d a r d r e q u i r e m e n t 6 ) ( 6 $ $ 6 ) ( 6 ) , 6 # - / 3 s t a n d a r d r e q u i r e m e n t 6 ) , 6 $ $ 7 ) , m a x 7 ) ( m i n 6 $ $ 6 ) , a i ) n p u t r a n g e n o t g u a r a n t e e d 6 ) ( 6 ) , 6 4 4 , r e q u i r e m e n t s 6 ) ( 6 6 ) ( 6 $ $ 6 ) , 6 $ $ 4 4 , r e q u i r e m e n t s 6 ) , 6 6 $ $ 6 7 ) , m a x 7 ) ( m i n docid15274 rev 7 59/104 stm32f105xx, stm32f107xx electrical characteristics 103 figure 20. 5 v tolerant i/o inpu t characteristics - cmos port figure 21. 5 v tolerant i/o input characteristics - ttl port 6 $ $ # - / 3 s t a n d a r d r e q u i r e m e n t s 6 ) ( 6 $ $ # - / 3 s t a n d a r d r e q u i r m e n t 6 ) , 6 $ $ 6 ) ( 6 ) , 6 6 $ $ 6 ) n p u t r a n g e n o t g u a r a n t e e d a i b 6 ) ( 6 $ $ 6 ) , 6 $ $ n o t g u a r a n t e e d ) n p u t r a n g e 4 4 , r e q u i r e m e n t 6 ) ( 6 6 ) ( |