How to reset EPC5200 programmatically.

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

How to reset EPC5200 programmatically.

1,531 Views
AlexVM
Contributor I

Dear experts,

I am a novice with this processor, but got a task recently: reset EPC5200 programmatically.

Under 'reset' I mean - force to execute bootloader same way as it occurs on power cycle.

Here is the code I've got from team lead:

 // Turn ethernet off
Ethernet::Close();

//mask all interrupts
ICTL->cprimmsk = 0x1FFFF;

//wait to make sure everything is off
SystemUtils::MSleep(1000);

void(*localProgramAddressFPtr)(void) = reinterpret_cast<void(*)(void)>(0xFFF00000 + 0x100);

//call the reset routine
(*localProgramAddressFPtr)();

But instead of rebooting, the application freezes. 

What I am doing wrong? Might there be a different way to accomplish? Some standard API call etc.

Thank you,

     Alex

0 Kudos
Reply
4 Replies

1,476 Views
AlexVM
Contributor I

Thanks for your reply. 

I've just resolved it using watchdog, works for me.

Thanks again,

    Alex

0 Kudos
Reply

1,512 Views
AlexVM
Contributor I

Hi,

Thanks for your reply.

If I understand correctly, it is SPC5200CBV400B.

 

Thanks,

Alex

0 Kudos
Reply

1,524 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

Thank you for contacting us.

Please let us know your NXP chip part number, thus we can assign right engineer for your issue.

Thanks,

Jun Zhang

0 Kudos
Reply

1,481 Views
Pavel
NXP Employee
NXP Employee

The MPC5200 hardware does not have possibility to produce the same reset as POREST. It is possible to produce HRESET assertion only.

The simplest is the following for HRESET assertion:

produce Machine check exception and HRESET assertion

produce HREST using watchdog.

0 Kudos
Reply