XMC4500 software reset

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
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
0 Likes
5 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Kirk wrote:
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.
0 Likes
Not applicable
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
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Kirk wrote:
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 !!!
0 Likes
Not applicable
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
0 Likes
User8819
Level 4
Level 4
You may use CMSIS function

NVIC_SystemReset();

that should do it.

rum
0 Likes