当前位置:首页>科技>正文

stm32怎样通过串口传输文件

2023-04-23 16:23:38 互联网 未知 科技

 stm32怎样通过串口传输文件

stm32怎样通过串口传输文件

文件:mian.c
//功能:串口初始化、打开定时器中断,然后一直接收数据状态就好了。发送在中断中实现
#include "stm32f10x.h"
#include "usart.h"
u8 USART_rx_data
int main(void)
{

RCC_Configuration() //系统时钟配置
GPIO_Configuration() //端口初始化
NVIC_Configuration() //中断源配置
USART_Configuration() //串口1初始化
Time_Init() //定时器初始化
#ifdef DEBUG
debug()
#endif
TIM_Cmd(TIM3,ENABLE)
while(1)
{
}
}