首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

使用CMSIS-Pack快速创建STM32F411x裸机工程

硬件开发 61.2KB 24 需要积分: 1
立即下载

资源介绍:

使用CMSIS-Pack快速创建STM32F411x裸机工程 1、新建Keil工程 2、选择工程文件夹命名工程文件 3、选择芯片系列 4、 选择要打开的外设(CMSIS-Driver)及添加芯片启动文件(Device) 5、 添加标准main文件及系统滴答定时器中断IRQ文件 6、 修改编译方式 7、 配置添加的外设GPIO 8、Bulid编译后无报错 9、 修改外部晶振与系统频率(根据外部晶振及需要的系统频率修改)
/** ****************************************************************************** * @file system_stm32f4xx.c * @author MCD Application Team * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. * * This file provides two functions and one global variable to be called from * user application: * - SystemInit(): This function is called at startup just after reset and * before branch to main program. This call is made inside * the "startup_stm32f4xx.s" file. * * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used * by the user application to setup the SysTick * timer or configure other parameters. * * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must * be called whenever the core clock is changed * during program execution. * * ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /** @addtogroup CMSIS * @{ */ /** @addtogroup stm32f4xx_system * @{ */ /** @addtogroup STM32F4xx_System_Private_Includes * @{ */ #include "stm32f4xx.h" #if !defined (HSE_VALUE) #define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ #endif /* HSE_VALUE */ #if !defined (HSI_VALUE) #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ #endif /* HSI_VALUE */ /** * @} */ /** @addtogroup STM32F4xx_System_Private_TypesDefinitions * @{ */ /** * @} */ /** @addtogroup STM32F4xx_System_Private_Defines * @{ */ /************************* Miscellaneous Configuration ************************/ /*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */ #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\ || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) /* #define DATA_IN_ExtSRAM */ #endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\ STM32F412Zx || STM32F412Vx */ #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\ || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) /* #define DATA_IN_ExtSDRAM */ #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\ STM32F479xx */ /* Note: Following vector table addresses must be defined in line with linker configuration. */ /*!< Uncomment the following line if you need to relocate the vector table anywhere in Flash or Sram, else the vector table is kept at the automatic remap of boot address selected */ /* #define USER_VECT_TAB_ADDRESS */ #if defined(USER_VECT_TAB_ADDRESS) /*!< Uncomment the following line if you need to relocate your vector Table in Sram else user remap will be done in Flash. */ /* #define VECT_TAB_SRAM */ #if defined(VECT_TAB_SRAM) #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field. This value must be a multiple of 0x200. */ #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. This value must be a multiple of 0x200. */ #else #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. This value must be a multiple of 0x200. */ #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. This value must be a multiple of 0x200. */ #endif /* VECT_TAB_SRAM */ #endif /* USER_VECT_TAB_ADDRESS */ /******************************************************************************/ /** * @} */ /** @addtogroup STM32F4xx_System_Private_Macros * @{ */ /** * @} */ /** @addtogroup STM32F4xx_System_Private_Variables * @{ */ /* This variable is updated in three ways: 1) by calling CMSIS function SystemCoreClockUpdate() 2) by calling HAL API function HAL_RCC_GetHCLKFreq() 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency Note: If you use this function to configure the system clock; then there is no need to call the 2 first functions listed above, since SystemCoreClock variable is updated automatically. */ uint32_t SystemCoreClock = 16000000; const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; /** * @} */ /** @addtogroup STM32F4xx_System_Private_FunctionPrototypes * @{ */ #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) static void SystemInit_ExtMemCtl(void); #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ /** * @} */ /** @addtogroup STM32F4xx_System_Private_Functions * @{ */ /** * @brief Setup the microcontroller system * Initialize the FPU setting, vector table location and External memory * configuration. * @param None * @retval None */ void SystemInit(void) { /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ #endif #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM) SystemInit_ExtMemCtl(); #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ /* Configure the Vector Table location -------------------------------------*/ #if defined(USER_VECT_TAB_ADDRESS) SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #endif /* USER_VECT_TAB_ADDRESS */ } /** * @brief Update SystemCoreClock variable according to Clock Register Values. * The SystemCoreClock variable contains the core clock (HCLK), it can * be used by the user application to setup the SysTick timer or configure * other parameters. * * @note Each time the core clock (HCLK) changes, this function must be called * to update SystemCoreClock variable value. Otherwise, any configuration * based on this variable will be incorrect. * * @note - The system frequency computed by this function is not the real * frequency in the chip. It is calculated based on the predefined * constant and the selected clock source: * * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) * * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) * * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) * or HSI_VALUE(*) multiplied/divided by the PLL factors. * * (*) HSI_VALUE is a constant de

资源文件列表:

