How to software reset SAMD20

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

When my main app is running, I want to fall back to bootloader. To do that I set some flags  in flash then issue a software reset. I googled on how to software reset SAMD20 and it turns out that I have to reset the core by writing to the AIRCR reg. This is where I got the info:

 

cortex user guide

 

However the s/w reset is resulting in a hardware fault. 

 

This is my code:

(*(uint32_t*) 0xE000ED0C) = (0x05FA << 16) | 0x04;

It looks like that address is not mapped? Is there some other way to reset SAMD20 using start project?

 

thanks for your help

This topic has a solution.
Last Edited: Fri. Oct 27, 2017 - 02:45 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Probably the best way out is to use the WDT timer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

NVIC_SystemReset?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

NVIC_SystemReset?

Did this work?

Silly beans are always silly
:)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I ended up using WDT. I let it overflow and reset the system.