![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
january 2012 doc id 022152 rev 2 1/167 1 stm32f405xx stm32f407xx arm cortex-m4 32b mcu+fpu, 210d mips, up to 1mb flash/192+4kb ram, usb otg hs/fs, ethernet, 17 tims, 3 adcs, 15 comm. interfaces & camera features core: arm 32-bit cortex?-m4 cpu with fpu, adaptive real-time accelerator (art accelerator?) allowing 0-wait state execution from flash memory, frequency up to 168 mhz, memory protection unit, 210 dmips/ 1.25 dmips/mhz (dhrystone 2.1), and dsp instructions memories ? up to 1 mbyte of flash memory ? up to 192+4 kbytes of sram including 64- kbyte of ccm (core coupled memory) data ram ? flexible static memory controller supporting compact flash, sram, psram, nor and nand memories lcd parallel interface, 8080/6800 modes clock, reset and supply management ? 1.8 v to 3.6 v application supply and i/os ? por, pdr, pvd and bor ? 4-to-26 mhz crystal oscillator ? internal 16 mhz factory-trimmed rc (1% accuracy) ? 32 khz oscillator for rtc with calibration ? internal 32 khz rc with calibration low power ? sleep, stop and standby modes ?v bat supply for rtc, 2032 bit backup registers + optional 4 kb backup sram 312-bit, 2.4 msps a/d co nverters: up to 24 channels and 7.2 msps in triple interleaved mode 212-bit d/a converters general-purpose dma: 16-stream dma controller with fifos and burst support up to 17 timers: up to twelve 16-bit and two 32- bit timers up to 168 mhz, each with up to 4 ic/oc/pwm or pulse counter and quadrature (incremental) encoder input debug mode ? serial wire debug (swd) & jtag interfaces ? cortex-m4 embedded trace macrocell? 1. the wlcsp90 package will soon be available. up to 140 i/o ports with interrupt capability ? up to 136 fast i/os up to 84 mhz ? up to 138 5 v-tolerant i/os up to 15 communication interfaces ? up to 3 i 2 c interfaces (smbus/pmbus) ? up to 4 usarts/2 uarts (10.5 mbit/s, iso 7816 interface, lin, irda, modem control) ? up to 3 spis (37.5 mbits/s), 2 with muxed full-duplex i 2 s to achieve audio class accuracy via internal audio pll or external clock ? 2 can interfaces (2.0b active) ? sdio interface advanced connectivity ? usb 2.0 full-speed device/host/otg controller with on-chip phy ? usb 2.0 high-speed/full-speed device/host/otg controller with dedicated dma, on-chip full-speed phy and ulpi ? 10/100 ethernet mac with dedicated dma: supports ieee 1588v2 hardware, mii/rmii 8- to 14-bit parallel camera interface up to 54 mbytes/s true random number generator crc calculation unit 96-bit unique id rtc: subsecond accuracy, hardware calendar table 1. device summary reference part number stm32f405xx stm32f405rg, stm32f405vg, stm32f405zg stm32f407xx stm32f407vg, stm32f407ig, stm32f407zg, stm32f407ve, stm32f407ze, stm32f407ie lqfp64 (10 10 mm) lqfp100 (14 14 mm) lqfp144 (20 20 mm) fbga ufbga176 (10 10 mm) lqfp176 (24 24 mm) wlcsp90 www.st.com
contents stm32f405xx, stm32f407xx 2/167 doc id 022152 rev 2 contents 1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1 full compatibility throughout the family . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.1 arm ? cortex?-m4f core with embedded flash and sram . . . . . . . . 18 2.2.2 adaptive real-time memory accelerator (art accelerator?) . . . . . . . . 18 2.2.3 memory protection unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.4 embedded flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.5 crc (cyclic redundancy check) calculation unit . . . . . . . . . . . . . . . . . . 19 2.2.6 embedded sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.7 multi-ahb bus matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.8 dma controller (dma) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2.9 flexible static memory controller (fsmc) . . . . . . . . . . . . . . . . . . . . . . . 21 2.2.10 nested vectored interrupt controller (nvic) . . . . . . . . . . . . . . . . . . . . . . 21 2.2.11 external interrupt/event controller (exti) . . . . . . . . . . . . . . . . . . . . . . . 21 2.2.12 clocks and startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2.13 boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2.14 power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2.15 power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.2.16 voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.2.17 real-time clock (rtc), backup sram and backup registers . . . . . . . . 26 2.2.18 low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.2.19 v bat operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.2.20 timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.2.21 inter-integrated circuit interface (i2c) . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2.22 universal synchronous/asynchronous receiver transmitters (usart) . 31 2.2.23 serial peripheral interface (spi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.2.24 inter-integrated sound (i 2 s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.2.25 audio pll (plli2s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.26 secure digital input/output interface (sdio) . . . . . . . . . . . . . . . . . . . . . 33 2.2.27 ethernet mac interface with dedicated dma and ieee 1588 support . 33 2.2.28 controller area network (bxcan) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.2.29 universal serial bus on-the-go full-speed (otg_fs) . . . . . . . . . . . . . . . 34 stm32f405xx, stm32f407xx contents doc id 022152 rev 2 3/167 2.2.30 universal serial bus on-the-go high-speed (otg_hs) . . . . . . . . . . . . . 34 2.2.31 digital camera interface (dcmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2.32 random number generator (rng) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2.33 general-purpose input/outputs (gpios) . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2.34 analog-to-digital converters (adcs) . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.35 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.36 digital-to-analog converter (dac) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.37 serial wire jtag debug port (swj-dp) . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.2.38 embedded trace macrocell? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3 pinouts and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5 electrical characteristi cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1 parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.1 minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.2 typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.3 typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.4 loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.5 pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1.6 power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.1.7 current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.2 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.3 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.3.1 general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.3.2 vcap1/vcap2 external capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.3.3 operating conditions at power-up / power-down (regulator on) . . . . . . 68 5.3.4 operating conditions at power-up / power-down (regulator off) . . . . . 68 5.3.5 embedded reset and power control block characteristics . . . . . . . . . . . 69 5.3.6 supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.3.7 wakeup time from low-power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.3.8 external clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.3.9 internal clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.3.10 pll characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.3.11 pll spread spectrum clock generation (sscg) characteristics . . . . . . 92 5.3.12 memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 contents stm32f405xx, stm32f407xx 4/167 doc id 022152 rev 2 5.3.13 emc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.3.14 absolute maximum ratings (electrical sensitivity) . . . . . . . . . . . . . . . . . 97 5.3.15 i/o current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5.3.16 i/o port characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3.17 nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 5.3.18 tim timer characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.3.19 communications interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.3.20 12-bit adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 5.3.21 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.3.22 v bat monitoring characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.3.23 embedded reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.3.24 dac electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.3.25 fsmc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.3.26 camera interface (dcmi) timing specifications . . . . . . . . . . . . . . . . . . 144 5.3.27 sd/sdio mmc card host interface (sdio) characteristics . . . . . . . . . 144 5.3.28 rtc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6 package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.1 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.2 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 7 part numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 appendix a application block diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 a.1 main applications versus package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 a.2 application example with regulator off . . . . . . . . . . . . . . . . . . . . . . . . . 155 a.3 usb otg full speed (fs) interface solutions . . . . . . . . . . . . . . . . . . . . . 156 a.4 usb otg high speed (hs) interface solutions . . . . . . . . . . . . . . . . . . . . 158 a.5 complete audio player solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 a.6 ethernet interface solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 8 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 stm32f405xx, stm32f407xx list of tables doc id 022152 rev 2 5/167 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. stm32f405xx and stm32f407xx: features and peripheral counts. . . . . . . . . . . . . . . . . . 12 table 3. timer feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 4. usart feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 5. legend/abbreviations used in the pinout table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 6. stm32f40x pin and ball definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 7. alternate function mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 8. voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 9. current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 10. thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 11. general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 12. limitations depending on the operating power supply range . . . . . . . . . . . . . . . . . . . . . . . 67 table 13. vcap1/vcap2 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 table 14. operating conditions at power-up / power-down (regulator on) . . . . . . . . . . . . . . . . . . . . 68 table 15. operating conditions at power-up / power-down (regulator off). . . . . . . . . . . . . . . . . . . . 68 table 16. embedded reset and power control block characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 17. typical and maximum current consumption in run mode, code with data processing running from flash memory (art accelerator disabled) . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 18. typical and maximum current consumption in run mode, code with data processing running from flash memory (art accelerator enabled) or ram . . . . . . . . . . . . . . . . . . . 72 table 19. typical and maximum current consumption in sleep mode . . . . . . . . . . . . . . . . . . . . . . . . 75 table 20. typical and maximum current consumptions in stop mode . . . . . . . . . . . . . . . . . . . . . . . . 76 table 21. typical and maximum current consumptions in standby mode . . . . . . . . . . . . . . . . . . . . . 76 table 22. typical and maximum current consumptions in v bat mode. . . . . . . . . . . . . . . . . . . . . . . . 77 table 23. switching output i/o current consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 table 24. peripheral current consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 table 25. low-power mode wakeup timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 table 26. high-speed external user clock characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 table 27. low-speed external user clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 table 28. hse 4-26 mhz oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 6 table 29. lse oscillator characteristics (f lse = 32.768 khz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 table 30. hsi oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 31. lsi oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 32. main pll characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 table 33. plli2s (audio pll) characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 table 34. sscg parameters constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 table 35. flash memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 table 36. flash memory programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 table 37. flash memory programming with v pp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 table 38. flash memory endurance and data retention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 table 39. ems characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 table 40. emi characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 table 41. esd absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 table 42. electrical sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 43. i/o current injection susceptibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 44. i/o static characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 table 45. output voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 table 46. i/o ac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 list of tables stm32f405xx, stm32f407xx 6/167 doc id 022152 rev 2 table 47. nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 table 48. characteristics of timx connected to the apb1 domain . . . . . . . . . . . . . . . . . . . . . . . . . 104 table 49. characteristics of timx connected to the apb2 domain . . . . . . . . . . . . . . . . . . . . . . . . . 105 table 50. i 2 c characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 table 51. scl frequency (f pclk1 = 42 mhz.,v dd = 3.3 v) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 table 52. spi characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 table 53. i 2 s characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 54. usb otg fs startup time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 55. usb otg fs dc electrical characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 56. usb otg fs electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 57. usb fs clock timing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 14 table 58. usb hs dc electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 table 59. usb hs clock timing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 table 60. ulpi timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 table 61. ethernet dc electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 table 62. dynamics characteristics: ethernet mac signals for smi. . . . . . . . . . . . . . . . . . . . . . . . . 116 table 63. dynamics characteristics: ethernet mac signals for rmii . . . . . . . . . . . . . . . . . . . . . . . . 117 table 64. dynamics characteristics: ethernet mac signals for mii . . . . . . . . . . . . . . . . . . . . . . . . . 118 table 65. adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 table 66. adc accuracy at f adc = 30 mhz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 table 67. ts characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 68. v bat monitoring characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 69. embedded internal reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 70. dac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 table 71. asynchronous non-multiplexed sram/psram/nor read timings . . . . . . . . . . . . . . . . . 127 table 72. asynchronous non-multiplexed sram/psram/nor write timings . . . . . . . . . . . . . . . . . 128 table 73. asynchronous multiplexed psram/nor read timings. . . . . . . . . . . . . . . . . . . . . . . . . . . 129 table 74. asynchronous multiplexed psram/nor write timings . . . . . . . . . . . . . . . . . . . . . . . . . . 130 table 75. synchronous multiplexed nor/psram read timings . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 table 76. synchronous multiplexed psram write timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 table 77. synchronous non-multiplexed nor/psram read timings . . . . . . . . . . . . . . . . . . . . . . . . 134 table 78. synchronous non-multiplexed psram write timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 table 79. switching characteristics for pc card/cf read and write cycles in attribute/common space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 table 80. switching characteristics for pc card/cf read and write cycles in i/o space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 table 81. switching characteristics for nand flash read cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 table 82. switching characteristics for nand flash write cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 83. dcmi characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 84. sd / mmc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 table 85. rtc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 table 86. lqfp64 ? 10 x 10 mm 64 pin low-profile quad flat package mechanical data . . . . . . . . . 147 table 87. lqpf100 ? 14 x 14 mm 100-pin low-profile quad flat package mechanical data. . . . . . . 148 table 88. lqfp144, 20 x 20 mm, 144-pin low-profile quad flat package mechanical data . . . . . . . 149 table 89. ufbga176+25 - ultra thin fine pitch ball grid array 10 10 0.6 mm mechanical data . 150 table 90. lqfp176, 24 x 24 mm, 144-pin low-profile quad flat package mechanical data . . . . . . . 151 table 91. package thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 table 92. ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 table 93. main applications versus package for stm32f407xx microcontrollers . . . . . . . . . . . . . . 154 table 94. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 stm32f405xx, stm32f407xx list of figures doc id 022152 rev 2 7/167 list of figures figure 1. compatible board design between stm32f10xx/stm32f4xx for lqfp64 . . . . . . . . . . . . 14 figure 2. compatible board design stm32f10xx/stm32f2xx/stm32f4xx for lqfp100 package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 3. compatible board design between stm32f10xx/stm32f2xx/stm32f4xx for lqfp144 package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 4. compatible board design between stm32f2xx and stm32f4xx for lqfp176 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 5. stm32f40x block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 6. multi-ahb matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 7. regulator on/internal reset off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 8. startup in regulator off: slow v dd slope - power-down reset risen after v cap_1 /v cap_2 stabilization . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 9. startup in regulator off mode: fast v dd slope - power-down reset risen before v cap_1 /v cap_2 stabilization . . . . . . . . . . . . . . . . . . . . . . 26 figure 10. stm32f40x lqfp64 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 figure 11. stm32f40x lqfp100 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 12. stm32f40x lqfp144 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 figure 13. stm32f40x lqfp176 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 14. stm32f40x ufbga176 ballout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 figure 15. memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 16. pin loading conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 17. pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 18. power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 19. current consumption measurement scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 figure 20. external capacitor c ext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 21. typical current consumption vs temperature, run mode, code with data processing running from flash (art accelerator on) or ram, and peripherals off . . . . 73 figure 22. typical current consumption vs temperature, run mode, code with data processing running from flash (art accelerator on) or ram, and peripherals on . . . . . 73 figure 23. typical current consumption vs temperature, run mode, code with data processing running from flash (art accelerator off) or ram, and peripherals off . . . 74 figure 24. typical current consumption vs temperature, run mode, code with data processing running from flash (art accelerator off) or ram, and peripherals on . . . . 74 figure 25. typical v bat current consumption (lse and rtc on/backup ram off) . . . . . . . . . . . . 77 figure 26. typical v bat current consumption (lse and rtc on/backup ram on) . . . . . . . . . . . . . 78 figure 27. high-speed external clock source ac timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 28. low-speed external clock source ac timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 29. typical application with an 8 mhz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 figure 30. typical application with a 32.768 khz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 figure 31. acc lsi versus temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 figure 32. pll output clock waveforms in center spread mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 figure 33. pll output clock waveforms in down spread mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 figure 34. i/o ac characteristics definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 figure 35. recommended nrst pin protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 figure 36. i 2 c bus ac waveforms and measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 figure 37. spi timing diagram - slave mode and cpha = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 figure 38. spi timing diagram - slave mode and cpha = 1 (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 figure 39. spi timing diagram - master mode (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 list of figures stm32f405xx, stm32f407xx 8/167 doc id 022152 rev 2 figure 40. i 2 s slave timing diagram (philips protocol) (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 figure 41. i 2 s master timing diag ram (philips protocol) (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 figure 42. usb otg fs timings: definition of data signal rise and fall time . . . . . . . . . . . . . . . . . . . 114 figure 43. ulpi timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 figure 44. ethernet smi timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 45. ethernet rmii timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 46. ethernet mii timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 47. adc accuracy characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 figure 48. typical connection diagram using the adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 figure 49. power supply and reference decoupling (v ref+ not connected to v dda ). . . . . . . . . . . . . 122 figure 50. power supply and reference decoupling (v ref+ connected to v dda ). . . . . . . . . . . . . . . . 122 figure 51. 12-bit buffered /non-buffered dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 figure 52. asynchronous non-multiplexed sram/psram/nor read waveforms . . . . . . . . . . . . . . 127 figure 53. asynchronous non-multiplexed sram/psram/nor write waveforms . . . . . . . . . . . . . . 128 figure 54. asynchronous multiplexed psram/nor read waveforms. . . . . . . . . . . . . . . . . . . . . . . . 129 figure 55. asynchronous multiplexed psram/nor write waveforms . . . . . . . . . . . . . . . . . . . . . . . 130 figure 56. synchronous multiplexed nor/psram read timings . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 figure 57. synchronous multiplexed psram write timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 figure 58. synchronous non-multiplexed nor/psram read timings . . . . . . . . . . . . . . . . . . . . . . . . 134 figure 59. synchronous non-multiplexed psram write timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 figure 60. pc card/compactflash controller waveforms for common memory read access . . . . . . 136 figure 61. pc card/compactflash controller waveforms for common memory write access . . . . . . 137 figure 62. pc card/compactflash controlle r waveforms for attribute memory read access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 figure 63. pc card/compactflash controlle r waveforms for attribute memory write access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 figure 64. pc card/compactflash controller waveforms for i/o space read access . . . . . . . . . . . . 139 figure 65. pc card/compactflash controller waveforms for i/o space write access . . . . . . . . . . . . 140 figure 66. nand controller waveforms for read access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 figure 67. nand controller waveforms for write access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 figure 68. nand controller waveforms for common memory read access . . . . . . . . . . . . . . . . . . . . 143 figure 69. nand controller waveforms for common memory write access. . . . . . . . . . . . . . . . . . . . 143 figure 70. sdio high-speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 figure 71. sd default mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 figure 72. lqfp64 ? 10 x 10 mm 64 pin low-profile quad flat package outline . . . . . . . . . . . . . . . . 147 figure 73. recommended footprint (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 figure 74. lqfp100, 14 x 14 mm 100-pin low-profile quad flat package outline . . . . . . . . . . . . . . . 148 figure 75. recommended footprint (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 figure 76. lqfp144, 20 x 20 mm, 144-pin low-profile quad flat package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 figure 77. recommended footprint (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 figure 78. ufbga176+25 - ultra thin fine pitch ball grid array 10 10 0.6 mm, package outline . 150 figure 79. lqfp176 24 x 24 mm, 144-pin low-profile quad flat package outline . . . . . . . . . . . . . . . 151 figure 80. regulator off/internal reset on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 figure 81. regulator off/internal reset off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 figure 82. usb controller configured as peripheral-only and used in full speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 56 figure 83. usb controller configured as host-only and used in full speed mode. . . . . . . . . . . . . . . . 156 figure 84. usb controller configured in dual mode and used in full speed mode . . . . . . . . . . . . . . . 157 figure 85. usb controller configured as peripheral, host, or dual-mode and used in high speed mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 figure 86. complete audio player solution 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 stm32f405xx, stm32f407xx list of figures doc id 022152 rev 2 9/167 figure 87. complete audio player solution 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 figure 88. audio player solution using pll, plli2s, usb and 1 crystal . . . . . . . . . . . . . . . . . . . . . . 160 figure 89. audio pll (plli2s) providing accurate i2s clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 figure 90. master clock (mck) used to drive the external audio dac. . . . . . . . . . . . . . . . . . . . . . . . 161 figure 91. master clock (mck) not used to drive the external audio dac. . . . . . . . . . . . . . . . . . . . . 161 figure 92. mii mode using a 25 mhz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 62 figure 93. rmii with a 50 mhz oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 figure 94. rmii with a 25 mhz crystal and phy with pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 introduction stm32f405xx, stm32f407xx 10/167 doc id 022152 rev 2 1 introduction this datasheet provides the description of the stm32f405xx and stm32f407xx lines of microcontrollers. for more details on the whole stmicroelectronics stm32? family, please refer to section 2.1: full compatib ility throughout the family . the stm32f405xx and stm32f407xx datasheet should be read in conjunction with the stm32f4xx reference manual. for information on programming, erasing and protection of the internal flash memory, please refer to the stm32f4xx flash programming manual (pm0081). the reference and flash programming manuals are both available from the stmicroelectronics website www.st.com . for information on the cortex?-m4 core please refer to the cortex?-m4 technical reference manual, available from the www.arm.com website at the following address: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0439b/. stm32f405xx, stm32f407xx description doc id 022152 rev 2 11/167 2 description the stm32f405xx and stm32f407xx family is based on the high-performance arm ? cortex?-m4 32-bit risc core operating at a frequency of up to 168 mhz. the cortex-m4 core features a floating point unit (fpu) sing le precision which supports all arm single- precision data-processing instructions and data types. it also implements a full set of dsp instructions and a memory protection unit (mpu) which enhances application security. the cortex-m4 core with fpu will be referred to as cortex-m4f through out this document. the stm32f405xx and stm32f407xx family incorporates high-speed embedded memories (flash memory up to 1 mbyte, up to 192 kbytes of sram), up to 4 kbytes of backup sram, and an extensive range of enhanced i/os and peripherals connected to two apb buses, two ahb buses and a 32-bit multi-ahb bus matrix. all devices offer three 12-bit adcs, two dacs, a low-power rtc, twelve general-purpose 16-bit timers including two pwm timers for motor control, two general-purpose 32-bit timers. a true random number generator (rng). they also feature standard and advanced communication interfaces. up to three i 2 cs three spis, two i 2 ss full duplex. to achieve audio class accuracy, the i 2 s peripherals can be clocked via a dedicated internal audio pll or via an external clock to allow synchronization. four usarts plus two uarts an usb otg full-speed and a usb otg high- speed with full-speed capability (with the ulpi), tw o c a n s an sdio/mmc interface ethernet and the camera interface available on stm32f407xx devices only. new advanced peripherals include an sdio, an enhanced flexible static memory control (fsmc) interface (for devices offered in packages of 100 pins and more), a camera interface for cmos sensors. refer to table 2: stm32f405xx and stm32f407xx: features and peripheral counts for the list of peripherals available on each part number. the stm32f405xx and stm32f407xx family operates in the ?40 to +105 c temperature range from a 1.8 to 3.6 v power supply. the supply voltage can drop to 1.7 v when the device operates in the 0 to 70 c temperature range and pdr is disabled. a comprehensive set of power-saving mode allows the design of low-power applications. the stm32f405xx and stm32f407xx family offers devices in four packages ranging from 64 pins to 176 pins. the set of included peripherals changes with the device chosen. these features make the stm32f405xx and stm32f407xx microcontroller family suitable for a wide range of applications: motor drive and application control medical equipment industrial applications: plc, inverters, circuit breakers printers, and scanners alarm systems, video intercom, and hvac home audio appliances description stm32f405xx, stm32f407xx 12/167 doc id 022152 rev 2 figure 5 shows the general block diagram of the device family. table 2. stm32f405xx and stm32f407xx: features and peripheral counts peripherals stm32f405rg stm32f405vg stm32f40 5zg stm32f407vx stm32f407zx stm32f407ix flash memory in kbytes 1024 512 1024 512 1024 512 1024 sram in kbytes system 192(112+16+64) backup 4 fsmc memory controller no yes ethernet no yes timers general-purpose 10 advanced- control 2 basic 2 random number generator yes communication interfaces spi / i 2 s 3/2 (full duplex) i 2 c 3 usart/uart 4/2 usb otg fs no yes usb otg hs yes yes can 2 camera interface no yes gpios 51 82 114 82 114 140 12-bit adc number of channels 3 16 16 24 16 24 24 12-bit dac number of channels ye s 2 maximum cpu frequency 168 mhz operating voltage 1.8 to 3.6 v (1) stm32f405xx, stm32f407xx description doc id 022152 rev 2 13/167 operating temperatures ambient temperatures: ?40 to +85 c /?40 to +105 c junction temperature: ?40 to + 125 c package lqfp64 lqfp100 lqfp144 lqfp100 lqfp144 ufbga176 lqfp176 1. v dd /v dda minimum value of 1.7 v is obtained when the device operates in the 0 to 70 c temperature range and pdr is disabled. table 2. stm32f405xx and stm32f407xx: features and peripheral counts (continued) peripherals stm32f405rg stm32f405vg stm32f40 5zg stm32f407vx stm32f407zx stm32f407ix description stm32f405xx, stm32f407xx 14/167 doc id 022152 rev 2 2.1 full compatibility throughout the family the stm32f405xx and stm32f407xx are part of the stm32f4 family. they are fully pin- to-pin, software and feature compatible with the stm32f2xx devices, allowing the user to try different memory densities, peripherals, and performances (fpu, higher frequency) for a greater degree of freedom during the development cycle. the stm32f405xx and stm32f 407xx devices maintain a close compatibility with the whole stm32f10xxx family. all functional pins are pin-to-pin compatible. the stm32f405xx and stm32f407xx, however, are not drop-in replacements for the stm32f10xxx devices: the two families do not have the same power scheme, and so their power pins are different. nonetheless, transition from the stm32f10xxx to the stm32f40x family remains simple as only a few pins are impacted. figure 4 , figure 3 , figure 2 , and figure 1 give compatible board designs between the stm32f40x, stm32f2xxx, and stm32f10xxx families. figure 1. compatible board design between stm32f10xx/stm32f4xx for lqfp64 6 3 3 6 3 3 6 3 3 6 3 3 r e s i s t o r o r s o l d e r i n g b r i d g e p r e s e n t f o r t h e 3 4 - & |