初级会员

- 积分
- 110
- 金钱
- 110
- 注册时间
- 2018-7-18
- 在线时间
- 20 小时
|
1金钱
IAP 程序 跳转不带UCOS系统的APP 成功,没有问题
IAP 程序 跳转到带有UCOSIII系统的APP程序失败
void Jump_To_Application(uint32_t saddr)
{
/* Test if user code is programmed starting from address "ApplicationAddress" */
if (((*(__IO uint32_t*)saddr) & 0x2FFE0000 ) == 0x20000000)
{
/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (saddr + 4);
To_Application = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_PSP(*(__IO uint32_t*) saddr);
__set_CONTROL(0);
__set_MSP(*(__IO uint32_t*) saddr);
//
//重启中断
__set_BASEPRI(0);
__set_PRIMASK(0);
__set_FAULTMASK(0);
// SCB->VTOR=saddr;
To_Application();
}
}
IAP 和 APP 的FPU 都是开启的,启动文件已经修改
请大神们指点,还有哪里需要调整,感觉就是哪个位置设置不对。
|
|