资源简介
压缩包中有一个已经在KEIL5开发环境下调试通过的STM32工程文件,其中对工程各项设置进行了正确配置,可以直接下载到板子上。main文件中对常用外设USART、SPI、I2C、NVIC、EXIT、TIM(定时、输入捕获、输出比较)、SYSTICK编写了相应的配置函数,需要时可直接调用。代码格式严谨,注释丰富,可移植性强,是本人学习STM32长期整理的成果。

代码片段和文件信息
/*
* Copyright (c) 2013-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.1.0
*
* Project: CMSIS-RTOS RTX
* title: RTX Configuration
*
* -----------------------------------------------------------------------------
*/
#include “cmsis_compiler.h“
#include “rtx_os.h“
// OS Idle Thread
__WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
(void)argument;
for (;;) {}
}
// OS Error Callback function
__WEAK uint32_t osRtxErrorNotify (uint32_t code void *object_id) {
(void)object_id;
switch (code) {
case osRtxErrorStackUnderflow:
// Stack overflow detected for thread (thread_id=object_id)
break;
case osRtxErrorISRQueueOverflow:
// ISR Queue overflow detected when inserting object (object_id)
break;
case osRtxErrorTimerQueueOverflow:
// User Timer Callback Queue overflow detected for timer (timer_id=object_id)
break;
case osRtxErrorClibSpace:
// Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
break;
case osRtxErrorClibMutex:
// Standard C/C++ library mutex initialization failed
break;
default:
// Reserved
break;
}
for (;;) {}
//return 0U;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-31 21:16 18 TIM定时 输入捕获 输出比较\
目录 0 2019-01-23 13:51 18 TIM定时 输入捕获 输出比较\DebugConfig\
文件 2403 2017-11-23 15:41 18 TIM定时 输入捕获 输出比较\DebugConfig\SRAM_STM32F103VC_1.0.0.dbgconf
文件 2403 2017-11-23 15:41 18 TIM定时 输入捕获 输出比较\DebugConfig\Target1_STM32F103VC_1.0.0.dbgconf
文件 2403 2017-11-23 15:41 18 TIM定时 输入捕获 输出比较\DebugConfig\Target_1_STM32F103VC_1.0.0.dbgconf
文件 339 2019-01-31 21:15 18 TIM定时 输入捕获 输出比较\EventRecorderStub.scvd
目录 0 2019-01-23 13:51 18 TIM定时 输入捕获 输出比较\Listings\
文件 164391 2019-01-31 21:16 18 TIM定时 输入捕获 输出比较\Listings\3.map
文件 1616166 2019-01-10 15:17 18 TIM定时 输入捕获 输出比较\Listings\DMA_STM32F10x.lst
文件 1589877 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\GPIO_STM32F10x.lst
文件 1740283 2019-01-10 15:17 18 TIM定时 输入捕获 输出比较\Listings\USART_STM32F10x.lst
文件 109389 2019-01-10 15:17 18 TIM定时 输入捕获 输出比较\Listings\dma_stm32f10x.i
文件 46926 2019-01-10 15:15 18 TIM定时 输入捕获 输出比较\Listings\dma_stm32f10x.txt
文件 102421 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\gpio_stm32f10x.i
文件 22603 2019-01-10 15:35 18 TIM定时 输入捕获 输出比较\Listings\gpio_stm32f10x.txt
文件 101429 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\main.i
文件 1624348 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\main.lst
文件 8042 2019-01-10 15:35 18 TIM定时 输入捕获 输出比较\Listings\main.txt
文件 91354 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\misc.i
文件 1580241 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\misc.lst
文件 10121 2019-01-10 15:35 18 TIM定时 输入捕获 输出比较\Listings\misc.txt
文件 53843 2019-01-17 17:04 18 TIM定时 输入捕获 输出比较\Listings\startup_stm32f10x_hd.lst
文件 98664 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_gpio.i
文件 1616618 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_gpio.lst
文件 33421 2019-01-10 15:35 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_gpio.txt
文件 104972 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_rcc.i
文件 1663063 2019-01-10 15:39 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_rcc.lst
文件 47820 2019-01-10 15:35 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_rcc.txt
文件 105732 2019-01-10 15:17 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_usart.i
文件 1648276 2019-01-10 15:17 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_usart.lst
文件 50371 2019-01-10 15:15 18 TIM定时 输入捕获 输出比较\Listings\stm32f10x_usart.txt
............此处省略160个文件信息
- 上一篇:海马玩模拟器安装程序
- 下一篇:emoji png 大图
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- stm32f030 IAP Demo(原创)
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- SIM908 SDIO FSMC STM32 FIFO
- STM32F103 CC2500完整驱动(模拟SPI)
- AD7606采集程序
- stm32 用SPI 方式读写 SDHC
- stm32通过DMA方式采集ADC数据
- 意法半导体STM全系列微控制器STM32ST
- 基于STM32芯片的SX1278 驱动 LORA.rar
评论
共有 条评论