[Top] [All Lists]

Re: Timer setup code for DS5000/200

Subject: Re: Timer setup code for DS5000/200
From: (Paul Antoine)
Date: Wed, 4 Dec 1996 19:45:01 +1100 (EST)
In-reply-to: <> from "Paul Antoine" at Dec 4, 96 06:25:59 pm
Organization: Softway Pty Ltd
Hi again folks,

Earlier I said:

> Another problem is that the assembler will try to us $at given the
> sequence above, try:
>       la      k0,jiffies
>       lw      k1,(k0)
>       addiu   k1,1
>       sw      k1,(k0)

You will also need nops here, so:

        la      k0,jiffies
        lw      k1,(k0)
        addi    k1,1
        sw      k1,(k0)

> Hmmm... at least one of the reasons for this is that you're not clearing
> the interrupt on the RTC, so that as soon as the rfe completes it leaps
> straight back into the exception routine... try:
>       la      k0,0xbfe80030           # addr of RTC reg C on 5000/200
>       lw      k1,(k0)

This should be:

        la      k0,0xbfe80030           # addr of RTC reg C on 5000/200
        lb      k1,(k0)                 # only a byte-wide device

Once you do the above, the interrupts work well.

Paul M. Antoine,                                        Net:
Softway Pty Ltd                                         WWW:
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

<Prev in Thread] Current Thread [Next in Thread>