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