27,373
社区成员
发帖
与我相关
我的任务
分享
static void JumpToApp(void)
{
if (((*(__IO uint32_t*)ApplicationAddress) & 0x2FFD0000) == 0x20000000)
{
/* Jump to user application */
m_JumpAddress = *(__IO uint32_t*) (ApplicationAddress + 4);
JumpToApplication = (FunVoidType) m_JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) ApplicationAddress);
__set_PRIMASK(1);
JumpToApplication();
}
Uart1SendSyc("JumpToApp Failed!\r\n");
}
int main(void)
{
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x10000); //App程序开始的地方
LED_Init();
while(1)
{
STM_EVAL_LEDToggle(LED4);
}
}