-
大小: 5.15MB文件类型: .7z金币: 1下载: 0 次发布日期: 2023-11-11
- 语言: 其他
- 标签: STM32F105RC U盘IAP bootloader
资源简介
STM32F105RC芯片,IAR编译器,U盘IAP升级程序的bootloader源码。可参考修改后使用U盘对设备升级程序。
代码片段和文件信息
/* Includes*/
#include “main.h“
#define DSR GPIO_Pin_9
#define DSRPORT GPIOC
#define tab_num 11
u16 PrintGapTimeMin;//打印间隔计时
u16 PrintGapTimeSec;//打印间隔计时
u8 SaveRUNState = 0;
u8 SaveNow_seg = 0;//用于判断当前段数是否改变
//u8 SaveFAC = 0;//用于判断仪表类型是否改变
char welcome[] = “WELCOME TO USE OUR PRODUCTS!“;
char DeviceString[] = “DEVICE:AK-TEST“;
char VerCycString[] = “VERSION:S1.01.01“;//开机信息
char StateString0[] = “DATA:2019-07-22 12:00:00“;//
char StateString1[] = “STE :STOP PRCYCLE:9999MIN“;//状态改变或日期改变时打印
char StateString2[] = “CYC :00/00 RUNTIME:000:00:00“;//
char StateString3[] = “MEG :00/00 STETIME:000:00/000:00“;//
char StateString41[] = “TIME | TV/TS ℃ | HV/HS %|IV %“;//人工气候
char StateString42[] = “ TIME | TV/TS ℃ | HV/HS %“;//恒温恒湿
char StateString43[] = “ TIME | TV/TS ℃ |IV %“;//恒温光照
char TimingString1[] = “12:00| 25.0/ 30.0|50.0/80.0| 50“;//人工气候
char TimingString2[] = “ 12:00| 25.0/ 30.0| 50.0/80.0“;//恒温恒湿
char TimingString3[] = “ 12:00| 25.0/ 30.0| 50“;//恒温光照
char PARString[] = “--------------------------------“;
PRINT_PARA PRIPARA;// 打印参数结构体
void printerUART_Init(void)
{
//GPIO端口设置
GPIO_InitTypeDef GPIO_InitStructure;
USART_InitTypeDef USART_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART5|RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD ENABLE);
//USART1_TX PC12
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOC &GPIO_InitStructure);
//USART1_RX PD2
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOD &GPIO_InitStructure);
//打印机忙状态输入
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOC &GPIO_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = UART5_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=3 ;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQ通道使能
NVIC_Init(&NVIC_InitStructure); //根据NVIC_InitStruct中指定的参数初始化外设NVIC寄存器USART5
USART_InitStructure.USART_BaudRate = 9600; //一般设置为9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(UART5 &USART_InitStructure);
// USART_ITConfig(USART5 USART_IT_RXNE ENABLE);//开启中断打印机不需要接收中断
USART_Cmd(UART5 ENABLE); //使能串口
prt_init();//清空缓存复位打印机至开机默认
相关资源
- 任意串口BootLoader程序升级
- S32KCANbootloader上位机及下位机源码
- 6416bootloader.rar
- STM32 BOOTLOADER IAP 自动跳转
- STM32网络升级BootLoader
- TMS320VC5509A(LQFP)Bootloader测试程序
- MPC5744P CAN Bootloader上位机源码
- MPC5744P CAN Bootloader下位机及用户APP
- TI Cortex-M3 BootLoader资料
- 基于ARM嵌入式系统的通用Bootloader的设
- STM32L151_IAP_Bootloader.rar
- DSP28335串口二阶BOOT源码
- rtthread stm32f1xx hal bsp 偏移地址0x4000
- IAP的BootLoader和app都在里面
- stm32 BootLoader简单跳转
- stm32f103_IAPbootloader-1.0及用户app修改好
- freescale S12 S12X Bootloader
- 英飞凌 XC2000系列CAN BOOTLOADER 开发代码
- 基于CAN诊断汽车控制器刷新软件的设
- 基于CAPL的CAN控制器Bootloader上位机系统
- PMON工作原理分析
- U盘IAP升级带UCOS
- 整理的学习龙芯PMON龙芯bios相关资料
- STM32F207的U盘_USB_IAP升级程序 Bootloade
- 电子-移植好的BootLoader与TRC实验APP.z
- S32K1xx Bootloader文档和代码
- stm32 bootloader U盘更新APP程序
- Freescale_Bootloader上位机.7z
- 深入理解BOOTLOADER 胡尔佳 高清扫描p
- 基于can总线的bootloader
评论
共有 条评论