STM32F411x-CMSIS-Pack.zip 大约有26个文件
  1. STM32F411x-CMSIS-Pack/AD_KEIL_KILL.bat 1.08KB
  2. STM32F411x-CMSIS-Pack/DebugConfig/
  3. STM32F411x-CMSIS-Pack/DebugConfig/Target_1_STM32F411CEUx.dbgconf 2.19KB
  4. STM32F411x-CMSIS-Pack/Listings/
  5. STM32F411x-CMSIS-Pack/main.c 6.94KB
  6. STM32F411x-CMSIS-Pack/main.h 1.28KB
  7. STM32F411x-CMSIS-Pack/Objects/
  8. STM32F411x-CMSIS-Pack/Objects/STM32F411X.sct 494B
  9. STM32F411x-CMSIS-Pack/RTE/
  10. STM32F411x-CMSIS-Pack/RTE/_Target_1/
  11. STM32F411x-CMSIS-Pack/RTE/_Target_1/Pre_Include_Global.h 316B
  12. STM32F411x-CMSIS-Pack/RTE/_Target_1/RTE_Components.h 1.69KB
  13. STM32F411x-CMSIS-Pack/RTE/Device/
  14. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/
  15. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/RTE_Device.h 95.91KB
  16. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/RTE_Device.h.base@2.4.5 95.91KB
  17. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/startup_stm32f411xe.s 24.53KB
  18. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/startup_stm32f411xe.s.base@2.6.8 24.53KB
  19. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/stm32f4xx_hal_conf.h 21.54KB
  20. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/stm32f4xx_hal_conf.h.base@1.8.1 21.54KB
  21. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/system_stm32f4xx.c 26.94KB
  22. STM32F411x-CMSIS-Pack/RTE/Device/STM32F411CEUx/system_stm32f4xx.c.base@2.6.8 26.94KB
  23. STM32F411x-CMSIS-Pack/STM32F411X.uvoptx 6.33KB
  24. STM32F411x-CMSIS-Pack/STM32F411X.uvprojx 20.98KB
  25. STM32F411x-CMSIS-Pack/stm32f4xx_it.c 4.16KB
  26. STM32F411x-CMSIS-Pack/stm32f4xx_it.h 1.56KB
0评论
提交 加载更多评论
其他资源 易车实战学习Langchain开发配套文档附件
易车实战学习Langchain开发配套文档附件。 实战课程地址:https://blog.csdn.net/JingYu_365/article/details/140590223?spm=1001.2014.3001.5502 以《易车》实际应用场景为背景的系列学习文章,旨在帮助你们更直观、更深入地理解和掌握Langchain技术。
易车实战学习Langchain开发配套文档附件 易车实战学习Langchain开发配套文档附件
EDC 开源代码,connector main
EDC 开源代码,connector main
microsoft wpd demo
microsoft wpd demo
java实现简易的控制台的图书管理系统
适用于java小白,纯java代码实现的控制台图书管理系统
实习管理系统 JAVA+Vue.js+SpringBoot+MySQL
基于Vue.js和SpringBoot的实习管理系统,分为用户前台和管理后台,可以给管理员、老师、学生角色使用,包括论坛管理模块、公告管理模块、实习管理模块、实习成绩模块、实习周报模块和系统基础模块,项目编号T210。 项目录屏:https://www.bilibili.com/video/BV1dS411w7su 启动教程:https://www.bilibili.com/video/BV1pW4y1P7GR 项目讲解视频:https://space.bilibili.com/417412814/channel/collectiondetail?sid=2242844
实习管理系统 JAVA+Vue.js+SpringBoot+MySQL 实习管理系统 JAVA+Vue.js+SpringBoot+MySQL 实习管理系统 JAVA+Vue.js+SpringBoot+MySQL
农商对接系统 JAVA+Vue.js+SpringBoot+MySQL
基于Vue.js和SpringBoot的农商对接系统,分为用户前台和管理后台,可以给管理员、卖家、普通用户角色使用,包括商品类型模块、商品信息模块、订单信息模块、订单追踪模块、售后处理模块和系统基础模块,项目编号T209。 项目录屏:https://www.bilibili.com/video/BV18r421F7ds 启动教程:https://www.bilibili.com/video/BV1pW4y1P7GR 项目讲解视频:https://space.bilibili.com/417412814/channel/collectiondetail?sid=2242844
农商对接系统 JAVA+Vue.js+SpringBoot+MySQL 农商对接系统 JAVA+Vue.js+SpringBoot+MySQL 农商对接系统 JAVA+Vue.js+SpringBoot+MySQL
基于RNN、GRU、LSTM和Attention的“时间序列预测”代码
包含使用RNN、GRU、LSTM或Attention方法进行基本时间序列预测的实现。在时间序列预测任务中,RNN、GRU、LSTM和Attention是常用的深度学习模型。通过使用这些模型,可以捕获时间序列数据中的长期依赖关系和模式,从而有效地预测未来时间点的数值或趋势。 在实现方面,可使用深度学习框架如TensorFlow或PyTorch来构建模型。这些框架提供了各种RNN、GRU、LSTM和Attention层的实现,使模型构建和训练过程更加简单。
大学生消费记账系统 JAVA+Vue.js+SpringBoot+MySQL
基于Vue.js和SpringBoot的大学生消费记账系统,分为用户前台和管理后台,可以给管理员、普通用户角色使用,包括收入管理模块、支出管理模块、预算管理模块、用户管理模块和系统基础模块,项目编号T208。 项目录屏:https://www.bilibili.com/video/BV16m421379L 启动教程:https://www.bilibili.com/video/BV1pW4y1P7GR 项目讲解视频:https://space.bilibili.com/417412814/channel/collectiondetail?sid=2242844
大学生消费记账系统 JAVA+Vue.js+SpringBoot+MySQL 大学生消费记账系统 JAVA+Vue.js+SpringBoot+MySQL 大学生消费记账系统 JAVA+Vue.js+SpringBoot+MySQL