How to reset EPC5200 programmatically.

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

How to reset EPC5200 programmatically.

1,801 次查看
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 项奖励
回复
4 回复数

1,746 次查看
AlexVM
Contributor I

Thanks for your reply. 

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

Thanks again,

    Alex

0 项奖励
回复

1,782 次查看
AlexVM
Contributor I

Hi,

Thanks for your reply.

If I understand correctly, it is SPC5200CBV400B.

 

Thanks,

Alex

0 项奖励
回复

1,794 次查看
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 项奖励
回复

1,751 次查看
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 项奖励
回复