PDA

View Full Version : XMC4500 software reset



Kirk
Oct 15th, 2013, 04:04 PM
I need to issue a software reset in my code that restarts the processor as if it had gone through a power-on reset.

Is there a macro or a DAVE app function call that will do this?

Thanks,
Kirk

Travis
Oct 16th, 2013, 11:16 PM
I need to issue a software reset in my code that restarts the processor as if it had gone through a power-on reset.

Is there a macro or a DAVE app function call that will do this?

Thanks,
Kirk

Sorry to say we do not have a specific Apps for this purposes. You might want to consider "Software reset via Cortex-M4 Application Interrupt and Reset Control Register
(AIRCR).

Application Interrupt and Reset Control Register.

The AIRCR provides priority grouping control for the exception model, endian status for data accesses, and reset control of the system.
To write to this register, you must write 0x5FA to the VECTKEY field, otherwise the processor ignores the write.


Implementation should not be too difficult.

G@@d luck.

Kirk
Oct 18th, 2013, 10:30 AM
Yes, that works.
I just needed to find the correct page (out of 2600 pages) in the XMC4500 reference manual. :)

Thanks for your help,
Kirk

Travis
Oct 20th, 2013, 11:31 PM
Yes, that works.
I just needed to find the correct page (out of 2600 pages) in the XMC4500 reference manual. :)

Thanks for your help,
Kirk

Good to hear that !!!

wiederma
Nov 9th, 2015, 02:33 AM
Hello there,
I know this is quite an old thread but I am curious how you managed to trigger the reboot ... In the reference manual on page 122 I found the AIRCR (Application Interrput and Reset Control Register) description.
In my source code I tried to use this by:

#define AIRCR_ADDR 0xE000ED0C
//#define READ_AIRCR() (*(volatile uint32_t *)AIRCR_ADDR)
#define WRITE_AIRCR(val) ((*(volatile uint32_t *)AIRCR_ADDR) = (val))

...

WRITE_AIRCR(0x5FA0000);
WRITE_AIRCR(0x0000004);

but it doesn't seem to work ... any advice?
thanks

rum
Nov 9th, 2015, 02:43 AM
You may use CMSIS function

NVIC_SystemReset();

that should do it.

rum