你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

ST公司出品【图形化配置工具】 精华  

[复制链接]
静以@致远 发布时间:2014-1-3 16:07
官方出品,功能还不够完善(个人观点),但能够生成基本的管脚配置
共5个分卷,别漏掉啦
【第一卷】 MicroXplorer-V3.2.part1.rar (4 MB, 下载次数: 5691)
收藏 10 评论357 发布时间:2014-1-3 16:07

举报

357个回答
静以@致远 回答时间:2014-1-3 16:09:07

RE:ST公司出品【图形化配置工具】

生成代码鉴赏:论坛啥时候能支持代码片段呢?????
 
/**
  ******************************************************************************
  * File Name          : mx_gpio.c
  * Date               : 03/01/2014 15:37:11
  * Description        : This file provides code for the configuration
  *                      of all used GPIO pins.
  ******************************************************************************
  *
  * COPYRIGHT 2014 STMicroelectronics
  *
  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http:www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing, software 
  * distributed under the License is distributed on an "AS IS" BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
  */
 
/* Includes ------------------------------------------------------------------*/
#include "mx_gpio.h"
/* USER CODE BEGIN 0 */
 
/* USER CODE END 0 */
 
/*----------------------------------------------------------------------------*/
/* Configure GPIO                                                             */
/*----------------------------------------------------------------------------*/
/* USER CODE BEGIN 1 */
 
/* USER CODE END 1 */
 
void mx_pinout_config(void) {
        /* Private typedef ---------------------------------------------------------*/
        GPIO_InitTypeDef GPIO_InitStruct;
 
 
        /** ADC GPIO Configuration       
                 PA1         ------> ADC_IN1
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
 
        /*Configure GPIO pin */
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_1;
        GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AN;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
 
 
        /** I2C1 GPIO Configuration       
                 PB6         ------> I2C1_SCL
                 PB7         ------> I2C1_SDA
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB, ENABLE);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_6;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource6, GPIO_AF_I2C1);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource7, GPIO_AF_I2C1);
 
 
        /** SPI2 GPIO Configuration       
                 PB12         ------> SPI2_NSS
                 PB13         ------> SPI2_SCK
                 PB14         ------> SPI2_MISO
                 PB15         ------> SPI2_MOSI
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB, ENABLE);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_14;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_15;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOB, &GPIO_InitStruct);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_SPI2);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_SPI2);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource14, GPIO_AF_SPI2);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOB, GPIO_PinSource15, GPIO_AF_SPI2);
 
 
        /** USART1 GPIO Configuration       
                 PA9         ------> USART1_TX
                 PA10         ------> USART1_RX
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_9;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_10;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_USART1);
 
        /*Configure GPIO pin alternate function */
        GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_USART1);
 
 
        /** USB GPIO Configuration       
                 PA11         ------> USB_DM
                 PA12         ------> USB_DP
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_11;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
 
 
        //!!! GPIO_Init is commented because some parameters are missing
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
        GPIO_InitStruct.GPIO_Mode = ;
        GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_InitStruct.GPIO_Speed = GPIO_Speed_400KHz;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
 
 
        /** Configure pins as GPIO
                 PA8         ------> GPIO_Input
        */
 
 
        /*Enable or disable the AHB peripheral clock */
        RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
 
        /*Configure GPIO pin */
        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_8;
        GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_Init(GPIOA, &GPIO_InitStruct);
}
 
/* USER CODE BEGIN 2 */
 
/* USER CODE END 2 */
 
静以@致远 回答时间:2014-1-3 16:10:53

回复:ST公司出品【图形化配置工具】

 截图回复一张
QQ截图20140103160610.png
沐紫 回答时间:2014-1-3 17:05:42

RE:ST公司出品【图形化配置工具】

多谢楼主分享代码!
那片清茶 回答时间:2014-1-3 17:37:34

RE:ST公司出品【图形化配置工具】

看看。。。。。。。。。。。。。
xyy211502 回答时间:2014-1-3 17:47:25

RE:ST公司出品【图形化配置工具】

顶顶顶顶顶顶顶顶
zykzyk-93033 回答时间:2014-1-4 10:59:12

RE:ST公司出品【图形化配置工具】

继续改进好啊
ruiziyq 回答时间:2014-1-4 15:48:03

RE:ST公司出品【图形化配置工具】

xiexie!!!!
tubegong 回答时间:2014-1-4 20:34:05

RE:ST公司出品【图形化配置工具】

没想到ST也有这种工具
yon-gjun 回答时间:2014-1-4 21:03:35

RE:ST公司出品【图形化配置工具】

看看,到底怎样

所属标签

STM32团队

意法半导体微控制器和微处理器拥有广泛的产品线,包含低成本的8位单片机和基于ARM® Cortex®-M0、M0+、M3、M4、M33、M7及A7内核并具备丰富外设选择的32位微控制器及微处理器


最新内容

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版