﻿{"id":68,"date":"2010-05-22T09:10:39","date_gmt":"2010-05-22T01:10:39","guid":{"rendered":"http:\/\/nick.workao.org\/?p=68"},"modified":"2010-05-22T09:11:15","modified_gmt":"2010-05-22T01:11:15","slug":"%e5%8e%9f%e5%88%9bstm32%e5%9f%ba%e4%ba%8efwlib-3-12%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%ba%8c-%e4%b9%9f%e6%98%af%e7%82%b9%e4%ba%ae%e5%8f%91%e5%85%89%e4%ba%8c%e6%9e%81%e7%ae%a1","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/scm\/68","title":{"rendered":"[\u539f\u521b]STM32\u57fa\u4e8eFWLIB 3.12\u5b66\u4e60\u7b14\u8bb0\u4e8c \u4e5f\u662f\u70b9\u4eae\u53d1\u5149\u4e8c\u6781\u7ba1"},"content":{"rendered":"<p>\u5982\u679c\u65e0\u6cd5\u67e5\u770b\u56fe\u7247\uff0c\u8bf7\u76f4\u63a5\u8bbf\u95ee\u6211\u7684\u535a\u5ba2\u5730\u5740\uff1a<a href=\"http:\/\/showvi.com\/Blog\/CategoryAirticleList\/90\" target=\"_blank\"><a href=\"http:\/\/showvi.com\/Blog\/CategoryAirticleList\/90\">http:\/\/showvi.com\/Blog\/CategoryAirticleList\/90<\/a><\/a><\/p>\n<p>\u4e0a\u4e00\u7ae0\u6211\u4eec\u5df2\u7ecf\u8bbe\u7f6e\u597dECLIPSE\u7684\u5f00\u53d1\u73af\u5883\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u6240\u8bb2\u7684\u90fd\u662f\u57fa\u4e8eECLIPSE\u4e0a\u8fdb\u884c\u5f00\u53d1\uff0c\u5f53\u7136\u4ee3\u7801\u548c\u5728MDK\u91cc\u90fd\u662f\u4e00\u6837\u7684\uff0c\u4f60\u4e5f\u53ef\u4ee5\u628a \u8fd9\u91cc\u63d0\u5230\u7684\u4ee3\u7801\u653e\u5230MDK\u91cc\u8fdb\u884c\u7f16\u8bd1\u8fd0\u884c\u3002<\/p>\n<p>\u5728STM32\u91cc\uff0c\u6bcf\u4e00\u4e2aIO\u8bbe\u5907\u5728\u4f7f\u7528\u524d\u90fd\u5fc5\u9700\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u4e14\u6253\u5f00IO\u5bf9\u5e94\u7684\u65f6\u949f\u540e\u624d\u80fd\u4f7f\u7528\uff0c\u8fd9\u662f\u6211\u5b6651\u548cSTM32\u6700\u5927\u7684\u533a\u522b\u4e4b\u4e00\uff0c51\u5f88\u7b80 \u5355\uff0c\u65e0\u9700\u521d\u59cb\u5316\u5c31\u53ef\u4ee5\u76f4\u63a5\u64cd\u4f5c\u6bcf\u4e00\u4e2aIO\u53e3\u3002\u597d\u4e86\uff0c\u5148\u6765\u4f53\u9a8c\u4e00\u4e0bECLIPSE\u5f00\u53d1\u5e26\u6765\u7684\u5feb\u611f\u5427\uff0c\u6253\u5f00ECLIPSE\uff0c\u9009\u62e9FirstProject\u9879 \u76ee\uff0c\u6253\u5f00main.c\uff0c\u5148\u5728\u9876\u90e8\u8f93\u5165#include < \uff0c\u7136\u540e\u6309\u4e0bALT+\/ \uff0c\u53ef\u4ee5\u9009\u62e9\u6211\u4eec\u9700\u8981\u7684\u7c7b\u5e93\u3002<\/p>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011045ToE.jpg\" alt=\"\" \/>\n<p>\u5728main\u51fd\u6570\u91cc\u8bd5\u4e00\u4e0b\u8f93\u5165GPIO\uff0c\u7136\u540e\u6309\u5feb\u6377\u952eALT+\/  \uff0c\u770b\u5230\u4e86\u5417\uff0cFWLIB\u7684\u51fd\u6570\u3001\u5e38\u91cf\u7b49\u90fd\u4e00\u4e00\u5217\u51fa\u6765\u4e86\uff0c\u4ee5\u540e\u4e0d\u4f1a\u56e0\u4e3a\u8f93\u9519\u5b57\u6bcd\u6216\u8005\u5927\u5c0f\u5199\u95ee\u9898\u5bfc\u81f4\u51fa\u9519\u4e86\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011055mMt.jpg\" alt=\"\" width=\"400\" height=\"295\" \/>\n<p>ECLIPSE\u7684\u4f18\u70b9\u5c31\u8bb2\u5230\u8fd9\u4e86\uff0c\u8fd8\u6709\u5f88\u591a\u529f\u80fd\u5927\u5bb6\u6162\u6162\u53d1\u6316\u5427\u3002<\/p>\n<p>\u4ee3\u7801\u6bd4\u8f83\u7b80\u5355\uff0c\u4e14\u90fd\u6709\u6ce8\u91ca\u4e86\uff0c\u6211\u5c31\u76f4\u63a5\u8d34\u51fa\u6765\u597d\u4e86\u3002<\/p>\n<p>\/**<\/p>\n<hr \/>\n<ul>\n<li>@file\u00a0\u00a0\u00a0 Project\/Template\/main.c<\/li>\n<li>@author\u00a0 MCD Application Team<\/li>\n<li>@version V3.1.2<\/li>\n<li>@date\u00a0\u00a0\u00a0 09\/28\/2009<\/li>\n<li>@brief\u00a0\u00a0 Main program body\n<hr \/><\/li>\n<li>@copy<\/li>\n<li>\n<\/li>\n<li>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING  CUSTOMERS<\/li>\n<li>WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM  TO SAVE<\/li>\n<li>TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR  ANY<\/li>\n<li>DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS  ARISING<\/li>\n<li>FROM THE CONTENT OF SUCH FIRMWARE AND\/OR THE USE MADE BY CUSTOMERS  OF THE<\/li>\n<li>CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR  PRODUCTS.<\/li>\n<li>\n<\/li>\n<li><h2><center>&copy; COPYRIGHT 2009  STMicroelectronics<\/center><\/h2>\n*\/<\/li>\n<\/ul>\n<p>\/<em> Includes  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em>\/\n#include &#8220;stm32f10x.h&#8221;\n#include <stm32f10x_gpio.h>\n#include <stm32f10x_rcc.h>\n\/** @addtogroup Template_Project<\/p>\n<ul>\n<li>@{\n*\/<\/li>\n<\/ul>\n<p>\/<em> Private functions  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em>\/<\/p>\n<p>\/**<\/p>\n<ul>\n<li>@brief\u00a0 Main program.<\/li>\n<li>@param\u00a0 None<\/li>\n<li>@retval None\n<em>\/\nGPIO_InitTypeDef gpio_int;\nint main(void)\n{\n\/<\/em> Setup STM32 system (clock, PLL and Flash configuration) *\/\nSystemInit();\n\/\/\u6253\u5f00\u901a\u7528IO\u53e3A\u7684\u65f6\u949f\nRCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);<\/li>\n<\/ul>\n<p>\/\/\u8bbe\u7f6eOA\u53e3A\u7684\u521d\u59cb\u5316\u4fe1\u606f\uff0c\u6a21\u5f0f\u4e3aGPIO_Mode_Out_PP\uff0c\u6307\u5b9aPIN\u4e3a0\uff0c\u901f\u5ea6\u4e3a50MHz\ngpio_int.GPIO_Mode=GPIO_Mode_Out_PP;\ngpio_int.GPIO_Pin=GPIO_Pin_0;\ngpio_int.GPIO_Speed=GPIO_Speed_50MHz;\nGPIO_Init(GPIOA,&#038;gpio_int);<\/p>\n<p>\/\/\u6e05\u9664PIN0\u7684\u503c\nGPIO_ResetBits(GPIOA,GPIO_Pin_0);<\/p>\n<p>\/\/\u8bbe\u7f6ePIN0\u7684\u503c\u4e3a\u9ad8\u4f4d\uff0c\u5373\u70b9\u4eaeIOA\u7684PIN0\u811a\nGPIO_SetBits(GPIOA,GPIO_Pin_0);\n\/<em> Add your application code here\n<\/em>\/<\/p>\n<p>\/<em> Infinite loop <\/em>\/\nwhile (1)\n{\n}\n}<\/p>\n<p>\/<strong><strong>*<strong><strong><strong>**<\/strong><\/strong><\/strong> (C) COPYRIGHT 2009 STMicroelectronics *<\/strong><\/strong>END OF  FILE****\/<\/p>\n<p>\u5728\u8fd9\u91cc\u6559\u5927\u5bb6\u4e00\u4e2a\u5de7\u95e8\uff0c\u5728FWLIB3.12\u91cc\u7684\u51fd\u6570\u4e2d\uff0c\u5927\u90e8\u4efd\u51fd\u6570\u7684\u53c2\u6570\u90fd\u548c\u53c2\u6570\u547d\u540d\u76f8\u5173\uff0c\u5373\u53c2\u6570\u540d\u662f\u5b9e\u9645\u5e38\u91cf\u7684\u4e00\u90e8\u5206\uff0c\u5982\uff1a\n\u51fd\u6570\u539f\u578b\uff1avoid GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\n\u5b9e\u9645\u4f7f\u7528\uff1aGPIO_ResetBits(GPIOA,GPIO_Pin_0);<\/p>\n<p>\u53d1\u73b0\u8fd9\u4e2a\u5bf9\u6211\u4eec\u5f00\u53d1\u6709\u4ec0\u4e48\u5e2e\u52a9\u5462\uff1f\u5475\u5475\uff0c\u8fd9\u4e2a\u7528\u5904\u5c31\u5927\u4e86\uff0c\u4e0d\u8fc7\u6211\u4f30\u8ba1\u5728ECLIPSE\u4e2d\u624d\u4f1a\u663e\u5f97\u66f4\u52a0\u6709\u7528\uff0c\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5728ECLIPSE\u4e2d\u8f93\u5165\uff1a<\/p>\n<p>GPIO_ResetBits(\u00a0 \u8fd9\u4e2a\u4f4d\u7f6e\u6309\u4e0bALT+\/ \u4f1a\u6709\u76f8\u5e94\u7684\u63d0\u793a\u4fe1\u606f\uff0c\u8bf7\u770b\u4e0b\u56fe<\/p>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011057tmJ.jpg\" alt=\"\" \/>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011059Hpn.jpg\" alt=\"\" \/>\n<p>\u770b\u5230\u4e86\u5427\uff0c\u6211\u4eec\u5728\u5b9e\u9645\u4f7f\u7528\u51fd\u6570\u65f6\uff0c\u5bf9\u4e8e\u53c2\u6570\uff0c\u76f4\u63a5\u8f93\u5165ECLIPSE\u63d0\u793a\u91cc\u7684\u53c2\u6570\u540d\u79f0\u52a0\u201c_&#8221;\u7ebf,\u7136\u540e\u6309ALT+\/\uff0c\u76f4\u63a5\u9009\u62e9\u76f8\u5e94\u7684\u5e38\u91cf\u5c31\u53ef\u4ee5\u4e86\uff0c \u4ee5\u540e\u6211\u4eec\u5c31\u4e0d\u7528\u7ffb\u6765\u7ffb\u53bb\u7684\u627e\u8fd9\u4e9b\u5e38\u91cf\u7684\u540d\u79f0\u662f\u4ec0\u4e48\u4e86\u3002<\/p>\n<p>\u53e6\u5916\u518d\u8bb2\u4e00\u4e2aKEILMAKE\u7684\u5b9e\u7528\u914d\u7f6e\uff0c\u4e0a\u4e00\u7ae0\u6211\u4eec\u8bf4\u4e86\u8bbe\u7f6e\u7f16\u8bd1\u65f6\u5019\u7684\u53c2\u6570\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u8c03\u8bd5\uff0c\u53ea\u8981\u5728ECLIPSE\u7f16\u8bd1\u53c2\u6570\u91cc\u7684\u6700\u540e\u4f4d\u7f6e\u52a0\u4e0a\u4e00 \u4e2a\u53c2\u6570 debug \u5c31\u53ef\u4ee5\u8c03\u7528MDK\u8fdb\u884c\u8c03\u8bd5\uff0c\u90a3\u4e48\u5982\u679c\u8981\u4e0a\u4f20\u5230\u5f00\u53d1\u677f\u4e0a\u5462\uff1f\u628adebug\u6539\u4e3aupload\u5373\u53ef\uff0c\u5206\u522b\u628a\u8fd9\u4e09\u79cd\u521b\u5efa\u6210\u914d\u7f6e\u5373\u53ef\uff0c\u5982\u56fe\uff1a<\/p>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011101AOP.jpg\" alt=\"\" \/>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011106N62.jpg\" alt=\"\" \/>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011113FJ4.jpg\" alt=\"\" \/>\n<p>\u770b\u5230\u4e86\u5417\uff0c\u5df2\u7ecf\u6210\u529f\u4e0a\u4f20\u5230\u5f00\u53d1\u677f\u4e0a\u4e86\uff0c\u8fd9\u65f6\u677f\u4e0a\u7684GPIOA\u7684PIN0\u811a\u7684\u4e8c\u6781\u7ba1\u5df2\u7ecf\u70b9\u4eae\u4e86\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/011115c3D.jpg\" alt=\"\" width=\"454\" height=\"339\" \/>","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u65e0\u6cd5\u67e5\u770b\u56fe\u7247\uff0c\u8bf7\u76f4\u63a5\u8bbf\u95ee\u6211\u7684\u535a\u5ba2\u5730\u5740\uff1a<a href=\"http:\/\/showvi.com\/Blog\/CategoryAirticleList\/90\">http:\/\/showvi.com\/Blog\/CategoryAirticleList\/90<\/a> \u4e0a\u4e00\u7ae0\u6211\u4eec\u5df2\u7ecf\u8bbe\u7f6e\u597dECLIPSE\u7684\u5f00\u53d1\u73af\u5883\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u6240\u8bb2\u7684\u90fd&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[42,41,46],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-scm","tag-fwlib","tag-stm32","tag-46"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":2,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":72,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/68\/revisions\/72"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}