How to reset EPC5200 programmatically.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to reset EPC5200 programmatically.

2,221件の閲覧回数
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 返答(返信)

2,166件の閲覧回数
AlexVM
Contributor I

Thanks for your reply. 

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

Thanks again,

    Alex

0 件の賞賛
返信

2,202件の閲覧回数
AlexVM
Contributor I

Hi,

Thanks for your reply.

If I understand correctly, it is SPC5200CBV400B.

 

Thanks,

Alex

0 件の賞賛
返信

2,214件の閲覧回数
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 件の賞賛
返信

2,171件の閲覧回数
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 件の賞賛
返信