MPC5634 Jump from Bootloader To Application issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5634 Jump from Bootloader To Application issue

527 Views
windfield
Contributor I

      the Bootloader start address is 0x00004128, the application start address is 0x00000148,when the CPU Run, i want the CPU first run in Bootloader,then jump to application start address,this are two part separate software,so i set the resetvector address is the same as Bootloader start address, it can work,but when it jump to start adddress,it does't work,i don't know how to achieve jump function to make sure the application work normal? i just disable interprut and  use function pointer to application start address, whether need to set other registers to achieve it? waitting for your help !

0 Kudos
3 Replies

435 Views
windfield
Contributor I

Hi Lukas,

     Thanks for your reply, I am sure disable all interrupts,about the local enable bit,can you show me more details?

about put everything back to default status,do you have convenient operation to set it all back? i tried to set this registers i initialize in bootloader back,but it can't run in ASW, i use the same operation to jump from appication SW to Bootloader with only disable all interrupts, it runs normal,i don't know whick step is wrong,I waitting for your reply,Thanks again!

0 Kudos

435 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

"local enable bits" - for example, I mean bits like TCIE or RIE in SCI_CR1 register. These are bits which enable interrupts in the eSCI module. If you keep them enabled when jumping to app and if you disable interrupts only by EE bit in MSR then application is not aware of that, application can enable EE bit and SCI interrupt can be triggered even if application doesn't use it...

To set everything back to default state - this can be done manually by writing to registers or by reset. There's no other option.

Regards,

Lukas

0 Kudos

435 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

when jumping from bootloader to user application, did you disable all interrupts? I mean also by local enable bits. I always recommend to put everything back to default state when jumping to user application. Or the user application must know exactly that the chip is not in default reset state. Another option is to jump to user application right after reset when bootloader just checks some condition if application should be started or not.

 

Regard,

Lukas

0 Kudos