STM32F103终端设备远程程序升级程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.STM32F103终端设备远程程序升级程序

2014-4-17

(1)把STM32F103的FLASH 分成2部分,0x08000000~0x08003fff,是IAP程序;

00x08004000~ ,是APP程序;

(2)硬件机构:内有GSM模块(移远M35),作为远程通信用。

(3)更详细,得到IAR 项目文件:stm32f103远程程序升级程序.rar,联系QQ:785313554 王昌世

2.程序结构

3.主程序

/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************

* File Name : main.c

* Author : wcs

* Version : V2.0.1

* Date : 03/18/2011

* Description : Main program body

********************************************************************************

* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONL Y AIMS AT PROVIDING CUSTOMERS

* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SA VE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,

* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE

* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING

* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

*******************************************************************************/

/* Includes ------------------------------------------------------------------*/

#include "stm32f10x.h"

#include "GrobalVariable.h"

#include "Grobalfunction.h"

#include "gsm.h"

#include "Flash.h"

#include "IPD_Process.h"

#include "Usart.h"

#include "SMS.h"

u32 TempCounter;

/////About GSM//WCS//2011-3-22

u16 GSMReceCount;

u16 Timer20msCount;

//////u8 AllGSMInitialAT_Flag;//2014-1-22

u8 cmti;

u8 CmtiFlag;

u8 IpdFlag;

u8 ipd;

u8 TcpFlag;

u8 CIICRFlag;//2011-4-24//wcs

char signal[3];//GSM信号状态.

char bat[4];//电池电量状态.

char DeviceNO[12];

char nowadmin[19],admin[16],admin1[16],admin2[16],admin3[16],admin4[16]; char mima[7];

char DN[28];////"www.iova.in";//HYT

char DN2[28];////"www.iova.in";//HYT

char ip[16];//220.231.180.37

char port[7];

char apn[26];

char apn_user[26];//最长25位apn用户名.

char apn_mima[12];//最长11位apn密码.

///2013-4-12

char DeviceSIM_CardNO[12];

char USER_HandsetNO[12];

s8 zone;

u8 GSMBand;

u8 GSM_All_A T_Flag;//GSMAllATFlag; //2013-12-20

u8 WarrantFlag;

u32 PlatformDataSendWDG;///wcs//2012-4-16

u8 GSM_SignalAbortFlag;///wcs//2011-4-26

u8 CheckGSMSignalTimer;///wcs//2011-4-26

u8 TcpSendAbortCounter;

u8 LoginPlatformFlag;

char apn[26];

char apn_user[26];//最长25位apn用户名.

char apn_mima[12];//最长11位apn密码.

u8 CSQ_V;

u8 GSM_SignalLowFlag; //wcs//2011-6-2

u8 QuickFlashTime;//wcs//2011-6-2

u8 CheckGSMSignalTimer;//wcs//2011-4-22

long long xyz;

/////<--About GSM//WCS//2011-3-22

/////-->About STM32//WCS//2011-4-24

///#define USART_CR1_UE ((unsigned long)0x00002000)//OPEN

#define USART_CR1_UE ((uint16_t)0x2000) /*!< USART Enable */ ////#define USART_CR1_UD ((unsigned long)0x00000000)//cLOSE

u8 temp_count;

u8 MainWhileFlag;

u16 MainWhileWatchDog;

u8 ProgramAbortCounter;

char GPS_Signal[2];

char T_EnterSend[3];

char T_Send[3];

u8 GPSEffectFlag2;//wcs//2011-8-4

///u16 AccJudgeTimer;

///For program safe

u8 ReadtPass0TimeFlag;

//For GSM WORK SAFE//WCS//2011-8-29

u8 GSM_ReportFlag;

相关文档
最新文档