资源简介
stm32 iap功能实现,包含两个工程,下载到单片机内后,发送0xaa可以实现来回跳转执行两个代码
代码片段和文件信息
#include “driver.h“
#define ApplicationAddress0 0x08000000 //应用程序起始地址
#define ApplicationAddress1 0x08008000 //应用程序起始地址
extern void jump(void);
uint8 flg = 0;
uint32_t JumpAddress;
pFunction Jump_To_Application; //应用程序地址指针
int main(void)
{
InitAllPeriph();
while(1)
{
if(flg!=0)
{
jump();
}
if(SysMsCnt>=50)
{
LED1_Toggle();
COM1_printf(“Programm0 is running……\r\n“);
SysMsCnt = 0;
}
}
}
void jump(void)
{
uint32 ApplicationAddress=0;
if(0x01==flg)
{
ApplicationAddress = ApplicationAddress1;
COM1_printf(“Execute user Program1\r\n“);
}
else
{
return ;
}
if (((*(volatile uint32_t*)ApplicationAddress) & 0x2FFE0000 ) == 0x20000000)
{
JumpAddress = *(volatile uint32_t*)(ApplicationAddress + 4);
Jump_To_Application = (pFunction)JumpAddress;
__set_MSP(*(volatile uint32_t*)ApplicationAddress); //初始化用户程序的堆栈指针
Jump_To_Application();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-04-30 23:36 1\
目录 0 2013-04-30 23:36 1\Driver\
文件 12953 2013-04-30 13:30 1\Driver\driver.c
文件 2180 2013-04-30 23:32 1\Driver\driver.h
文件 2511 2013-01-21 22:34 1\Driver\iflash.c
文件 4448 2013-01-20 23:01 1\Driver\rtc.c
文件 908 2013-01-20 22:36 1\Driver\rtc.h
文件 1225 2013-05-01 08:53 1\Driver\usart.c
文件 235 2013-05-01 08:53 1\Driver\usart.h
目录 0 2013-04-30 23:36 1\Libraries\
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\CoreSupport\
文件 17273 2010-06-07 10:25 1\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2011-02-09 14:59 1\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\DeviceSupport\
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\DeviceSupport\ST\
文件 25107 2012-07-14 14:30 1\Libraries\CMSIS\CM3\DeviceSupport\ST\Release_Notes_for_STM32F10x_CMSIS.html
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
文件 26297 2011-03-14 12:31 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
目录 0 2013-04-30 23:36 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
文件 15766 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15763 2012-07-14 14:30 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl112.s
文件 15503 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15692 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12376 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13656 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
文件 12765 2011-03-10 10:52 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
文件 14073 2011-03-10 10:51 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
文件 15955 2011-03-10 10:51 1\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
............此处省略404个文件信息
相关资源
- STM32F103移植rt-thread
- stm32步进电机基本旋转控制
- STM32L433硬件手册
- PCA9685驱动STM32F103
- stm32智能门禁系统
- STM32人脸识别代码
- Keil.STM32L0xx_DFP.2.0.0.pack
- LSM6DSL陀螺仪+加速度传感器带中断唤醒
- ADS1256-STM32+数据采集板资料.zip
- 基于zigbee温湿度传输及控制带wifiAPP查
- stm32f103c8t6-max31865-pt100测温
- Keil5下的STM32F407程序
- STM32L152 RTC 读取时间和日期
- STM32固件库使用手册(中文版)
- stm32F103C8外部flash图片显示
- STM32 GPIO和定时器 模拟串口
- ZLIB解压缩STM32工程
- STM32控制sg90舵机代码.rar
- 手环(一)---计步、速度等等.rar
- STM32F103 ADC测电压 代码
- Mini_oneNET.zip
- zw_qq_39340220-10661258-stm32机械手臂小车
- 基于STM32的室内温度控制系统.doc
- stm32f103测量pm2.5源码
- 基于stm32的闹钟rtc
- 轩微科技STM32编程器控制平台.rar
- MQ7浓度采集程序
- zw_OLED-STM32F4-IIC.zip
- 基于STM32篮球比赛计分
- STM32F103C8T6与MQTT通信的源码
评论
共有 条评论