初级会员

- 积分
- 63
- 金钱
- 63
- 注册时间
- 2019-7-10
- 在线时间
- 18 小时
|
这个是跳转函数
void loading_program(uint32_t LoadAddress)
{
if (((*(__IO uint32_t*)LoadAddress) & 0x2FFE0000 ) == 0x20000000)/*检查栈顶地址是否合法*/
{
U2_Printf("\r\nM2 Ready to go to the APP!\r\n");
osDelay(50);
/*Debug*/
U2_Printf("Jump Address:0x%08X\r\n", ((*(uint32_t*)LoadAddress) & 0x2FFE0000 ));
osDelay(100);
Disable();
JumpToAddress = (pFunction)*(uint32_t*) (LoadAddress + 4);
MSR_MSP(*(__IO uint32_t*) LoadAddress);
JumpToAddress(); /*跳转app*/
}
else
{
U2_Printf("\r\nM2 Loading APP ERROR!\r\n");
osDelay(50);
U2_Printf("Load Address:0x%08X\r\n", LoadAddress);
osDelay(50);
/*Debug*/
U2_Printf("Jump Address:0x%08X\r\n", ((*(__IO uint32_t*)LoadAddress)&0x2FFE0000));
osDelay(1000);
}
}
跳转打印是这个
M2 Loading APP ERROR!
Load Address:0x08020000
Jump Address:0x28160000
一直无解为什么是这样
|
|