jump application from task for freertos in mpc5748‘s bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

jump application from task for freertos in mpc5748‘s bootloader

跳至解决方案
1,872 次查看
baixiaolin
Contributor II

Hi all,

i am runing a bootloader base on freertos,but it can't jump to application when run from task.

i know arm architect can switch psp to msp and set CONTROL register, but how to deal with powerpc?

thank you!

 

@PetrS

标记 (1)
0 项奖励
回复
1 解答
1,864 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the best way is to jump to the application right after reset. The startup code should only check a condition if bootloader or application should be started and then jump there without further initialization.

If you jump to the application later in the code, it is a must to disable interrupts on all levels (MSR[EE], priorities, local enable bits in peripherals) and it's also highly recommended to put all used resources back to default reset state.

There's no PSP/MSP on the PowerPC. R1 register is used as a stack and it is supposed to be initialized by startup code. So, you do not need to care about the stack.

Regards,

Lukas

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,865 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the best way is to jump to the application right after reset. The startup code should only check a condition if bootloader or application should be started and then jump there without further initialization.

If you jump to the application later in the code, it is a must to disable interrupts on all levels (MSR[EE], priorities, local enable bits in peripherals) and it's also highly recommended to put all used resources back to default reset state.

There's no PSP/MSP on the PowerPC. R1 register is used as a stack and it is supposed to be initialized by startup code. So, you do not need to care about the stack.

Regards,

Lukas

0 项奖励
回复
1,804 次查看
baixiaolin
Contributor II

thanks for you help,

I have solved the problem,i close freertos's tick timer and deinit all model,then jump is success!   If someone else has this problem,you can debug then inquire mscr and mscrr0,what addr triggered the error.

0 项奖励
回复