Ç°ÑÔ
²ÄÁÏ×¼±¸
STM32F4xx ¹Ì¼þ¿â£ºSTM32F4xx_DSP_StdPeriph_Lib_V1.4.0.rar
Keil-MDK
Ò»µãÄÍÐÄ
н¨¿âº¯Êý¹¤³Ì×¢ÒâÊÂÏî
¹¤³ÌÄ¿±ê Device Ñ¡ÔñµÄоƬÐͺŲ»Í¬¡£
Ìí¼ÓµÄÆô¶¯Îļþ²»Í¬¡£Òª¸ù¾ÝоƬÐͺÅÔÚ arm Ŀ¼ÏÂÑ¡ÔñÏàÓ¦µÄ .s Îļþ¡£
C/C++ Ñ¡ÏµÄоƬÐͺź궨Ò岻ͬ¡£¾ßÌåÓÐÄÄЩѡÔñ¿ÉÔÚ stm32f4xx.h Í·ÎļþÖеÄÌõ¼þ±àÒëÖ¸ÁîÖÐÕÒµ½¡£²»È·¶¨Ñ¡ÄĸöµÄ»°¿ÉÒÔ¸ù¾ÝоƬÖ÷Ƶ´Ó system_stm32f4xx.c ÎļþµÄ PLL ·ÖƵ²ÎÊý·´Íƺ궨Ò壨ҪÇó¶ÔʱÖÓÊ÷±È½ÏÊ죩¡£
Ëù¾ß±¸µÄƬÉÏÍâÉ費ͬ¡£¹¤³Ì»áÔÚ±àÒëʱ¸ù¾ÝоƬÐͺź궨Òå½øÐмĴæÆ÷Ó³É䣬¶ÔоƬËùûÓеÄÍâÉè¿âÎļþÒªÅųý±àÒ루ÈçÎÄÖÐµÄ fmc ºÍ fsmc£©£¬·ñÔò»á±¨±êʶ·û䶨Òå´íÎó¡£
²¹³ä£ºÈçºÎÈ·¶¨Ä³Ð¾Æ¬ÓÐÎÞij¸öÍâÉ裿
Cortex-M4 н¨¿âº¯Êý¹¤³Ì²½ÖèÒ»¡¢Ð½¨¹¤³ÌÎļþ¼Ð
н¨Ò»¸öÎļþ¼Ð template ÓÃÓÚ´æ·Å¹¤³ÌÄ£°å¡£
ÔÚ template Îļþ¼ÐÄÚ·Ö±ðн¨ Doc£¨´æ·ÅÎĵµ£©¡¢User£¨´æ·ÅÓû§Îļþ£©Á½¸öÎļþ¼Ð¡£
ÔÚ User Îļþ¼ÐÖÐн¨ inc ºÍ src Á½¸öÎļþ¼Ð·Ö±ð´æ·ÅÓû§Í·ÎļþºÍÔ´Îļþ¡£
¶þ¡¢¸´Öƿ⺯ÊýÎļþ1. ¸´ÖÆ Libraries Îļþ¼Ð
ɾ³ý template\Libraries\CMSIS Ŀ¼Ï³ý Device ºÍ Include ÍâµÄËùÓÐÎļþ¼Ð¡£
ɾ³ý template\Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates Ŀ¼Ï³ý arm Îļþ¼ÐºÍsystem_stm32f4xx.c ÍâµÄËùÓÐÎļþ¼Ð¡£
ɾ³ý template\Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm Ŀ¼Ï³ý startup_stm32f401xx.s ÍâµÄÆäÓàÆô¶¯Îļþ¡£
¹Ì¼þ¿âÀïÀàËÆ Release_Notes.html µÄ˵Ã÷ÎļþÒ²¿ÉÒÔɾÁË¡£
3. Ìí¼ÓÎļþµ½ User Îļþ¼Ð
´ò¿ª STM32F4xx_DSP_StdPeriph_Lib_V1.4.0\Project\STM32F4xx_StdPeriph_Templates Ŀ¼£¬ÕÒµ½stm32f4xx_conf.h¡¢stm32f4xx_it.h¡¢stm32f4xx_it.c Èý¸öÎļþ¡£
¸´ÖÆ stm32f4xx_conf.h Îļþµ½ template\User\inc Ŀ¼¡£
¸´ÖÆ stm32f4xx_it.h Îļþµ½ template\User\inc Ŀ¼¡£
¸´ÖÆ stm32f4xx_it.c Îļþµ½ template\User\src Ŀ¼¡£
ÔÚ template\User\src Ŀ¼ÖÐн¨ main.c Îļþ£¬²¢±àдÒÔÏÂÖ÷º¯Êý´úÂë±£´æ¡£
Èý¡¢Keil н¨¹¤³Ì
Íù·Ö×é CMSIS ÖÐÌí¼Ó system_stm32f4xx.c ϵͳÅäÖÃÎļþºÍ startup_stm32f40_41xxx.s Æô¶¯Îļþ¡£
Íù·Ö×é STM32F4xx_StdPeriph_Driver ÖÐÌí¼Ó Libraries\STM32F4xx_StdPeriph_Driver\src Ŀ¼ÏµÄËùÓÐ .c Îļþ¡£
Íù·Ö×é USER ÖÐÌí¼ÓÎļþ main.c ºÍ stm32f4xx_it.c¡£
ËÄ¡¢¹¤³ÌÅäÖÃ
¹´Ñ¡ Use Micro LIB Ñ¡ÏΪÁËÔÚ¹¤³ÌÖÐʹÓà printf() º¯Êý¡£
ÈçÐèÉú³É .hex Îļþ£¬ÔòÒª¹´Ñ¡ Create HEX File Ñ¡Ïî¡£
ÔÚ¡¸Ô¤´¦Àí·ûºÅ¡¹Preprocessor Symbols Ï嵀 Define Ò»À¸ÖÐÌí¼Ó STM32F401xx ºÍ USE_STDPERIPH_DRIVER Á½¸öºê¶¨Ò壨ÓöººÅ·Ö¸ô£©¡£
ÔÚÖÐÌí¼ÓÒÔÏÂÍ·Îļþ·¾¶£¬×¢ÒâÒª¾ßÌ嵽ͷÎļþÉÏÒ»²ãĿ¼¡£
.\Libraries\CMSIS\Device\ST\STM32F4xx\Include
.\Libraries\CMSIS\Include
.\Libraries\STM32F4xx_StdPeriph_Driver\inc
.\User\inc
Îå¡¢ÏÂÔØÆ÷ÅäÖÃ
Áù¡¢×îºóСÕû¸Ä
ɾ³ý stm32f4xx_it.c Îļþ 32 ÐеĴúÂë #include ¡°main.h¡±£¨ÒòΪûÓÐдÕâ¸öÎļþ£©¡£
ɾ³ý stm32f4xx_it.c Îļþ 144 ÐеĴúÂë TimingDelay_Decrement();£¨µÎ´ð¶¨Ê±Æ÷ÑÓʱÏà¹Ø£¬ÔÝʱÓò»µ½£©¡£
Æß¡¢±àÒ빤³Ì¡¢ÏÂÔØÑéÖ¤