Re: What micros do you actually hate to work with?



On Fri, 13 Oct 2006 16:03:24 +0200, "Ulf Samuelsson"
<ulf@xxxxxxxxxxxxx> wrote:


"Jonathan Kirwan" <jkirwan@xxxxxxxxxxxxxx> skrev i meddelandet
news:tcgti25c5imlg81priu9k4003b01nrpd3e@xxxxxxxxxx
On Thu, 12 Oct 2006 23:21:20 +0200, "Ulf Samuelsson"
<ulf@xxxxxxxxxxxxx> wrote:

<snip>
You can only do exact delays if the CPU is inherently deterministic.
The AVR is, but I do not know if the MSP is.
<snip>

I'm not sure you can call the AVR inherently deterministic. I never
forget to include hardware timer interrupt latency (this avoids
debates over recognizing/synching to an external event) variations. Is
it the case that upon a timer interrupt that there is an exact and
entirely predictable latency to the first instruction of the interrupt
code in the AVR?

Jon

It is for the purpose of implementing "__delay_cycles", but
there is certainly a couple of clock cycles variation
for interrupts

__delay_cycles(n) inserts a sequence of code which will take 'n' clock
cycles to execute without interrupts, regardless of the state of the
processor.

I dont think anyone using __delay_cycles can accept any interrupts.
If you need an exact delay you need a H/W timer and then
let other H/W react on the timer event.

I was just picking on your use of "inherently deterministic," Ulf.

I do use processors that actually _do_ have an exact and fixed latency
into interrupt routines no matter what else they may be doing and I
value that, for some applications, highly.

Jon
.