完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
/***************
IAP程序跳转APP程序 #define APPLICAtiON_ADDRESS (uint32_t)0x08003000 typedef void (*pFunction)(void); 把用户程序写入FLASH地址后执行以下代码 //跳转APP // JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4); Jump_To_Application = (pFunction) JumpAddress; __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS); Jump_To_Application(); 编译器默认 ***************/ /************** APP程序 #define APPLICATION_ADDRESS ((uint32_t)0x08004400) void IAP_Set(void) { uint32_t i = 0; /* Relocate by software the vector table to the internal SRAM at 0x20000000 ***/ /* Copy the vector table from the Flash (mapped at the base of the application load address 0x08003000) to the base address of the SRAM at 0x20000000. */ for(i = 0; i < 48; i++) { *((uint32_t*)(0x20000000 + (i << 2)))=*(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2)); } /* Enable the SYSCFG peripheral clock*/ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); /* Remap SRAM at 0x00000000 */ SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM); } [size=0.83em]7.png (15.97 KB, 下载次数: 0) 下载附件 [color=rgb(153, 153, 153) !important]2016-5-17 11:14 上传 **************/ |
|
|
|
1285 浏览 1 评论
1019 浏览 1 评论
MCU友好过渡MPU,米尔基于STM32MP135开发板裸机开发应用笔记
640 浏览 0 评论
自定义系统时钟频率后,用库函数和微带两种方式点亮LED灯,为什么灯的闪烁频率不一致?
1571 浏览 2 评论
1797 浏览 2 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-24 23:21 , Processed in 0.417297 second(s), Total 63, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号