No clock_prescale_set(), wdt_disable() for XMega?

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

Ok freaks, I can't seem to find the definitions for clock_prescale_set() and wdt_disable() for the ATXMega256A3B. The wdt_enable() inline assembly macro is there, but these others (and maybe more?) seem suspiciously absent. Am I missing something - are these being deprecated for some reason? I'll bet it's those new ARM chips stealing all the attention. Wah.

Field the chicken, ignore the ball.

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

If you look at you will see that for 256A3B only wdt_enable() is provided - there is no disable - nor for any Xmega that I can see.

If you look at you will see that there simply is not a clock_prescale_set() section for Xmega.

Your three options are:

1) wait for someone else to add this support to AVR-LibC

2) add it yourself (and hopefully push the changes back upstream for others)

3) investigate what ASF has to offer. I know it has functions for handling the Xmega and UC3 complex timing setup. As for watchdog, that you'll have to explore yourself.

(You would kind of hope that Atmel themselves might donate anything suitable from ASF to be included in AVR-LibC for the wider audience).

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

Thanks, I was just worried that I had missed something.

Field the chicken, ignore the ball.

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

Shamefully, I don't know how to push things upstream into AVR-LibC, but I'm very grateful others do. Thank you AVR-LibC guys and gals! New toolchain in AStudio 6.2 includes the def for wdt_disable(). Thanks again.

Field the chicken, ignore the ball.

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

Changesto AVR-LibC start on this page:

http://savannah.nongnu.org/projects/avr-libc/

Even for a new feature rather than a bug request you'd start my making a bugzilla entry:

http://savannah.nongnu.org/bugs/?group=avr-libc&func=browse&set=open

The developers would look at it and prioritise it. You could sign up to be a developer on the project to and take on the responsibility for any particular task.

In the case of wdt.h you can see who added wdt_disable here:

http://svn.savannah.nongnu.org/viewvc/trunk/avr-libc/include/avr/wdt.h?r...

So it was added at revision 2431 on May 19th.

Another way to find out the same is to use the "annotate" link for HEAD near the top of the page. The coloured block at line 206 onwards shows the lines recently added by pitchumani. Some details about them here:

http://savannah.nongnu.org/users/pitchumani

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

ASF has the watchdog stuff for xmega