SAM4S Watchdog WDT_MR register cannot be set

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

Trying to run the watchdog timer example for the EK2-board. I notice this does not work because the WDT_MR register never changes when calling wdt_init().

The datasheet specifies that this register is read/write once, which should unlock the register after rebooting or powercycling (i think), but this does not solve the problem.

 

I did some testing by writing to WDT_MR without using ASF (WDT->WDT_MR = 0;) and placing this at the first line of in the main function, but still i'm not able to write anything to that register.

 

I tried on 2 different boards (had the same result), so no clue there either.

 

Any help?

Thanks

Last Edited: Tue. Nov 14, 2017 - 08:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Same thing here for a SAM3X. I checked all the code if not any function might have accessed before the WDT_MR register, but it does not seem so. Have you in between found the reason?

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

Probably better asking in the SAM forum ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...