MPC5747C Hangs after a reset. debugger loses the control

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

MPC5747C Hangs after a reset. debugger loses the control

883 Views
hussain_usman
Contributor II

Hi,

I am working on bootloader project in MPC5747C with Lauterbach debugger. I can flash the bootlaoder using lauterbach at first time and it executes the code as expected. after the reset, code hits at BAF code 0x404100 location and some code executes there then the debugger losses it controls and unable to break. it shows emulation running. 

Could you please help me on this? its a urgent since we have a delivery in 2 weeks.

Note: i tried to use IC5000 debugger, it unable to connect at all. i already disbaled the watchdog at startup code. 

Regards

Hussain U

7 Replies

777 Views
hussain_usman
Contributor II

Hi Peter, 

I disabled the watchdog SWT in the startup. earlier i had a issue with the watchdog, but it was resolved by disabling in startup. I can see that the after the BAF executes, it jumps to 0x00000060 and there is no code there. control loses it control afterwards. startup is starts from 0x0FC0000

Do we have any configuration for jump from BAF to _start?

How to verify the reset line? which pin has to tested?

Regards

Hussain U

0 Kudos

777 Views
hussain_usman
Contributor II

Hi Peter,

I have some updates about the debugging, i can see that, In "boot header" the reset vector address got changed to another address, i feel it should be my _start. Could you please tell me how we can set this reset vector core0 address in the boot header?

Note: This issue start after i flashed my colleague application sw in the same hw, So i think this was some boot header changes by application code. since i am working on bootlaoder code. 

Regards

Hussain U

0 Kudos

777 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Simply change it to the reset vector where you wan to start your application.

Just pick up one of the bootable locations:

pastedImage_1.png

and set desired application location(CPU reset vector)  to boot header for selected core:

pastedImage_2.png

regards,

Peter

777 Views
hussain_usman
Contributor II

Hi Peter,

Yes i can see that the my colleague application used the 0xF8C000 place for bootheader, but my application i am using 0xF90000, because of the previous bootheader it skips my bootheader, I am unable to delete the location from the lauterbach. How can i delete the Bootheader from the location 0xF8C000? Does any other option is available for that?

Controller : MPC5747C

Regards

Hussain U

0 Kudos

777 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I am unable to delete the location from the lauterbach. How can i delete the Bootheader from the location 0xF8C000? Does any other option is available for that?

Simply erase micro?

Did you program this location to be OTP via DCF records? This is only mechanism which can prevent Lauterbach to erase this content.

Simply run the scrip I have attached. It will erase flash before programming.

regards,

Peter

777 Views
hussain_usman
Contributor II

Thanks Peter,

Yes it resets the flash location and erases. Really thanks for the support :smileyhappy:

Regards

Hussain U

0 Kudos

777 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

How does the reset line looks like on scope? Is it toggling and then constant reset?

What about SWT. Do you use watchdog? Service it?

If the code get stuck in BAF, then also micro without code (erased) would get stuck there also. Is this the case?

regards,

Peter

0 Kudos