Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Xdiv

2004-12-04 by Dave VanHorn

Is anyone aware of problems around changing the Xdiv regiseter in the M128?

We've been doing this for a while, with code like this:

ldi	TEMP,127
out	xdiv,temp
nop


Now, I just discovered an app note from atmel that says that you need to do 
the following:

cli
ldi	temp,127
out	xdiv,temp
nop
nop
nop
nop
nop
nop
nop
nop
sei

They say that nop is the only safe instruction to execute after the xdiv, 
and that you need at least eight nops after the xdiv before you can execute 
normal code.

When did this info become available?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.