[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] XMega Watchdog clock domains not synchronized?

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] XMega Watchdog clock domains not synchronized?
Date: Mon, 19 May 2014 16:22:55 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

As Bob Paddock wrote:

> > I do not see where this clock domain synchronization is accounted for
> > in avr/wdt.h wdt_enable().

As *I* read it, this synchronization is something that happens
internally to the device, and the SYNCBUSY bit only indicates
whether a synchronization is still pending.

> > App Note AVR1321 for the RTC32 explains the cross clock domain  issue,
> > however it doesn't really say what happens in the Watchdog or the RTC
> > case if things are not in sync.

AVR1310 would be the place to explain this, but even that appnote
fails to tell us something about the SYNCBUSY bit.

The only mention of it is in the source code examples that accompany
appnote AVR1310, encapsulated in the macro WDT_IsSyncBusy().  Basically,
they wait until the SYNCBUSY bit is gone after each manipulation of
the WDT.CTRL register.

That basically matches the suggested code change.

I wish the datasheet were a little more explicit here about what
user code is expected to do with the SYNCBUSY bit.
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]