资源简介

STM32F103采用DMA实现USART3接收和发送,减轻MCU的负担同时提高数据收发的速率。
注意!这是标准库!别下错了!!!

资源截图

代码片段和文件信息

#include “systick.h“
#include “public.h“
/*******************************************************************************
* 函 数 名         : delay_us
* 函数功能    : 延时函数,延时us
* 输    入         : i
* 输    出         : 无
*******************************************************************************/
void delay_us(u32 i)
{
u32 temp;
SysTick->LOAD=9*i;  //设置重装数值 72MHZ时
SysTick->CTRL=0X01;  //使能,减到零是无动作,采用外部时钟源
SysTick->VAL=0;      //清零计数器
do
{
temp=SysTick->CTRL;    //读取当前倒计数值
}
while((temp&0x01)&&(!(temp&(1<<16))));  //等待时间到达
SysTick->CTRL=0; //关闭计数器
SysTick->VAL=0; //清空计数器
}

/*******************************************************************************
* 函 数 名         : delay_ms
* 函数功能    : 延时函数,延时ms
* 输    入         : i
* 输    出         : 无
*******************************************************************************/
void delay_ms(u32 i)
{
u32 temp;
SysTick->LOAD=9000*i;   //设置重装数值 72MHZ时
SysTick->CTRL=0X01; //使能,减到零是无动作,采用外部时钟源
SysTick->VAL=0; //清零计数器
do
{
temp=SysTick->CTRL;    //读取当前倒计数值
}
while((temp&0x01)&&(!(temp&(1<<16)))); //等待时间到达
SysTick->CTRL=0; //关闭计数器
SysTick->VAL=0; //清空计数器
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-26 15:31  usart3_dma\
     文件       59715  2014-12-09 16:24  usart3_dma\1.uvopt
     目录           0  2018-11-22 16:04  usart3_dma\APP\
     目录           0  2018-11-22 16:04  usart3_dma\APP\SysTick\
     文件        1333  2017-12-11 14:52  usart3_dma\APP\SysTick\systick.c
     文件         121  2014-12-09 16:09  usart3_dma\APP\SysTick\systick.h
     目录           0  2018-11-26 15:30  usart3_dma\APP\usartDMA\
     文件        5752  2018-11-26 15:30  usart3_dma\APP\usartDMA\usart_dma.c
     文件         282  2018-11-22 15:44  usart3_dma\APP\usartDMA\usart_dma.h
     文件         497  2015-06-05 10:54  usart3_dma\Jlink Regs CM3.txt
     文件         285  2014-12-11 16:01  usart3_dma\JlinkSettings.ini
     文件         399  2011-04-23 10:24  usart3_dma\keilkilll.bat
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\CoreSupport\
     文件       17273  2010-06-07 10:25  usart3_dma\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
     文件       85714  2011-02-09 14:59  usart3_dma\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
     文件       26297  2011-03-14 12:31  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
     目录           0  2018-11-22 16:04  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
     文件       15766  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
     文件       15503  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
     文件       15692  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
     文件       12376  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
     文件       13656  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
     文件       12765  2011-03-10 10:52  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
     文件       14073  2011-03-10 10:51  usart3_dma\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
............此处省略163个文件信息

评论

共有 条评论