Keil5.23之STM32F103RC创建工程
来源:互联网 发布:东莞seo公司 编辑:程序博客网 时间:2024/06/03 16:56
本篇博文最后修改时间:2017年08月23日 13:30。
一、简介
本文以Keil5.23创建工程为例,介绍Keil5.23如何创建STM32F103RC工程。
二、实验平台
电脑平台:Windows7 64位旗舰
编译软件:Keil5.23
硬件平台:STM32F103RC
三、版权声明
博主:_懵懂
声明:此博客仅供参考不做任何商业用途,最终解释权归原博主所有。
原文地址:http://blog.csdn.NET/qq_18842031
QQ:951795235
E-mail :951795235@qq.com
懵懂之MCU交流群:136384801
四、实验前提
1、在进行本文步骤前,请先安装Keil5.23版本;准备好STM32F103RC硬件平台。
五、基础知识
暂无
六、源码地址
暂无
七、关联文章
暂无
八、实验内容
1.Keil5新建STM32F103RC项目
第二十六步输入 USE_STDPERIPH_DERIVER
2.项目Dome引脚电频翻转
#include"stm32f10x.h"GPIO_InitTypeDef GPIO_InitStructure;ErrorStatus HSEStartUpStatus;void RCC_Configuration(void);void NVIC_Configuration(void);void Delay(vu32 nCount);int main(void){#ifdef DEBUG debug();#endif RCC_Configuration(); NVIC_Configuration(); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE);// GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_Init(GPIOB, &GPIO_InitStructure); while (1) { GPIO_Write(GPIOA, 0x00ff); Delay(0x8FFFFF); //GPIO_Write(GPIOA, 0xff00);Delay(0x8FFFFF); // }}/******************************************************************************** *******************************************************************************/void RCC_Configuration(void){ RCC_DeInit(); //?RRC???????? RCC_HSEConfig(RCC_HSE_ON); HSEStartUpStatus = RCC_WaitForHSEStartUp(); if(HSEStartUpStatus == SUCCESS) { FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); FLASH_SetLatency(FLASH_Latency_2); RCC_HCLKConfig(RCC_SYSCLK_Div1); RCC_PCLK2Config(RCC_HCLK_Div1); RCC_PCLK1Config(RCC_HCLK_Div2); RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); RCC_PLLCmd(ENABLE); while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) { } RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); while(RCC_GetSYSCLKSource() != 0x08) { } }}/******************************************************************************** *******************************************************************************/void NVIC_Configuration(void){#ifdef VECT_TAB_RAM /* Set the Vector Table base location at 0x20000000 */ NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); #else /* VECT_TAB_FLASH */ /* Set the Vector Table base location at 0x08000000 */ NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); #endif}/******************************************************************************** ????*******************************************************************************/void Delay(vu32 nCount){ for(; nCount != 0; nCount--);}#ifdef DEBUG/******************************************************************************** Function Name : assert_failed* Description : Reports the name of the source file and the source line number* where the assert_param error has occurred.* Input : - file: pointer to the source file name* - line: assert_param error line source number* Output : None* Return : None*******************************************************************************/void assert_failed(u8* file, u32 line){ /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */ while (1) { }}#endif/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
阅读全文
1 0
- Keil5.23之STM32F103RC创建工程
- Keil5创建STM32工程
- keil5创建工程
- keil5的安装+工程的创建
- Keil5创建基于RTX的STM32工程
- 使用keil5自带库创建STM32工程
- stm32f103rc
- 修改keil5工程名称
- 用keil创建第一个STM32F103RC项目
- KEIL5,STM32工程建立注意事项
- STM32CubeMX 1 创建一个新工程 利用时钟点亮LED KEIL5 Jlink配置
- keil5
- STM32 Keil5建立工程模板步骤
- stm32在keil5中新建工程[0]
- keil5中新建一个STM32工程
- Keil5配置GCC编译器编译STM32工程
- TMS320F28027之创建工程
- keil5之32环境配置
- 数组和链表、栈和队列
- git.oschina.net提交文档方法
- 《机器学习实战》学习笔记3
- 【欧拉函数】
- java基础,,,,,java集合框架的了解
- Keil5.23之STM32F103RC创建工程
- 2017多校-9
- 欢迎使用CSDN-markdown编辑器
- CountDownLatch的简述
- BZOJ 1026 windy数 数位DP
- Struts2初学者---解决Action加入Class报错
- Android studio 更改引入jar的优先级方法
- struct2中freemarker的用法
- iOS使用UIScrollView实现无限循环轮播图